<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 18, 2024 at 2:14 PM Thomas Köller <<a href="mailto:thomas@koeller.dyndns.org">thomas@koeller.dyndns.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> Does it use any hardening options at all?<br>
<br>
Thanks for the hint. As it seems this is an undocumented side effect of <br>
'ProtectSystem = full'. From reading the docs I got the impression that <br>
only file system access is affected by this parameter.<br>
</blockquote></div><div><br></div><div>Yes, but namespace persistence actually relies on filesystem access – it's implemented as a bind-mount of the namespace file descriptor (onto /run/netns for the 'ip netns' tool), as otherwise namespaces only exist as long as processes that hold them.</div><div><br></div><div>So if you have any service options that cause a new *mount* namespace to be created (preventing its filesystem mounts from being visible outside the unit), then it cannot pin persistent network namespaces.</div><div><br></div><div>(It's also a bit overkill to use ProtectSystem for this kind of script, really.)<br></div><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr">Mantas Mikulėnas</div></div></div>