systemd user service with NoNewPrivileges=true fails without an existing user namespace #14404
eriksjolund
started this conversation in
General
Replies: 2 comments 8 replies
-
The restricted service test.service (with
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Did you consider using |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I made an experiment on a Fedora 36 system
/root/prepare.sh
with this file contentsnewuidmap is run without its extra capabilities due to
NoNewPrivileges=true
and thus fails.test.service first failed to start, but after running
podman unshare /bin/true
, starting test.service succeeded.Conclusion: When the systemd directive
is used in a systemd user service, the podman pause process (catatonit) must already be running because newuidmap and newgidmap can't be used.
It seems test.service should be modified to depend on another systemd service that runs the pause process.
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions