mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
run: refuse --root-directory= in --scope mode
As discussed in #39669, let's reject this for now.
This commit is contained in:
@@ -866,6 +866,10 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
"--wait may not be combined with --scope.");
|
||||
}
|
||||
|
||||
if (arg_scope && arg_root_directory)
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"--root-directory= is not supported in --scope mode.");
|
||||
|
||||
if (same_dir && arg_root_directory && !path_equal(arg_root_directory, "/"))
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"--same-dir cannot be used with a root directory other than '/'");
|
||||
|
||||
Reference in New Issue
Block a user