[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [E-devel] Ecore_exe and shell metacharachters



On Thu, 6 Apr 2006 08:41:26 +0900 Carsten Haitzler (The Rasterman)
<raster@rasterman.com> wrote:

> On Wed, 05 Apr 2006 12:24:37 -0400 Mike Russo <miker@readq.com>
> babbled:
> 
> > Ecore_exe will try to avoid using "sh -c" to execute a program if
> > it can.  If the command line contains shell meta characters
> > (defined as any combination of |&;<>$'\"'*?#) it will use the
> > user's shell to execute the command, otherwise it will execute it
> > directly.
> 
> well that depends on flags. you can add to the exec flags
> ECORE_EXE_USE_SH (its a bitmask - so just or it in) and then it will
> use /bin/sh regardless

<snip> 
 
> > Not really sure what the best way to fix this would be though. The 
> > simple solution of enclosing the command line in single quotes does
> > not work.  I think if the command line is parsed and all meta
> > characters are escaped it will work with any shell, but I'm too
> > lazy to implement that. :(  Just wanted to report it, I'll probably
> > change my shell or edit ecore_exe.c to use /bin/sh instead of my
> > shell to work around it until someone less lazy then myself can fix
> > it. :)
> 
> see above - there *IS* a flag u can pass - and devian should be
> escaping - just like you have to escape when u type it...

There is a flag now, there wasn't before.  I created that
ECORE_EXE_USE_SH flag in response to Mikes email.  Devian now uses it,
so I hope this bug is now fixed.

Attachment: signature.asc
Description: PGP signature