2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-09-01 23:05:17 +00:00

Add pam_silent sudoers option.

Inspired by PR #368
GitHub issue #216
This commit is contained in:
Todd C. Miller
2024-04-17 19:30:11 -06:00
parent f0823c70c6
commit ecdf0c80f3
7 changed files with 109 additions and 68 deletions

View File

@@ -318,7 +318,7 @@ sudo_pam_verify(const struct sudoers_context *ctx, struct passwd *pw,
}
/* PAM_SILENT prevents the authentication service from generating output. */
*pam_status = pam_authenticate(pamh, PAM_SILENT);
*pam_status = pam_authenticate(pamh, def_pam_silent ? PAM_SILENT : 0);
/* Restore def_prompt, the passed-in prompt may be freed later. */
def_prompt = PASSPROMPT;