diff options
Diffstat (limited to 'pkgs/os-specific/linux/systemd/0022-path-util-make-find_executable-work-without-proc-mou.patch')
-rw-r--r-- | pkgs/os-specific/linux/systemd/0022-path-util-make-find_executable-work-without-proc-mou.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/systemd/0022-path-util-make-find_executable-work-without-proc-mou.patch b/pkgs/os-specific/linux/systemd/0022-path-util-make-find_executable-work-without-proc-mou.patch new file mode 100644 index 00000000000..c0701a56d02 --- /dev/null +++ b/pkgs/os-specific/linux/systemd/0022-path-util-make-find_executable-work-without-proc-mou.patch @@ -0,0 +1,33 @@ +From 04eef1fb8e2a52277e051eb7980e96f9acc0afaa Mon Sep 17 00:00:00 2001 +From: Yu Watanabe <watanabe.yu+github@gmail.com> +Date: Mon, 23 Aug 2021 06:16:48 +0900 +Subject: [PATCH 22/22] path-util: make find_executable() work without /proc + mounted + +Follow-up for 888f65ace6296ed61285d31db846babf1c11885e. + +Hopefully fixes #20514. +--- + src/basic/path-util.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/basic/path-util.c b/src/basic/path-util.c +index e5afb5f5f5..13d71ed1b6 100644 +--- a/src/basic/path-util.c ++++ b/src/basic/path-util.c +@@ -628,7 +628,11 @@ static int check_x_access(const char *path, int *ret_fd) { + return r; + + r = access_fd(fd, X_OK); +- if (r < 0) ++ if (r == -ENOSYS) { ++ /* /proc is not mounted. Fallback to access(). */ ++ if (access(path, X_OK) < 0) ++ return -errno; ++ } else if (r < 0) + return r; + + if (ret_fd) +-- +2.33.0 + |