On Mon, 2011-06-06 at 17:12 +0200, Thorsten Kukuk wrote:
On Thu, Jun 02, 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'm getting now compile errors because of:
pam_namespace.c: In function ‘ns_setup’:
pam_namespace.c:1542:53: error: ‘MS_PRIVATE’ undeclared (first use in this function)
pam_namespace.c:1542:53: note: each undeclared identifier is reported only once for each
function it appears in
pam_namespace.c:1542:64: error: ‘MS_REC’ undeclared (first use in this function)
pam_namespace.c: In function ‘pam_sm_close_session’:
pam_namespace.c:2089:63: warning: to be safe all intermediate pointers in cast from ‘void
**’ to ‘const void **’ must be ‘const’ qualified [-Wcast-qual]
Can we catch this somehow in the configure script? I don't know
if MS_PRIVATE or MS_REC are meanwhile added to glibc, with glibc 2.11 this
is not the case.
I think that glibc defines are not important, the kernel support is what
matters. The attached patch is correct fix IMO.
--
Tomas Mraz
No matter how far down the wrong road you've gone, turn back.
Turkish proverb