From: Lennart Poettering Date: Wed, 7 May 2025 15:47:01 +0000 (+0200) Subject: exec-util: make missing agents a gracefull handled issues X-Git-Tag: v258-rc1~669 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0d5ee894c4839b8432b530879a7cda070b29e393;p=thirdparty%2Fsystemd.git exec-util: make missing agents a gracefull handled issues Just downgrade the log message in case of ENOENT of agent binaries to LOG_DEBUG. Do this in order to support distros which split off some agent bianries into separate optional binaries. Fixes: #37369 --- diff --git a/src/shared/exec-util.c b/src/shared/exec-util.c index 75f24aef985..99dc4d597cd 100644 --- a/src/shared/exec-util.c +++ b/src/shared/exec-util.c @@ -618,6 +618,10 @@ int _fork_agent(const char *name, char * const *argv, const int except[], size_t /* Count arguments */ execv(argv[0], argv); - log_error_errno(errno, "Failed to execute %s: %m", argv[0]); + + /* Let's treat missing agent binary as a graceful issue (in order to support splitting out the Polkit + * or password agents into separate, optional distro packages), and not complain loudly. */ + log_full_errno(errno == ENOENT ? LOG_DEBUG : LOG_ERR, errno, + "Failed to execute %s: %m", argv[0]); _exit(EXIT_FAILURE); }