From: Dan Kegel <dank@kegel.com>
To: linux-kernel@vger.kernel.org
Subject: chroot bug if arg not absolute path?
Date: Thu, 03 Jul 2003 20:26:59 -0700 [thread overview]
Message-ID: <3F04F403.2000809@kegel.com> (raw)
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
next reply other threads:[~2003-07-04 2:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-04 3:26 Dan Kegel [this message]
2003-07-04 3:33 ` chroot bug if arg not absolute path? Dan Kegel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3F04F403.2000809@kegel.com \
--to=dank@kegel.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox