I'm not 100% sure if this is what you meant, but I did get the following
to work:=20
chdir("/jail");=20
unshare(CLONE_NEWNS);
mount("/jail", "/jail", NULL, MS_BIND, NULL);
pivot_root("/jail", "/jail/old_root");
chdir("/");
mount("/old_root/bin", "bin", NULL, MS_BIND, NULL);
mount("/old_root/usr", "usr", NULL, MS_BIND, NULL);
mount("/old_root/lib", "lib", NULL, MS_BIND, NULL);
umount2("/old_root", MNT_DETACH);
exec("/busybox");
Thanks for the help. =20
On Tue, 2008-03-04 at 15:45 -0600, serge@hallyn.com wrote:
--=20
Michael Leibowitz <michael.leibowitz@intel.com>
Previous message: [thread] [date] [author] Next message: [thread] [date] [author]