From: Daan De Meyer Date: Tue, 12 May 2026 13:03:49 +0000 (+0000) Subject: vmspawn: Prefer systemd-journal-remote from $PATH X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=408d474dfa1a320cfa650b7624f9efdf55f639f2;p=thirdparty%2Fsystemd.git vmspawn: Prefer systemd-journal-remote from $PATH $PATH might point to a systemd checkout containing a newer version of systemd-journal-remote which we should use, hence prefer an executable from $PATH over the one from /usr/lib/systemd. --- diff --git a/src/shared/fork-notify.c b/src/shared/fork-notify.c index 0a34c491b7a..ce9d9656772 100644 --- a/src/shared/fork-notify.c +++ b/src/shared/fork-notify.c @@ -287,13 +287,15 @@ int fork_journal_remote( return log_error_errno(r, "Failed to find systemd-socket-activate binary: %m"); _cleanup_free_ char *sd_journal_remote = NULL; - r = find_executable_full( - "systemd-journal-remote", - /* root= */ NULL, - STRV_MAKE(LIBEXECDIR), - /* use_path_envvar= */ true, - &sd_journal_remote, - /* ret_fd= */ NULL); + r = find_executable("systemd-journal-remote", &sd_journal_remote); + if (r == -ENOENT) + r = find_executable_full( + "systemd-journal-remote", + /* root= */ NULL, + STRV_MAKE(LIBEXECDIR), + /* use_path_envvar= */ false, + &sd_journal_remote, + /* ret_fd= */ NULL); if (r < 0) return log_error_errno(r, "Failed to find systemd-journal-remote binary: %m");