Bug#374713: [Buildd-tools-devel] Bug#374713: Aborts if cd fails but
seems to use pwd -P
Christian Hammers
ch at lathspell.de
Wed Jun 21 22:30:49 UTC 2006
On 2006-06-21 Christian Hammers wrote:
> In the old version dchroot-0.13 it jumped to the home directory as
> specified in /etc/passwd *always*, regardless of the actual cwd of the
> calling user. It did this by executing e.g. "/bin/su - ch -c foobar".
>
> My suggestion would be to change the code to do something like:
> p = popen("/bin/sh -c 'pwd'", "r");
> target_dir = fgets(p);
> ... chroot() ...
> chdir(target_dir);
Or maybe add an option that behaves like a "su" as I just found out that the
new schroot does not read ~/.bashrc like both interactive and
non-interactive new bash instances are supposed to. E.g. in my
setup .bashrc tested for /etc/debian_chroot and changed $DISPLAY from
":0.0" (socket) to "localhost:0.0" (inet) and changed the PS1 prompt for
interactive shells so that I did not mix up my xterms...
bye,
-christian-
More information about the Buildd-tools-devel
mailing list