<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED NOTABUG - PrivateTmp works incorrectly with `mount --make-rprivate /`"
href="https://bugs.freedesktop.org/show_bug.cgi?id=70856#c8">Comment # 8</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED NOTABUG - PrivateTmp works incorrectly with `mount --make-rprivate /`"
href="https://bugs.freedesktop.org/show_bug.cgi?id=70856">bug 70856</a>
from <span class="vcard"><a class="email" href="mailto:lennart@poettering.net" title="Lennart Poettering <lennart@poettering.net>"> <span class="fn">Lennart Poettering</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=70856#c7">comment #7</a>)
<span class="quote">> However, `mount --make-rprivate /` is needed to get LXC containers to work.</span >
I don't think that is true. I have no experience with LXC, but libvirt-lxc and
systemd-nspawn have no issue with this at all. If LXC chokes on this it should
really be fixed. LXC needs to do the same as nspawn and libvirt-lxc and do the
equivalent of "mount --make-rslave /" *after* creating the container's fs
namespace, from inside of it, in order to stop propagation of mounts from the
container into the host but not vice versa.
<span class="quote">> I mean that if service is not using `PrivateTmp` option, then any unmounts
> are propagated to the processes running inside service. Even if `mount
> --make-rprivate /` was issued before.
>
> So, problem arises ONLY if PrivateTmp and make-rprivate using together.</span >
Yes. That's correct. So don't use make-rprivate on root. it's incompatible with
privatetmp.
<span class="quote">> Please, take a careful look on scenario I attached at first comment.
>
> Unmounts are propagated:
> # mount --make-rprivate /
> # mount blahblah /mnt
> # systemctl start ntpd (without PrivateTmp option in ntpd.service)
> # umount /mnt
>
> Unmounts are NOT propagated and unmounting /mnt CAUSES A PROBLEM:
> # mount --make-rprivate /
> # mount blahblah /mnt
> # systemctl start ntpd (WITH PrivateTmp option in ntpd.service, which is
> default)
> # umount /mnt
>
> Hope it is clear enough...</span >
Yeah, again, we don't support this. Either stop using PrivateTmp= or stop using
make-rprivate on root. We don't support both in combination. Sorry.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>