From kde-commits Sun Dec 08 19:50:26 2002 From: Mantia Andras Date: Sun, 08 Dec 2002 19:50:26 +0000 To: kde-commits Subject: Re: quanta [POSSIBLY UNSAFE] X-MARC-Message: https://marc.info/?l=kde-commits&m=103937738030590 [...] > > I made a simple shell script: > > #!/bin/sh > > ls -l $1 > > > > Saved in a file, and set it to executable. Now, if I run without shell, > > it does not run, but running inside a shell runs well. Of course, this > > has $1 inside, but we need such things. > > this must have another reason. the sript is executed by the shell in > either case (how else?). Don't know.... The fact is that the above files is executed if I use setUserShell(true) and it isn't if I don't use. > > btw, for the record: the script should read 'ls -l "$1"' - otherwise you > have a quoting problem in the script (although no security hole with most > shells). It was really just a quick test script, to see how does the KProcess with or w/o setUserShell(true) behave... Andras