Re: dchroot scripts

2004-12-17 Thread Kyle Rose
> It's a matter of _where_ you want (for instance) $variable to be > interpreted. You can argue it either way; my feeling is that when su > strcat's the arguments togther, it's going out of it's way to *lose* > information that was given to (how the arguments _were_ split apart, > which is vitally

Re: dchroot scripts

2004-12-17 Thread David M. Cooke
On Fri, Dec 17, 2004 at 05:29:01PM -0500, Kyle Rose wrote: > [EMAIL PROTECTED] (David M. Cooke) writes: > > > There are actually two separate problems with quoting in dchroot, and > > they're both caused by interaction with su: > > > > Bug #249655: "dchroot -d ls -l" broken: su tries to interpret

Re: dchroot scripts

2004-12-17 Thread Kyle Rose
[EMAIL PROTECTED] (David M. Cooke) writes: > There are actually two separate problems with quoting in dchroot, and > they're both caused by interaction with su: > > Bug #249655: "dchroot -d ls -l" broken: su tries to interpret -l switch > * dchroot doesn't call su with -- before the command, so su

Re: dchroot scripts

2004-12-17 Thread David M. Cooke
Kyle Rose <[EMAIL PROTECTED]> writes: > So, the dchroot wrapper script suggestion in the FAQ is okay, but it > doesn't really work in all cases because dchroot appears to sh -c > ... without doing proper quoting on the underlying command. Commands > like > > mplayer 'rtsp://1.2.3.4:5678/encoder

Re: dchroot scripts

2004-12-17 Thread Kyle Rose
I love replying to myself. There's actually a problem with quote-args as I presented it: specifying no arguments would result in one quoted argument, which will seriously break lots of commands. Here's a better version: quote-args -- #! /bin/sh if [ $# != 0 ]; then echo -n "`ech

dchroot scripts

2004-12-17 Thread Kyle Rose
So, the dchroot wrapper script suggestion in the FAQ is okay, but it doesn't really work in all cases because dchroot appears to sh -c ... without doing proper quoting on the underlying command. Commands like mplayer 'rtsp://1.2.3.4:5678/encoder/listen.rm?cloakport=8080' would choke because th