Age | Commit message (Collapse) | Author |
|
Fix case when $PWD contains spaces.
Pass directly arguments to command, to directly avoid escaping issues.
Based on suggestion by Ivan Shmakov <oneingray@gmail.com>
* utils/fakeroot.sh (TARGET): Do not define.
(sh): Rather pass PWD and commandline as parameters.
* utils/remap.sh: Likewise.
|
|
fakeroot.sh uses /bin/sh to first change the working directory and
then execute the given program in the fakeroot context. But the
arguments given on the command line were not properly escaped:
% '/bin/sh' '-c' 'echo $0'
/bin/sh
% fakeroot-tcp '/bin/sh' '-c' 'echo $0'
/bin/sh
% fakeroot-hurd '/bin/sh' '-c' 'echo $0'
<empty line>
% fakeroot-hurd-fixed '/bin/sh' '-c' 'echo $0'
/bin/sh
* utils/fakeroot.sh: Escape arguments handed to /bin/sh so that they
are not evaluated prematurely.
|
|
* fakeroot.sh: Dont use "exec" command, since the original script
does not and some users use sh syntax here and not just commands.
|
|
* fakeroot.sh: Inside the chroot'd fakeauth environment,
run a shell that chdir's to what was our original current
directory (by name) before exec'ing the user's command.
|
|
* fakeroot.sh: New file.
* Makefile (targets, special-targets, SRCS): Add it.
|