From b0e7c6141f3eec84e138c1e2d42c224c70b50c2c Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Thu, 13 Nov 2025 21:17:08 +0100 Subject: [PATCH 1/3] efivars: insert a newline below fstat() call --- src/basic/efivars.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/basic/efivars.c b/src/basic/efivars.c index f54c3d22e9..1d874a9172 100644 --- a/src/basic/efivars.c +++ b/src/basic/efivars.c @@ -68,6 +68,7 @@ int efi_get_variable( if (fstat(fd, &st) < 0) return log_debug_errno(errno, "fstat(\"%s\") failed: %m", p); + r = stat_verify_regular(&st); if (r < 0) return log_debug_errno(r, "EFI variable '%s' is not a regular file, refusing: %m", p); From 045b8d761e7d9c06781c44cc91977046616241ab Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Thu, 13 Nov 2025 21:09:52 +0100 Subject: [PATCH 2/3] run: refuse --root-directory= in --scope mode As discussed in #39669, let's reject this for now. --- src/run/run.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/run/run.c b/src/run/run.c index 9c79f99d11..1286ae176e 100644 --- a/src/run/run.c +++ b/src/run/run.c @@ -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 '/'"); From fa0ac03a5668fdd032bc6a01ab48c81acca63c2d Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Thu, 13 Nov 2025 21:08:50 +0100 Subject: [PATCH 3/3] stdio-bridge: remove unreachable return --- src/stdio-bridge/stdio-bridge.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/stdio-bridge/stdio-bridge.c b/src/stdio-bridge/stdio-bridge.c index 441d8c655a..52c87559a4 100644 --- a/src/stdio-bridge/stdio-bridge.c +++ b/src/stdio-bridge/stdio-bridge.c @@ -114,8 +114,6 @@ static int bus_set_address( const char *bus_path, RuntimeScope runtime_scope) { - int r; - assert(bus); switch (transport) { @@ -143,8 +141,6 @@ static int bus_set_address( default: assert_not_reached(); } - - return r; } static int run(int argc, char *argv[]) {