In article <[EMAIL PROTECTED]>,
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 [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to