service: drop a service's group when the configuration drops it

Changing a service from @alice:wheel to @alice, or removing group from
a block, and reloading kept the service running as group wheel, also
after a restart.

The group is only set when the configuration has one, and on reload
the service is updated in place, so the old one stayed.

Clear it before parsing, like a new service gets it.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-11-17 06:21:25 +01:00
1 parent de73b06415
commit bf42811a13
3 files changed
+30 -5

No files matched your search

+3
View File
@@ -147,6 +147,9 @@ All relevant changes are documented in this file.
`@user:group,sup1,sup2,...`. The list may now be up to 511 characters.
Groups dropped from a service's configuration are now also dropped the
next time it starts, before they lingered until reboot
- Fix a service's group lingering after it was dropped from the
configuration, e.g. `@alice:wheel` changed to `@alice` kept running as
`wheel` until reboot
- `stop:` and `reload:` scripts take a timeout of their own, `stop:5,/path`,
defaulting to the kill delay as before. Such a line used to crash Finit at
config load