]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nspawn: comment to acknowledge lying about "user session"
authorAlan Jenkins <alan.christopher.jenkins@gmail.com>
Sun, 17 Sep 2017 13:53:14 +0000 (14:53 +0100)
committerAlan Jenkins <alan.christopher.jenkins@gmail.com>
Wed, 18 Oct 2017 08:47:10 +0000 (09:47 +0100)
src/nspawn/nspawn.c

index 4e3803be822168984b6523167e424e1919c1dd0f..991bf5e9c79d84d3e88939de62e1ee912dfb6f79 100644 (file)
@@ -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;
         }