<div dir="ltr"><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Feb 11, 2025 at 5:53 PM Steve Traylen <<a href="mailto:steve.traylen@cern.ch">steve.traylen@cern.ch</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"><br>
Units like "systemd-resolved.service" contain with good reason: <br>
"ProtectSystem=strict"<br>
<br>
This of course bind mounts mounted filesystems into the units userspace.<br>
<br>
"strict" is<br>
<br>
"If set to "strict" the entire file system hierarchy is mounted <br>
read-only, except for the API file system subtrees /dev/, /proc/ and /sys/"<br>
<br>
Can these filesystems /dev, /proc, /sys be extended globally somewhere?<br></blockquote><div><br></div><div>AFAIK, extending this list would only mean those filesystems get bind-mounted RW, not that they don't get bind-mounted at all.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
There is the perfectly good: "InaccessiblePaths=-/cvmfs" which does a <br>
great job of not mounting /cvmfs into the name space but alas this<br>
is a per unit setting of course AFAIK.<br>
<br>
Motivation here is that when "funny" filesystems (think /afs, /cvmfsm, <br>
... /eos ) go "bad" for what ever reason this can stop "reload <br>
systemd-resolved.service" being restarted as remount is bad. I've not <br>
tried but can may be reproduce with something more standard like a stale <br>
/nfs.<br>
<br>
Any way to set a default for InaccessiblePaths= or equivalent to stop <br>
these FSs being bind mounted in ever.<br></blockquote><div><br></div><div>I was about to suggest that configs in "-.service.d/" would apply to all service units (as extension from the recently added "someprefix-.service.d/" feature). But of course not all services live in a mount namespace, and not all of them *want* to live in a mount namespace... and I don't think there is a way to define InaccessiblePaths= only for those which already have namespacing active in some way.</div><div><br></div></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr">Mantas Mikulėnas</div></div></div>