On Thu, 2011-06-02 at 21:33 +0200, Thorsten Kukuk wrote:
On Wed, Jun 01, Tomas Mraz wrote:
> In Fedora currently the / mount point is made rshared during the boot so
> the mounts and umounts of system mountpoints affects all the namespaces
> that are created with the unshare call. However the polyinstantiated
> directories must be made explicitly private. To support this without
> explicit marking polyinstantiated directories private this patch allows
> doing that implictly in the pam_namespace. I wrote this support as
> optional with a 'mount_private' option. It could be made non-optional if
> we decide so - the cost is one unnecessary bind mount in that case (on
> systems that do not have the / mount point rshared).
>
> OK to commit or should it be a non-optional?
Ok to commit. About non-optional: openSUSE isn't using it, so there
isn't much I can say.
I've added a code that detects that the / is shared and in that case the
pam_namespace works as if mount_private was specified explicitly. This
is not 100% perfect detection of the need for the private mounts but it
would work in the most common cases. For the remaining cases the admin
can specify it explicitly. As there is no real use case for shared
namespace mounts, I did not add any option for disabling this
autodetection.
OK to commit?
--
Tomas Mraz
No matter how far down the wrong road you've gone, turn back.
Turkish proverb