That's better indeed, thanks!
Samuel
Both applied, thanks!
Samuel
Justus Winter 4win...@informatik.uni-hamburg.de writes:
[…]
* utils/fakeroot.sh: Escape arguments handed to /bin/sh so that they
are not evaluated prematurely.
[…]
exec /bin/settrans --chroot \
- /bin/fakeauth /bin/sh -c cd `pwd`; $* \
+ /bin/fakeauth /bin/sh -c cd `pwd`;
Quoting Ivan Shmakov (2013-08-25 17:55:39)
Justus Winter 4win...@informatik.uni-hamburg.de writes:
[…]
* utils/fakeroot.sh: Escape arguments handed to /bin/sh so that they
are not evaluated prematurely.
[…]
exec /bin/settrans --chroot \
- /bin/fakeauth /bin/sh -c cd
Justus Winter 4win...@informatik.uni-hamburg.de writes:
Quoting Ivan Shmakov (2013-08-25 17:55:39)
[…]
/bin/fakeauth /bin/sh \
-c 'cd $1 || exit ; shift ; exec $@' \
dummy.sh $(pwd) $@ \
?
The essential point is that using -c doesn’t prevent one
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