summaryrefslogtreecommitdiffstats
path: root/src/login
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:28:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:28:16 +0000
commit6341b7a467c18d6e03bf56e32d516ed3dca6e80c (patch)
tree84262c0a568a2d869b75c0cf165969b6b0e6ca27 /src/login
parentAdding debian version 256.5-2. (diff)
downloadsystemd-6341b7a467c18d6e03bf56e32d516ed3dca6e80c.tar.xz
systemd-6341b7a467c18d6e03bf56e32d516ed3dca6e80c.zip
Merging upstream version 256.6.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/login')
-rw-r--r--src/login/logind-dbus.c12
-rw-r--r--src/login/logind-dbus.h1
-rw-r--r--src/login/logind-session.c8
3 files changed, 17 insertions, 4 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index ceff268..b0c4896 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -4264,6 +4264,7 @@ int manager_start_scope(
const char *slice,
const char *description,
const char * const *requires,
+ const char * const *wants,
const char * const *extra_after,
const char *requires_mounts_for,
sd_bus_message *more_properties,
@@ -4313,6 +4314,16 @@ int manager_start_scope(
return r;
}
+ STRV_FOREACH(i, wants) {
+ r = sd_bus_message_append(m, "(sv)", "Wants", "as", 1, *i);
+ if (r < 0)
+ return r;
+
+ r = sd_bus_message_append(m, "(sv)", "After", "as", 1, *i);
+ if (r < 0)
+ return r;
+ }
+
STRV_FOREACH(i, extra_after) {
r = sd_bus_message_append(m, "(sv)", "After", "as", 1, *i);
if (r < 0)
@@ -4375,6 +4386,7 @@ int manager_start_scope(
slice,
description,
requires,
+ wants,
extra_after,
requires_mounts_for,
more_properties,
diff --git a/src/login/logind-dbus.h b/src/login/logind-dbus.h
index 8459d04..d965ba9 100644
--- a/src/login/logind-dbus.h
+++ b/src/login/logind-dbus.h
@@ -32,6 +32,7 @@ int manager_start_scope(
const char *slice,
const char *description,
const char * const *requires,
+ const char * const *wants,
const char * const *extra_after,
const char *requires_mounts_for,
sd_bus_message *more_properties,
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index 4713aa0..4758cb9 100644
--- a/src/login/logind-session.c
+++ b/src/login/logind-session.c
@@ -746,15 +746,15 @@ static int session_start_scope(Session *s, sd_bus_message *properties, sd_bus_er
s->user->slice,
description,
/* These should have been pulled in explicitly in user_start(). Just to be sure. */
- STRV_MAKE_CONST(s->user->runtime_dir_unit,
- SESSION_CLASS_WANTS_SERVICE_MANAGER(s->class) ? s->user->service_manager_unit : NULL),
+ /* requires = */ STRV_MAKE_CONST(s->user->runtime_dir_unit),
+ /* wants = */ STRV_MAKE_CONST(SESSION_CLASS_WANTS_SERVICE_MANAGER(s->class) ? s->user->service_manager_unit : NULL),
/* We usually want to order session scopes after systemd-user-sessions.service
* since the unit is used as login session barrier for unprivileged users. However
* the barrier doesn't apply for root as sysadmin should always be able to log in
* (and without waiting for any timeout to expire) in case something goes wrong
* during the boot process. */
- STRV_MAKE_CONST("systemd-logind.service",
- SESSION_CLASS_IS_EARLY(s->class) ? NULL : "systemd-user-sessions.service"),
+ /* extra_after = */ STRV_MAKE_CONST("systemd-logind.service",
+ SESSION_CLASS_IS_EARLY(s->class) ? NULL : "systemd-user-sessions.service"),
user_record_home_directory(s->user->user_record),
properties,
error,