<p dir="ltr"><br>
Il 06/apr/2015 22:54, "Michael H. Warfield" <<a href="mailto:mhw@wittsend.com">mhw@wittsend.com</a>> ha scritto:<br>
><br>
> On Mon, 2015-04-06 at 16:17 -0400, Chris Burroughs wrote:<br>
> > On 04/01/2015 12:54 PM, Michael H. Warfield wrote:<br>
> > > Doing a read-only bind mount is marginal at best. We've had issues with<br>
> > > remounts in containers propagating out (that I think/hope are finally<br>
> > > fixed) and some containers need mount privs in order to mount images or<br>
> > > do nfs/afs/cifs mounts, so prohibiting the cap_sysadmin is not a viable<br>
> > > option in general there.<br>
><br>
> > With the centos default templates (ie with CAP_SYS_ADMIN) + privileged<br>
> > container the remount is allowed: mount -o remount,rw /dev/foo /lib/modules/<br>
><br>
> > From your 'think/hope' comment it sounded like you were expecting<br>
> > something besides CAP_SYS_ADMIN to be able to stop the remount, but I'm<br>
> > not sure what that mechanism would be.<br>
><br>
> No... The old OLD problem was that if you mounted it RO, a container<br>
> could remounted it RW (or vice versa), which was one thing, but then,<br>
> under certain conditions and file systems, that change would be<br>
> propagated to the host and to other containers. I THINK we got that<br>
> problem solved a while back with a careful selection of bind mounts and<br>
> mount options but I haven't retested it in years. It's not the<br>
> prevention of the remount, it's the prevention of the propagation of the<br>
> changes from the container making to the changes to the host and<br>
> containers which did not.</p>
<p dir="ltr">On Debian at least, it still has some problems as I've reported here on the ML: Deb 8 && Lxc 1.0.6. <br>
An host fs, configured to be bind-mounted ro in the guest is actually accessible as rw (in the guest).<br>
The guest can than remount it as ro, but than the host fs becomes ro! Clearly not a desirable event.</p>
<p dir="ltr">More infos on my previous thread.</p>
<p dir="ltr">-- Marco<br></p>