On Monday 17 September 2007, Bob Proulx wrote:
> Markus Schoder wrote:
> > Package: coreutils
> > Version: 5.97-5.4
> > Severity: normal
>
> I have recreated the problem and have reduced it to something related
> to the use of openat() and fallback code in the 5.97-5.4 NMU whereas
> the previous 5.97-5.3 used getcwd().  Methinks the NMU changed more
> than intended.  Certainly more than was documented in the changelog.
>
> > First some pre-conditions:
> > 1. Current directory is /tmp
> > 2. /tmp is bind mounted to /var/chroot/sid-ia32/tmp
>
> The key info here is that openat() is now attempted and fails (for me
> on my older amd64 kernel) and the fallback code requires /proc to be
> available.  This was not required in the getcwd() version.
>
> > 3. ia32 is a program that does a chroot to /var/chroot/sid-ia32 and
> > then execs a shell.
>
> Using 'sudo chroot /path/chroot /bin/bash' works fine too.

For me this causes the directory to change to / where the problem does 
not happen.

> > Given those here is a command sequence that shows the problem:
> >
> > /tmp$ ia32
> > /tmp$ /bin/pwd
> > /bin/pwd: couldn't find directory entry in `../..' with matching
> > i-node
>
> Confirmed.  pwd tries to open /proc/self/fd and various and fails
> because it is not there.
>
> Workaround: Also bind mount /proc into the chroot.

I always had /proc bind mounted. That cannot be the whole story but 
thanks for looking into this.

--
Markus



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to