[EMAIL PROTECTED] (Jacques Gelinas) writes: > What is the current usage for namespace in the kernel. Is there other > usage than pivot_root() ?
I am using it in my vrpm/vapt-get wrapper to * use a custom /etc/rpm directory in the host * make the rpmdb visible to the host-part of apt-get/rpm only (not the %scriptlet, nor the other vserver-processes) Basically, this happens by executing 'new-namespace vrpm-worker' and vrpm-worker does * mount --bind /vservers/.pkg/<foo>/rpm/etc /etc/rpm * mount --bind /vservers/.pkg/<foo>/rpm/state /vservers/<foo>/.rpmdb [Indeed, the second mount happens in a more secure way and the paths are more general also] The LD_PRELOAD wrapper for rpm's execv() creates a new namespace again, umounts /.rpmdb and calls the %scriptlets. The new-namespace utility is available in util-vserver CVS[1] and can be executed e.g. as 'new-namespace /bin/sh'. Enrico Footnotes: [1] http://savannah.nongnu.org/cgi-bin/viewcvs/util-vserver/util-vserver/src/new-namespace.c?rev=1.3&content-type=text/vnd.viewcvs-markup
