diff options
author | Damien Miller <djm@mindrot.org> | 2003-09-02 23:12:06 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2003-09-02 23:12:06 +1000 |
commit | f4b6f10deda4413528ddb5ffbb69c5da84ae58b9 (patch) | |
tree | e38a7d136c6f303ff1f4cfbb8d094cb8a9799ada /auth-pam.c | |
parent | 0b56b45d6f54215718d0547581247fdc879c527b (diff) |
- (djm) Don't initialise pam_conv structures inline. Avoids HP/UX compiler
error. Part of Bug #423, patch from michael_steffens AT hp.com
Diffstat (limited to 'auth-pam.c')
-rw-r--r-- | auth-pam.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -31,7 +31,7 @@ /* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */ #include "includes.h" -RCSID("$Id: auth-pam.c,v 1.68 2003/08/26 01:58:16 dtucker Exp $"); +RCSID("$Id: auth-pam.c,v 1.69 2003/09/02 13:12:06 djm Exp $"); #ifdef USE_PAM #include <security/pam_appl.h> @@ -199,7 +199,7 @@ sshpam_thread(void *ctxtp) { struct pam_ctxt *ctxt = ctxtp; Buffer buffer; - struct pam_conv sshpam_conv = { sshpam_thread_conv, ctxt }; + struct pam_conv sshpam_conv; #ifndef USE_POSIX_THREADS const char *pam_user; @@ -207,6 +207,9 @@ sshpam_thread(void *ctxtp) setproctitle("%s [pam]", pam_user); #endif + sshpam_conv.conv = sshpam_thread_conv; + sshpam_conv.appdata_ptr = ctxt; + buffer_init(&buffer); sshpam_err = pam_set_item(sshpam_handle, PAM_CONV, (const void *)&sshpam_conv); @@ -634,7 +637,10 @@ pam_chauthtok_conv(int n, const struct pam_message **msg, void do_pam_chauthtok(void) { - struct pam_conv pam_conv = { pam_chauthtok_conv, NULL }; + struct pam_conv pam_conv; + + pam_conv.conv = pam_chauthtok_conv; + pam_conv.appdata_ptr = NULL; if (use_privsep) fatal("Password expired (unable to change with privsep)"); |