From: Lennart Poettering Date: Tue, 28 Jul 2020 15:52:48 +0000 (+0200) Subject: tmpfiles: we don't support the combination of --root and --user, hence refuse it X-Git-Tag: v247-rc1~441^2~7 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fsystemd.git;a=commitdiff_plain;h=b63aacaa1ab83ce328d199aea4238c654ceaf0d8 tmpfiles: we don't support the combination of --root and --user, hence refuse it --user only really works with certain env vars such as XDG_RUNTIME_DIR set, but that's just weird if --root= is used. --- diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 3c800d5fa8e..6dad483d8c5 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -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; }