From b63aacaa1ab83ce328d199aea4238c654ceaf0d8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 28 Jul 2020 17:52:48 +0200 Subject: [PATCH] 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. --- src/tmpfiles/tmpfiles.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 3c800d5fa8..6dad483d8c 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; }