- (dtucker) [auth-pam.c] rename the_authctxt to sshpam_authctxt in auth-pam.c

to reduce potential confusion with the one in sshd.c.  ok djm@
This commit is contained in:
Darren Tucker 2004-03-30 20:57:57 +10:00
parent 809031f6c4
commit 17addf0463
2 changed files with 11 additions and 9 deletions

View File

@ -1,6 +1,8 @@
20040330
- (dtucker) [configure.ac] Bug #811: Use "!" for LOCKED_PASSWD_PREFIX on
Linuxes, since that's what many use. ok djm@
- (dtucker) [auth-pam.c] rename the_authctxt to sshpam_authctxt in auth-pam.c
to reduce potential confusion with the one in sshd.c. ok djm@
20040327
- (dtucker) [session.c] Bug #817: Clear loginmsg after fork to prevent
@ -926,4 +928,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
$Id: ChangeLog,v 1.3297 2004/03/30 04:03:45 dtucker Exp $
$Id: ChangeLog,v 1.3298 2004/03/30 10:57:57 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 $ */
#include "includes.h"
RCSID("$Id: auth-pam.c,v 1.98 2004/03/08 12:04:06 dtucker Exp $");
RCSID("$Id: auth-pam.c,v 1.99 2004/03/30 10:57:57 dtucker Exp $");
#ifdef USE_PAM
#if defined(HAVE_SECURITY_PAM_APPL_H)
@ -160,7 +160,7 @@ static int sshpam_session_open = 0;
static int sshpam_cred_established = 0;
static int sshpam_account_status = -1;
static char **sshpam_env = NULL;
static Authctxt *the_authctxt = NULL;
static Authctxt *sshpam_authctxt = NULL;
/* Some PAM implementations don't implement this */
#ifndef HAVE_PAM_GETENVLIST
@ -180,9 +180,9 @@ void
pam_password_change_required(int reqd)
{
debug3("%s %d", __func__, reqd);
if (the_authctxt == NULL)
if (sshpam_authctxt == NULL)
fatal("%s: PAM authctxt not initialized", __func__);
the_authctxt->force_pwchange = reqd;
sshpam_authctxt->force_pwchange = reqd;
if (reqd) {
no_port_forwarding_flag |= 2;
no_agent_forwarding_flag |= 2;
@ -341,7 +341,7 @@ sshpam_thread(void *ctxtp)
sshpam_conv.conv = sshpam_thread_conv;
sshpam_conv.appdata_ptr = ctxt;
if (the_authctxt == NULL)
if (sshpam_authctxt == NULL)
fatal("%s: PAM authctxt not initialized", __func__);
buffer_init(&buffer);
@ -356,7 +356,7 @@ sshpam_thread(void *ctxtp)
if (compat20) {
if (!do_pam_account())
goto auth_fail;
if (the_authctxt->force_pwchange) {
if (sshpam_authctxt->force_pwchange) {
sshpam_err = pam_chauthtok(sshpam_handle,
PAM_CHANGE_EXPIRED_AUTHTOK);
if (sshpam_err != PAM_SUCCESS)
@ -370,7 +370,7 @@ sshpam_thread(void *ctxtp)
#ifndef USE_POSIX_THREADS
/* Export variables set by do_pam_account */
buffer_put_int(&buffer, sshpam_account_status);
buffer_put_int(&buffer, the_authctxt->force_pwchange);
buffer_put_int(&buffer, sshpam_authctxt->force_pwchange);
/* Export any environment strings set in child */
for(i = 0; environ[i] != NULL; i++)
@ -469,7 +469,7 @@ sshpam_init(Authctxt *authctxt)
debug("PAM: initializing for \"%s\"", user);
sshpam_err =
pam_start(SSHD_PAM_SERVICE, user, &null_conv, &sshpam_handle);
the_authctxt = authctxt;
sshpam_authctxt = authctxt;
if (sshpam_err != PAM_SUCCESS) {
pam_end(sshpam_handle, sshpam_err);