]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
analyze: don't open systemd-executor needlessly 30165/head
authorMike Yuan <me@yhndnzj.com>
Thu, 23 Nov 2023 12:53:50 +0000 (20:53 +0800)
committerMike Yuan <me@yhndnzj.com>
Thu, 23 Nov 2023 12:58:20 +0000 (20:58 +0800)
Fixes #30162

src/analyze/analyze-condition.c
src/analyze/analyze-security.c
src/analyze/analyze-verify-util.c

index f5d874b9c7cb201881580a56ba4ed8a3ac325484..3b290e032306c54af1987166c661aa9543138a7f 100644 (file)
@@ -92,7 +92,7 @@ static int verify_conditions(char **lines, RuntimeScope scope, const char *unit,
                 assert_se(set_unit_path(var) >= 0);
         }
 
-        r = manager_new(scope, MANAGER_TEST_RUN_MINIMAL, &m);
+        r = manager_new(scope, MANAGER_TEST_RUN_MINIMAL|MANAGER_TEST_DONT_OPEN_EXECUTOR, &m);
         if (r < 0)
                 return log_error_errno(r, "Failed to initialize manager: %m");
 
index 2745100f5d98b4b25673879eb83188770c25cd39..b119ad735138d364dde2c33f03cc0b8428214896 100644 (file)
@@ -2690,6 +2690,7 @@ static int offline_security_checks(
                 MANAGER_TEST_RUN_MINIMAL |
                 MANAGER_TEST_RUN_ENV_GENERATORS |
                 MANAGER_TEST_RUN_IGNORE_DEPENDENCIES |
+                MANAGER_TEST_DONT_OPEN_EXECUTOR |
                 run_generators * MANAGER_TEST_RUN_GENERATORS;
 
         _cleanup_(manager_freep) Manager *m = NULL;
index 5bba388dfc988276cc6e5b762d1815ea7fe157ff..622a10f6b07558cbad0ae2b0877dc5f1c887c9b2 100644 (file)
@@ -242,6 +242,7 @@ int verify_units(
         const ManagerTestRunFlags flags =
                 MANAGER_TEST_RUN_MINIMAL |
                 MANAGER_TEST_RUN_ENV_GENERATORS |
+                MANAGER_TEST_DONT_OPEN_EXECUTOR |
                 (recursive_errors == RECURSIVE_ERRORS_NO) * MANAGER_TEST_RUN_IGNORE_DEPENDENCIES |
                 run_generators * MANAGER_TEST_RUN_GENERATORS;