mirror of
https://github.com/systemd/systemd.git
synced 2025-08-02 04:22:27 +03:00
run: handle gracefully if we can't find binary client-side due to perms
Fixes: #35022
This commit is contained in:
committed by
Luca Boccassi
parent
ee95e86ae1
commit
9810899ef2
@ -2576,10 +2576,12 @@ static int run(int argc, char* argv[]) {
|
||||
|
||||
_cleanup_free_ char *command = NULL;
|
||||
r = find_executable(arg_cmdline[0], &command);
|
||||
if (r < 0)
|
||||
if (ERRNO_IS_NEG_PRIVILEGE(r))
|
||||
log_debug_errno(r, "Failed to find executable '%s' due to permission problems, leaving path as is: %m", arg_cmdline[0]);
|
||||
else if (r < 0)
|
||||
return log_error_errno(r, "Failed to find executable %s: %m", arg_cmdline[0]);
|
||||
|
||||
free_and_replace(arg_cmdline[0], command);
|
||||
else
|
||||
free_and_replace(arg_cmdline[0], command);
|
||||
}
|
||||
|
||||
if (!arg_description) {
|
||||
|
Reference in New Issue
Block a user