* chroot bug if arg not absolute path?
@ 2003-07-04 3:26 Dan Kegel
2003-07-04 3:33 ` Dan Kegel
0 siblings, 1 reply; 2+ messages in thread
From: Dan Kegel @ 2003-07-04 3:26 UTC (permalink / raw)
To: linux-kernel
On my Debian 3.0 system running the 2.4.18 kernel, I
ran into a funny problem: /usr/sbin/chroot, or the chroot()
system call followed by the chdir() system call,
seem to work if their argument is not an absolute path;
that is, scandir("/bin") can see the files in the jail,
but execlp("/bin/sh", "/bin/sh", 0) fails to find the /bin/sh
in the jail, and sets errno to ENOENT.
Is this a bug, or do I have a screw loose behind the wheel?
- Dan
--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: chroot bug if arg not absolute path?
2003-07-04 3:26 chroot bug if arg not absolute path? Dan Kegel
@ 2003-07-04 3:33 ` Dan Kegel
0 siblings, 0 replies; 2+ messages in thread
From: Dan Kegel @ 2003-07-04 3:33 UTC (permalink / raw)
To: Dan Kegel; +Cc: linux-kernel
Dan Kegel wrote:
> On my Debian 3.0 system running the 2.4.18 kernel, I
> ran into a funny problem: /usr/sbin/chroot, or the chroot()
> system call followed by the chdir() system call,
> seem to work if their argument is not an absolute path;
> that is, scandir("/bin") can see the files in the jail,
> but execlp("/bin/sh", "/bin/sh", 0) fails to find the /bin/sh
> in the jail, and sets errno to ENOENT.
>
> Is this a bug, or do I have a screw loose behind the wheel?
The latter. Ignore me.
- Dan
--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-07-04 3:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-04 3:26 chroot bug if arg not absolute path? Dan Kegel
2003-07-04 3:33 ` Dan Kegel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox