Skip to content. | Skip to navigation

Personal tools
Log in
Sections
You are here: Home Blog archive 2008 April 29 How to clean filesystem namespaces

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);
Filed under:
Add comment

You can add a comment by filling out the form below. Plain text formatting. Web and email addresses are transformed into clickable links. Comments are moderated.