diff options
-rw-r--r-- | meta/recipes-core/systemd/systemd/0001-analyze-resolve-executable-path-if-it-is-relative.patch | 39 | ||||
-rw-r--r-- | meta/recipes-core/systemd/systemd_247.2.bb | 1 |
2 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0001-analyze-resolve-executable-path-if-it-is-relative.patch b/meta/recipes-core/systemd/systemd/0001-analyze-resolve-executable-path-if-it-is-relative.patch new file mode 100644 index 0000000000..fd7f94a61d --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-analyze-resolve-executable-path-if-it-is-relative.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From b9b7a8e3825f0433e120f7a6d7d5d635a839cab9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mingli Yu <mingli.yu@windriver.com> | ||
3 | Date: Thu, 21 Jan 2021 06:19:44 +0000 | ||
4 | Subject: [PATCH] analyze: resolve executable path if it is relative | ||
5 | |||
6 | Upstream-Status: Backport [https://github.com/systemd/systemd/commit/f1fb046a985521f7d4a662f02546686ff20b7e5d] | ||
7 | |||
8 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
9 | --- | ||
10 | src/analyze/analyze-verify.c | 7 +++++-- | ||
11 | 1 file changed, 5 insertions(+), 2 deletions(-) | ||
12 | |||
13 | diff --git a/src/analyze/analyze-verify.c b/src/analyze/analyze-verify.c | ||
14 | index a9c89173bf..969523df18 100644 | ||
15 | --- a/src/analyze/analyze-verify.c | ||
16 | +++ b/src/analyze/analyze-verify.c | ||
17 | @@ -115,14 +115,17 @@ static int verify_socket(Unit *u) { | ||
18 | } | ||
19 | |||
20 | int verify_executable(Unit *u, const ExecCommand *exec) { | ||
21 | + int r; | ||
22 | + | ||
23 | if (!exec) | ||
24 | return 0; | ||
25 | |||
26 | if (exec->flags & EXEC_COMMAND_IGNORE_FAILURE) | ||
27 | return 0; | ||
28 | |||
29 | - if (access(exec->path, X_OK) < 0) | ||
30 | - return log_unit_error_errno(u, errno, "Command %s is not executable: %m", exec->path); | ||
31 | + r = find_executable_full(exec->path, false, NULL); | ||
32 | + if (r < 0) | ||
33 | + return log_unit_error_errno(u, r, "Command %s is not executable: %m", exec->path); | ||
34 | |||
35 | return 0; | ||
36 | } | ||
37 | -- | ||
38 | 2.26.2 | ||
39 | |||
diff --git a/meta/recipes-core/systemd/systemd_247.2.bb b/meta/recipes-core/systemd/systemd_247.2.bb index 84d997196c..7ddcb169c3 100644 --- a/meta/recipes-core/systemd/systemd_247.2.bb +++ b/meta/recipes-core/systemd/systemd_247.2.bb | |||
@@ -24,6 +24,7 @@ SRC_URI += "file://touchscreen.rules \ | |||
24 | file://0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch \ | 24 | file://0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch \ |
25 | file://0001-logind-Restore-chvt-as-non-root-user-without-polkit.patch \ | 25 | file://0001-logind-Restore-chvt-as-non-root-user-without-polkit.patch \ |
26 | file://0027-proc-dont-trigger-mount-error-with-invalid-options-o.patch \ | 26 | file://0027-proc-dont-trigger-mount-error-with-invalid-options-o.patch \ |
27 | file://0001-analyze-resolve-executable-path-if-it-is-relative.patch \ | ||
27 | " | 28 | " |
28 | 29 | ||
29 | # patches needed by musl | 30 | # patches needed by musl |