From: Paul Menage <pmenage@ensim.com>
To: Paul Powell <moloch16@yahoo.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Undoing chroot?
Date: Fri, 26 Jan 2001 14:15:56 -0800 [thread overview]
Message-ID: <E14MH9w-0008Cd-00@pmenage-dt.ensim.com> (raw)
In-Reply-To: <0C01A29FBAE24448A792F5C68F5EA47D04E323@nasdaq.ms.ensim.com>
In article <0C01A29FBAE24448A792F5C68F5EA47D04E323@nasdaq.ms.ensim.com>,
you write:
>
>So how do you reverse a CHROOT?
>
Assuming your process doesn't drop its root privileges, before you do
the initial chroot() you could do:
old_root = open("/", O_RDONLY);
Then later do
fchdir(oldroot);
chroot(".");
But the cleaner and more portable solution is probably to have a child
process executing inside the chroot, and have its parent eject the CD
when the child exists.
Paul
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next parent reply other threads:[~2001-01-26 22:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <0C01A29FBAE24448A792F5C68F5EA47D04E323@nasdaq.ms.ensim.com>
2001-01-26 22:15 ` Paul Menage [this message]
2001-01-26 18:31 Paul Powell
2001-01-26 18:54 ` alex
2001-01-27 2:47 ` Chris Wedgwood
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=E14MH9w-0008Cd-00@pmenage-dt.ensim.com \
--to=pmenage@ensim.com \
--cc=linux-kernel@vger.kernel.org \
--cc=moloch16@yahoo.com \
/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
all inboxes | Powered by JetHome®