Bugzilla – Attachment 3091 Details for
Bug 2408
Expose authentication information to PAM
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Expose SSH_AUTH_INFO_0 to PAM auth
openssh-7.6-pam-auth-expose.patch (text/plain), 1.67 KB, created by
Radoslaw Ejsmont
on 2017-11-24 18:52:30 AEDT
(
hide
)
Description:
Expose SSH_AUTH_INFO_0 to PAM auth
Filename:
MIME Type:
Creator:
Radoslaw Ejsmont
Created:
2017-11-24 18:52:30 AEDT
Size:
1.67 KB
patch
obsolete
>diff -Naur openssh-7.6p1/auth-pam.c openssh-7.6p1-patched/auth-pam.c >--- openssh-7.6p1/auth-pam.c 2017-10-02 19:34:26.000000000 +0000 >+++ openssh-7.6p1-patched/auth-pam.c 2017-11-22 20:30:42.714063858 +0000 >@@ -665,6 +665,27 @@ > return (0); > } > >+static void >+expose_authinfo(const char *caller) >+{ >+ char *auth_info; >+ >+ /* >+ * Expose authentication information to PAM. >+ * The enviornment variable is versioned. Please increment the >+ * version suffix if the format of session_info changes. >+ */ >+ if (sshpam_authctxt->session_info == NULL) >+ auth_info = xstrdup(""); >+ else if ((auth_info = sshbuf_dup_string( >+ sshpam_authctxt->session_info)) == NULL) >+ fatal("%s: sshbuf_dup_string failed", __func__); >+ >+ debug2("%s: auth information in SSH_AUTH_INFO_0", caller); >+ do_pam_putenv("SSH_AUTH_INFO_0", auth_info); >+ free(auth_info); >+} >+ > static void * > sshpam_init_ctx(Authctxt *authctxt) > { >@@ -685,6 +706,7 @@ > return (NULL); > } > >+ expose_authinfo(__func__); > ctxt = xcalloc(1, sizeof *ctxt); > > /* Start the authentication thread */ >@@ -926,26 +948,6 @@ > sshpam_cleanup(); > } > >-static void >-expose_authinfo(const char *caller) >-{ >- char *auth_info; >- >- /* >- * Expose authentication information to PAM. >- * The enviornment variable is versioned. Please increment the >- * version suffix if the format of session_info changes. >- */ >- if (sshpam_authctxt->session_info == NULL) >- auth_info = xstrdup(""); >- else if ((auth_info = sshbuf_dup_string( >- sshpam_authctxt->session_info)) == NULL) >- fatal("%s: sshbuf_dup_string failed", __func__); >- >- debug2("%s: auth information in SSH_AUTH_INFO_0", caller); >- do_pam_putenv("SSH_AUTH_INFO_0", auth_info); >- free(auth_info); >-}
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
Flags:
dtucker
:
ok+
Actions:
View
|
Diff
Attachments on
bug 2408
:
2754
|
2791
|
2792
|
2812
|
2846
|
2978
|
2980
|
2999
|
3022
|
3089
| 3091