Bugzilla – Attachment 3610 Details for
Bug 2876
PAM_TEXT_INFO and PAM_ERROR_MSG conversation not honoured during PAM authentication
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Extension to Damien Millers patch
PAM.patch (text/plain), 929 bytes, created by
Magnus Svendsen
on 2022-08-06 05:45:26 AEST
(
hide
)
Description:
Extension to Damien Millers patch
Filename:
MIME Type:
Creator:
Magnus Svendsen
Created:
2022-08-06 05:45:26 AEST
Size:
929 bytes
patch
obsolete
>diff --git a/auth-pam.c b/auth-pam.c >index 29034e40..eb24948c 100644 >--- a/auth-pam.c >+++ b/auth-pam.c >@@ -867,15 +867,11 @@ sshpam_query(void *ctx, char **name, char **info, > return (0); > case PAM_ERROR_MSG: > case PAM_TEXT_INFO: >- /* accumulate messages */ >- len = plen + mlen + 2; >- **prompts = xreallocarray(**prompts, 1, len); >- strlcpy(**prompts + plen, msg, len - plen); >- plen += mlen; >- strlcat(**prompts + plen, "\n", len - plen); >- plen++; >+ *num = 2; >+ free(*info); >+ xasprintf(info, "%s\n", msg); > free(msg); >- break; >+ return (0); > case PAM_ACCT_EXPIRED: > case PAM_MAXTRIES: > if (type == PAM_ACCT_EXPIRED) >@@ -983,6 +979,10 @@ sshpam_respond(void *ctx, u_int num, char **resp) > default: > return (-1); > } >+ if (num == 2){ >+ // returning one here continues it seems >+ return (1); >+ } > if (num != 1) { > error("PAM: expected one response, got %u", num); > return (-1);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2876
:
3160
| 3610