sudo/0001-coverity.patch
Alejandro López 02e5985e44 Rebase sudo to 1.9.17p2
- Resolves: RHEL-122752
2025-10-24 17:37:33 +02:00

39 lines
1.4 KiB
Diff

diff --git a/plugins/sudoers/auth/pam.c b/plugins/sudoers/auth/pam.c
index 973d67b..88d6a52 100644
--- a/plugins/sudoers/auth/pam.c
+++ b/plugins/sudoers/auth/pam.c
@@ -465,11 +465,6 @@ sudo_pam_begin_session(const struct sudoers_context *ctx, struct passwd *pw,
if (pw == NULL) {
if (pamh != NULL) {
rc = pam_end(pamh, PAM_SUCCESS | PAM_DATA_SILENT);
- if (rc != PAM_SUCCESS) {
- errstr = sudo_pam_strerror(pamh, rc);
- sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
- "pam_end: %s", errstr);
- }
pamh = NULL;
}
goto done;
@@ -528,11 +523,6 @@ sudo_pam_begin_session(const struct sudoers_context *ctx, struct passwd *pw,
errstr = sudo_pam_strerror(pamh, rc);
log_warningx(ctx, 0, N_("%s: %s"), "pam_open_session", errstr);
rc = pam_end(pamh, *pam_status | PAM_DATA_SILENT);
- if (rc != PAM_SUCCESS) {
- errstr = sudo_pam_strerror(pamh, rc);
- sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
- "pam_end: %s", errstr);
- }
pamh = NULL;
status = AUTH_ERROR;
goto done;
@@ -588,9 +578,6 @@ sudo_pam_end_session(sudo_auth *auth)
}
rc = pam_end(pamh, PAM_SUCCESS | PAM_DATA_SILENT);
if (rc != PAM_SUCCESS) {
- errstr = sudo_pam_strerror(pamh, rc);
- sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
- "pam_end: %s", errstr);
status = AUTH_ERROR;
}
pamh = NULL;