Welcome! Log In Create A New Profile

Advanced

unshare(2) broken

Posted by James Long 
unshare(2) broken
June 05, 2015 06:58PM
Under debian wheezy, kernel 3.2, I used to be able to call unshare(CLONE_NEWNS), and get behaviour consistent with the mount(2) manpage when mounting an nfs share:

A process can obtain a private mount namespace if: it was created using the clone(2) CLONE_NEWNS flag, in which case its new namespace is initialized to be a copy of the namespace of the process that called clone(2); or it calls unshare(2) with the CLONE_NEWNS flag, which causes the caller's mount namespace to obtain a private copy of the namespace that it was previously sharing with other processes, so that future mounts and unmounts by the caller are invisible to other processes (except child processes that the caller subsequently creates) and vice versa.

My nfs mounts would only be visible to my process, and would exit when the process finished.

Under debian jessie, however, the mounts are visble to all, and persist after the process exits.

Any ideas?

Thanks,

Jim
Author:

Your Email:


Subject:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 10 plus 17?
Message: