From: Yu Watanabe Date: Tue, 20 Feb 2024 02:09:43 +0000 (+0900) Subject: analyze: skip to check ExecCommand for .mount and .swap units X-Git-Tag: v256-rc1~803 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=142f0e951752d925b073c1c9ede52df617b45be9;p=thirdparty%2Fsystemd.git analyze: skip to check ExecCommand for .mount and .swap units They are not set by a unit file, but dynamically generated. Fixes a bug caused by abf0ccc1c6fb81fdcb801566695600a518a28b43. Fixes #31396. --- diff --git a/src/analyze/analyze-verify-util.c b/src/analyze/analyze-verify-util.c index bc61ebe2b17..3e5adcab2ef 100644 --- a/src/analyze/analyze-verify-util.c +++ b/src/analyze/analyze-verify-util.c @@ -201,10 +201,6 @@ static int verify_executables(Unit *u, const char *root) { assert(u); - if (u->type == UNIT_MOUNT) - FOREACH_ARRAY(i, MOUNT(u)->exec_command, ELEMENTSOF(MOUNT(u)->exec_command)) - RET_GATHER(r, verify_executable(u, i, root)); - if (u->type == UNIT_SERVICE) FOREACH_ARRAY(i, SERVICE(u)->exec_command, ELEMENTSOF(SERVICE(u)->exec_command)) LIST_FOREACH(command, j, *i) @@ -215,10 +211,6 @@ static int verify_executables(Unit *u, const char *root) { LIST_FOREACH(command, j, *i) RET_GATHER(r, verify_executable(u, j, root)); - if (u->type == UNIT_SWAP) - FOREACH_ARRAY(i, SWAP(u)->exec_command, ELEMENTSOF(SWAP(u)->exec_command)) - RET_GATHER(r, verify_executable(u, i, root)); - return r; }