Repository navigation
creds: make available to all ExecStartPre= and ExecStart= processes - #27279
Conversation
|
Any reason not to make these available to stop/reload commands too? |
YHNdnzj
left a comment
There was a problem hiding this comment.
Would like @poettering's comment on ExecStop= and friends
|
loading credentials might involve socket activation and stuff. And that's something you really shouldn't rely on during shutdown, hence I'd be very careful with loading creds in ExecStop=. Sounds OK to load in ExecStartPre=, but let's be careful otherwise. |
|
i am not the maintainer of the stable git tree, but I'd not consider this backport worthy. It's an entirely new feature, not a regression nor a bug. This never was supposed. Sounds OK to support it, but that's a new thing. |
Not really, this already works without sandboxing - it's only adding a sandboxing option that results in a mount namespace being used that breaks it, but it works otherwise. Hence why to me it's a bug fix, as that's an unexpected behaviour. |
hmm? can't parse this. |
Creds work with any number of ExecStartPre and ExecStart processes before this change, as long as there was no mount namespace in use by the unit. It's only when a mount namespace is enabled that it broke and this fix is needed. Hence, to me, it's a bug fix, because that's quite unexpected and clearly not documented. |
|
are you sure that's the case? i mean, sure creds survived if namespaces are off, but at least for ExecStartPre= that#s not the case. either way, i would claim it's mostly a side-effect that this ever worked for any setup tha tis not ExecMain. |
Yes: |
This is similar to systemd#27275 - currently, we set up credentials in service_run_next_control() but not in service_enter_start_post(), causing the first ExecStartPost= command to fail to access credentials when using namespacing (see also systemd#27279). Let's set EXEC_WRITE_CREDENTIALS in service_enter_start_post() too. Fixes systemd#31194
This seems to be a mistake in systemd#27279. I believe credentials should not be made available to reload tasks - they should only signal the main process about reloading and wait for that to complete.
This seems to be a mistake in systemd#27279. I believe credentials should not be made available to reload tasks - they should only signal the main process about reloading and wait for that to complete.
This seems to be a mistake in systemd#27279. I believe credentials should not be made available to reload tasks - they should only signal the main process about reloading and wait for that to complete.
This seems to be a mistake in systemd#27279. I believe credentials should not be made available to reload tasks - they should only signal the main process about reloading and wait for that to complete.
This seems to be a mistake in systemd#27279. I believe credentials should not be made available to condition or reload tasks. In most cases they're irrelevant from the actual job of the service. Also, currently the first ExecCondition= or ExecReload= cannot access creds anyway, making the incompatibility introduced negligible. If people actually come up with valid use cases, we can always revisit this.
|
Note that I nack'd this as a fix in #24291 (comment) |
Fixes #27275