tmpfiles: we don't support the combination of --root and --user, hence refuse it
authorLennart Poettering <lennart@poettering.net>
Tue, 28 Jul 2020 15:52:48 +0000 (17:52 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 5 Aug 2020 18:26:25 +0000 (20:26 +0200)
--user only really works with certain env vars such as XDG_RUNTIME_DIR
set, but that's just weird if --root= is used.

src/tmpfiles/tmpfiles.c

index 3c800d5..6dad483 100644 (file)
@@ -3065,6 +3065,10 @@ static int parse_argv(int argc, char *argv[]) {
                 return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
                                        "When --replace= is given, some configuration items must be specified");
 
+        if (arg_root && arg_user)
+                return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
+                                       "Combination of --user and --root= is not supported.");
+
         return 1;
 }