<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 28, 2015 at 1:39 PM, Lennart Poettering <span dir="ltr"><<a href="mailto:lennart@poettering.net" target="_blank">lennart@poettering.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span>On Tue, 28.04.15 13:17, Mantas Mikulėnas (<a href="mailto:grawity@gmail.com" target="_blank">grawity@gmail.com</a>) wrote:<br>
<br>
> > Moreover, when this is set up<br>
> > the mount propagation from the user's namespace to the rest of system<br>
> > must be turned off for the root directory, and this will break general<br>
> > assumptions around mounting things through tools like "su" or "sudo"<br>
> > then, as those mounts will not propagate to the rest of the system<br>
> > either...<br>
><br>
> Wondering how the existing pam_namespace deals with this. Maybe / could be<br>
> kept shared, just /tmp made private.<br>
<br>
</span>No, the propagation rules control if submounts of a mount are<br>
propagated. If you intend to mount something on /tmp, then the<br>
propagation rules of / are the ones that matter.<br></blockquote><div><br></div><div>I mean when /tmp itself is already a mountpoint, e.g. a bind mount on top of itself (a common hack), then it has its own propagation mode, which will be honored when mounting something at /tmp too, not just underneath.</div><div><br></div><div>(out) mount --bind /tmp /tmp</div><div>(out) mount --make-private /tmp</div>(out) unshare --mount</div>(in) mount -t tmpfs none /tmp</div><div class="gmail_extra">(out&in) findmnt</div><div class="gmail_extra"><br></div><div class="gmail_extra">Really unnecessarily complex, but possible.<br clear="all"><div><br></div>-- <br><div><div dir="ltr">Mantas Mikulėnas <<a href="mailto:grawity@gmail.com" target="_blank">grawity@gmail.com</a>></div></div>
</div></div>