mirror of
https://github.com/troglobit/finit.git
synced 2026-11-23 20:11:44 +00:00
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:
3 files changed
+30
-5
No files matched your search
@@ -2492,6 +2492,7 @@ svc_t *service_register_desc(int type, char *cfg, const char *desc,
|
||||
svc_unblock(svc);
|
||||
}
|
||||
|
||||
svc->group[0] = 0;
|
||||
svc->supgroups[0] = 0;
|
||||
if (username) {
|
||||
char *ptr = strchr(username, ':');
|
||||
|
||||
Reference in new issue
Block a user