How to clean filesystem namespaces
by
Bastian Blank
—
last modified
Apr 29, 2008 07:33 PM
Filed Under:
Dear lazyweb, use the following code to clean out a filesystem namespace on linux:
mount ("root", "root", NULL, MS_BIND, NULL);
pivot_root ("root", "root/tmp");
chdir ("/");
umount2 ("/tmp", 2);
mount ("none", "/proc", "proc", 0, NULL);
