From: Alan Jenkins Date: Sun, 17 Sep 2017 13:53:14 +0000 (+0100) Subject: nspawn: comment to acknowledge lying about "user session" X-Git-Tag: v236~212^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8d9c2bca41b03fd113edd2fe66dd88c3894debd3;p=thirdparty%2Fsystemd.git nspawn: comment to acknowledge lying about "user session" --- diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 4e3803be822..991bf5e9c79 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -1120,6 +1120,8 @@ static int parse_argv(int argc, char *argv[]) { arg_userns_chown = true; if (arg_keep_unit && arg_register && cg_pid_get_owner_uid(0, NULL) >= 0) { + /* Save the user from accidentally registering either user-$SESSION.scope or user@.service. + * The latter is not technically a user session, but we don't need to labour the point. */ log_error("--keep-unit --register=yes may not be used when invoked from a user session."); return -EINVAL; }