-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core/namespace: Protect{Hostname,KernelTunables} and ProcSubset=pid #22206
Labels
Comments
/cc @topimiettinen |
|
brauner
added a commit
to brauner/systemd
that referenced
this issue
Jan 24, 2022
Rename the normalize_mounts() helper to drop_unused_mounts. All the helper called in there drop mounts that are unused for a variety of reasons. But the helper it self speaks of "normalizing" mounts which sounds like paths are simplified etc. Make it more obvious what it does by renaming it and by documenting it. Link: systemd#22206
I found the culprit; it's |
brauner
added a commit
to brauner/systemd
that referenced
this issue
Jan 24, 2022
Rename the normalize_mounts() helper to drop_unused_mounts. All the helpers called in there get rid of mounts that are unused for a variety of reasons. And whereas the helpers are aptly prefixed with "drop" the overall helper isn't and instead uses "normalize". Make it more obvious what the helper actually does by renaming the it from normalize_mounts() to drop_unused_mounts(). Readers of code calling this helper will immediately see that it will get rid of unused mounts. Link: systemd#22206
brauner
added a commit
to brauner/systemd
that referenced
this issue
Jan 24, 2022
Rename the normalize_mounts() helper to drop_unused_mounts. All the helpers called in there get rid of mounts that are unused for a variety of reasons. And whereas the helpers are aptly prefixed with "drop" the overall helper isn't and instead uses "normalize". Make it more obvious what the helper actually does by renaming it from normalize_mounts() to drop_unused_mounts(). Readers of code calling this helper will immediately see that it will get rid of unused mounts. Link: systemd#22206
bluca
pushed a commit
to systemd/systemd-stable
that referenced
this issue
Feb 15, 2022
Rename the normalize_mounts() helper to drop_unused_mounts. All the helpers called in there get rid of mounts that are unused for a variety of reasons. And whereas the helpers are aptly prefixed with "drop" the overall helper isn't and instead uses "normalize". Make it more obvious what the helper actually does by renaming it from normalize_mounts() to drop_unused_mounts(). Readers of code calling this helper will immediately see that it will get rid of unused mounts. Link: systemd/systemd#22206 (cherry picked from commit fbf90c0)
bluca
pushed a commit
to systemd/systemd-stable
that referenced
this issue
Feb 15, 2022
Rename the normalize_mounts() helper to drop_unused_mounts. All the helpers called in there get rid of mounts that are unused for a variety of reasons. And whereas the helpers are aptly prefixed with "drop" the overall helper isn't and instead uses "normalize". Make it more obvious what the helper actually does by renaming it from normalize_mounts() to drop_unused_mounts(). Readers of code calling this helper will immediately see that it will get rid of unused mounts. Link: systemd/systemd#22206 (cherry picked from commit fbf90c0) (cherry picked from commit 09936a7)
bluca
pushed a commit
to bluca/systemd-stable
that referenced
this issue
Nov 4, 2022
Rename the normalize_mounts() helper to drop_unused_mounts. All the helpers called in there get rid of mounts that are unused for a variety of reasons. And whereas the helpers are aptly prefixed with "drop" the overall helper isn't and instead uses "normalize". Make it more obvious what the helper actually does by renaming it from normalize_mounts() to drop_unused_mounts(). Readers of code calling this helper will immediately see that it will get rid of unused mounts. Link: systemd/systemd#22206 (cherry picked from commit fbf90c0) (cherry picked from commit 09936a7) (cherry picked from commit 2540b0e)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is with systemd 250.
Starting any service with:
currently fails. A fix for this is waiting in #22203. That fix should be sound.
What I don't understand and would really like an explanation for is why the addition of
ProtectKernelTunables=true
makes a service with the aforementioned options work again:I can understand it conceptually of course since
ProtectSubset=pid
implicitly protects the files underProtectKernelTunables
andProtectHostname
by not even exposing them anymore inproc
. But I don't understand where in the code and howprotect_kernel_tunables
andprotect_hostname
interact with each other such thatprotect_kernel_tunables
cancelsprotect_hostname
and makes things work again.The text was updated successfully, but these errors were encountered: