On Wed, 2009-02-04 at 09:47 +1300, Michael Kerrisk wrote: > > In my real > > program I got ENOENT for some reason. Anyway ENOENT still happens > > if /proc is mounted but the executed file is outside the chroot. > > Yes. The entries in /proc/self/fd are symlinks, and these would refer > to paths that probably don't exist in your chroot environment.
Right. I originally thought that fexecve() would have been a kernel call that internally were able to execute files outside chroot. I don't actually even see many other benefits for that at all.. > (If > you have test program for this case, I'd be interested to see it, to > run a few experiemnts.) The test program in my previous mail did the chrooting. Just compile it, mkdir -p /tmp/foo/proc, mount --bind /proc /tmp/foo/proc and run it.
signature.asc
Description: This is a digitally signed message part