From 33d697322be8bf957ec4e1caebcf5a7c2028015f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 6 Aug 2018 21:44:45 +0200 Subject: logind: rework how we manage the slice and user-runtime-dir@.service unit for each user Instead of managing it explicitly, let's simplify things and rely on regular Wants=/Requires= dependencies to pull in these units from user@.service and the session scope, and StopWhenUneeded= to stop these auxiliary units again. This way, they can be pulled in easily by unrelated units too. This simplifies things quite a bit: for each session we now only need to manage the session scope, and for each user the user@.service, the other units are not something we need to manage anymore. This patch also makes sure that if user@.service of a user is masked we will continue to work, and user-runtime-dir@.service will still be correctly pulled in, as it is now a dependency of the scope unit. Fixes: #9461 Replaces: #5546 (cherry picked from commit 25a1ab4ed48b72e974f77a68dcbe3521014787bb) --- src/login/logind-user.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/login/logind-user.h') diff --git a/src/login/logind-user.h b/src/login/logind-user.h index 9c6dcf074..f8d40b409 100644 --- a/src/login/logind-user.h +++ b/src/login/logind-user.h @@ -25,12 +25,13 @@ struct User { char *name; char *state_file; char *runtime_path; - char *slice; - char *service; + + char *slice; /* user-UID.slice */ + char *service; /* user@UID.service */ + char *runtime_dir_service; /* user-runtime-dir@UID.service */ #if 0 /// UNNEEDED by elogind char *service_job; - char *slice_job; #endif // 0 Session *display; -- cgit v1.2.3