From: Ronan Pigott Date: Mon, 29 Jun 2026 19:14:58 +0000 (-0700) Subject: run: do not munge user.slice with --slice-inherit X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7eed8858d7cbdc10ac048552164ad8d3510df846;p=thirdparty%2Fsystemd.git run: do not munge user.slice with --slice-inherit When using --slice-inherit, setting arg_slice would inadvertently munge user.slice into the current user slice, usually producing a slice name like user-1000-user.slice. This is treated as a user-UID slice by user-.slice.d/10-defaults.conf, resulting in a strange description: literally "User slice for UID user" (instead of an actual user UID). Keep arg_slice empty when using --slice-inherit so that we actually inherit from the relevant slice instead of a munged version. Fixes: #42601 --- diff --git a/src/run/run.c b/src/run/run.c index 2e37a0a2f63..168cd2f4e67 100644 --- a/src/run/run.c +++ b/src/run/run.c @@ -1049,7 +1049,7 @@ static int parse_argv_sudo_mode(int argc, char *argv[]) { strv_free_and_replace(arg_cmdline, l); - if (!arg_slice) { + if (!custom_slice) { arg_slice = strdup(SPECIAL_USER_SLICE); if (!arg_slice) return log_oom();