diff options
author | Mike Yuan <me@yhndnzj.com> | 2023-10-18 15:22:19 +0200 |
---|---|---|
committer | Mike Yuan <me@yhndnzj.com> | 2023-10-19 15:37:33 +0200 |
commit | dbc0342e61aae84d29d52284949ae6070c6abc60 (patch) | |
tree | a03dc36b8f7408fa0f56d8a4d08043fa07b2de2e | |
parent | core/namespace: merge if blocks (diff) | |
download | systemd-dbc0342e61aae84d29d52284949ae6070c6abc60.tar.xz systemd-dbc0342e61aae84d29d52284949ae6070c6abc60.zip |
core/exec-invoke: use correct exit status
These calls can fail not only due to OOM.
-rw-r--r-- | src/core/exec-invoke.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c index b6ab421a8d..c6ef2953c8 100644 --- a/src/core/exec-invoke.c +++ b/src/core/exec-invoke.c @@ -4524,7 +4524,7 @@ int exec_invoke( ngids_after_pam = getgroups_alloc(&gids_after_pam); if (ngids_after_pam < 0) { - *exit_status = EXIT_MEMORY; + *exit_status = EXIT_GROUP; return log_exec_error_errno(context, params, ngids_after_pam, "Failed to obtain groups after setting up PAM: %m"); } } @@ -4632,7 +4632,7 @@ int exec_invoke( ngids_after_pam, &gids_to_enforce); if (ngids_to_enforce < 0) { - *exit_status = EXIT_MEMORY; + *exit_status = EXIT_GROUP; return log_exec_error_errno(context, params, ngids_to_enforce, "Failed to merge group lists. Group membership might be incorrect: %m"); |