- (dtucker) [auth-pam.c] Relocate struct pam_ctxt and prototypes. No

functional changes.

This is in preparation for a change to catch the authentication thread
exitting unexpectedly, to split functional and cosmetic changes.
This commit is contained in:
Darren Tucker 2004-01-13 22:35:58 +11:00
parent fd0894adae
commit 1b27c8fbcb
2 changed files with 20 additions and 13 deletions

View File

@ -1,3 +1,7 @@
20040113
- (dtucker) [auth-pam.c] Relocate struct pam_ctxt and prototypes. No
functional changes.
20040108 20040108
- (dtucker) [auth-pam.c defines.h] Bug #783: move __unused to defines.h and - (dtucker) [auth-pam.c defines.h] Bug #783: move __unused to defines.h and
only define if not already. From des at freebsd.org. only define if not already. From des at freebsd.org.
@ -1655,4 +1659,4 @@
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple@murple.net, diagnosis from dtucker@zip.com.au Report from murple@murple.net, diagnosis from dtucker@zip.com.au
$Id: ChangeLog,v 1.3165 2004/01/08 13:19:25 dtucker Exp $ $Id: ChangeLog,v 1.3166 2004/01/13 11:35:58 dtucker Exp $

View File

@ -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 $ */ /* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */
#include "includes.h" #include "includes.h"
RCSID("$Id: auth-pam.c,v 1.88 2004/01/08 12:32:04 dtucker Exp $"); RCSID("$Id: auth-pam.c,v 1.89 2004/01/13 11:35:59 dtucker Exp $");
#ifdef USE_PAM #ifdef USE_PAM
#if defined(HAVE_SECURITY_PAM_APPL_H) #if defined(HAVE_SECURITY_PAM_APPL_H)
@ -68,10 +68,23 @@ extern int compat20;
*/ */
typedef pthread_t sp_pthread_t; typedef pthread_t sp_pthread_t;
#else #else
typedef pid_t sp_pthread_t;
#endif
struct pam_ctxt {
sp_pthread_t pam_thread;
int pam_psock;
int pam_csock;
int pam_done;
};
static void sshpam_free_ctx(void *);
static struct pam_ctxt *cleanup_ctxt;
#ifndef USE_POSIX_THREADS
/* /*
* Simulate threads with processes. * Simulate threads with processes.
*/ */
typedef pid_t sp_pthread_t;
static void static void
pthread_exit(void *value __unused) pthread_exit(void *value __unused)
@ -124,16 +137,6 @@ static int sshpam_cred_established = 0;
static int sshpam_account_status = -1; static int sshpam_account_status = -1;
static char **sshpam_env = NULL; static char **sshpam_env = NULL;
struct pam_ctxt {
sp_pthread_t pam_thread;
int pam_psock;
int pam_csock;
int pam_done;
};
static void sshpam_free_ctx(void *);
static struct pam_ctxt *cleanup_ctxt;
/* Some PAM implementations don't implement this */ /* Some PAM implementations don't implement this */
#ifndef HAVE_PAM_GETENVLIST #ifndef HAVE_PAM_GETENVLIST
static char ** static char **