From 0626f71d90df6aba62523c111cfbce13a51273fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 28 Mar 2023 18:50:31 +0200
Subject: [PATCH] shared/exec-util: null_or_empty_path() does not return
 boolean

We shouldn't report that the file is empty if the stating fails. Let's do the
same as in other places, and just ignore the error and let the subsequent
operation fail.

(cherry picked from commit 7d0c47dad0d4282c3924a654a8fe18fc5d7766f8)
(cherry picked from commit bfc03cae41ae051c9eedcb48f66b3266346719aa)
(cherry picked from commit 48e03955356c5095553ac9c26e4fea83af3814ee)

Conflict:NA
Reference:https://github.com/systemd/systemd-stable/commit/0626f71d90df6aba62523c111cfbce13a51273fb
---
 src/shared/exec-util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/shared/exec-util.c b/src/shared/exec-util.c
index d1f50249d0..d188154575 100644
--- a/src/shared/exec-util.c
+++ b/src/shared/exec-util.c
@@ -38,7 +38,7 @@ static int do_spawn(const char *path, char *argv[], int stdout_fd, pid_t *pid, b
         pid_t _pid;
         int r;
 
-        if (null_or_empty_path(path)) {
+        if (null_or_empty_path(path) > 0) {
                 log_debug("%s is empty (a mask).", path);
                 return 0;
         }
-- 
2.33.0

