Skip to content

Commit 15d378c

Browse files
ldv-altsolardiz
authored andcommitted
pam_tcb: use _pam_delete in the compat implementation of pam_prompt
1 parent 52edebb commit 15d378c

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2024-10-17 Dmitry V. Levin <ldv at owl.openwall.com>
2+
3+
pam_tcb: Use _pam_delete in the compat implementation of pam_prompt.
4+
* pam_tcb/compat.c (pam_prompt): Use _pam_delete instead of
5+
_pam_overwrite followed by _pam_drop.
6+
17
2023-01-21 Dmitry V. Levin <ldv at owl.openwall.com>
28

39
Use setgroups syscall instead of the libc function.

pam_tcb/compat.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,9 @@ pam_prompt(pam_handle_t *pamh, int style, char **response, const char *fmt, ...)
108108
if (response)
109109
*response = pam_resp == NULL ? NULL : pam_resp->resp;
110110
else if (pam_resp && pam_resp->resp)
111-
{
112-
_pam_overwrite(pam_resp->resp);
113-
_pam_drop(pam_resp->resp);
114-
}
115-
_pam_overwrite(msgbuf);
111+
_pam_delete(pam_resp->resp);
112+
_pam_delete(msgbuf);
116113
_pam_drop(pam_resp);
117-
free(msgbuf);
118114
if (retval != PAM_SUCCESS)
119115
pam_syslog(pamh, LOG_ERR, "Conversation failure: %s",
120116
pam_strerror(pamh, retval));

0 commit comments

Comments
 (0)