summaryrefslogtreecommitdiff
path: root/auth-pam.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2004-03-30 20:57:57 +1000
committerDarren Tucker <dtucker@zip.com.au>2004-03-30 20:57:57 +1000
commit17addf04639a3fa1bbe7c0b8d7acfbf1893e8e18 (patch)
treeb9cbbab5a44c62b03b1cc1ff533668948da9c608 /auth-pam.c
parent809031f6c45c11fc0f6fd132502160171427674e (diff)
- (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@
Diffstat (limited to 'auth-pam.c')
-rw-r--r--auth-pam.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/auth-pam.c b/auth-pam.c
index 6f2264c5d..13ada737c 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -31,7 +31,7 @@
31 31
32/* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */ 32/* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */
33#include "includes.h" 33#include "includes.h"
34RCSID("$Id: auth-pam.c,v 1.98 2004/03/08 12:04:06 dtucker Exp $"); 34RCSID("$Id: auth-pam.c,v 1.99 2004/03/30 10:57:57 dtucker Exp $");
35 35
36#ifdef USE_PAM 36#ifdef USE_PAM
37#if defined(HAVE_SECURITY_PAM_APPL_H) 37#if defined(HAVE_SECURITY_PAM_APPL_H)
@@ -160,7 +160,7 @@ static int sshpam_session_open = 0;
160static int sshpam_cred_established = 0; 160static int sshpam_cred_established = 0;
161static int sshpam_account_status = -1; 161static int sshpam_account_status = -1;
162static char **sshpam_env = NULL; 162static char **sshpam_env = NULL;
163static Authctxt *the_authctxt = NULL; 163static Authctxt *sshpam_authctxt = NULL;
164 164
165/* Some PAM implementations don't implement this */ 165/* Some PAM implementations don't implement this */
166#ifndef HAVE_PAM_GETENVLIST 166#ifndef HAVE_PAM_GETENVLIST
@@ -180,9 +180,9 @@ void
180pam_password_change_required(int reqd) 180pam_password_change_required(int reqd)
181{ 181{
182 debug3("%s %d", __func__, reqd); 182 debug3("%s %d", __func__, reqd);
183 if (the_authctxt == NULL) 183 if (sshpam_authctxt == NULL)
184 fatal("%s: PAM authctxt not initialized", __func__); 184 fatal("%s: PAM authctxt not initialized", __func__);
185 the_authctxt->force_pwchange = reqd; 185 sshpam_authctxt->force_pwchange = reqd;
186 if (reqd) { 186 if (reqd) {
187 no_port_forwarding_flag |= 2; 187 no_port_forwarding_flag |= 2;
188 no_agent_forwarding_flag |= 2; 188 no_agent_forwarding_flag |= 2;
@@ -341,7 +341,7 @@ sshpam_thread(void *ctxtp)
341 sshpam_conv.conv = sshpam_thread_conv; 341 sshpam_conv.conv = sshpam_thread_conv;
342 sshpam_conv.appdata_ptr = ctxt; 342 sshpam_conv.appdata_ptr = ctxt;
343 343
344 if (the_authctxt == NULL) 344 if (sshpam_authctxt == NULL)
345 fatal("%s: PAM authctxt not initialized", __func__); 345 fatal("%s: PAM authctxt not initialized", __func__);
346 346
347 buffer_init(&buffer); 347 buffer_init(&buffer);
@@ -356,7 +356,7 @@ sshpam_thread(void *ctxtp)
356 if (compat20) { 356 if (compat20) {
357 if (!do_pam_account()) 357 if (!do_pam_account())
358 goto auth_fail; 358 goto auth_fail;
359 if (the_authctxt->force_pwchange) { 359 if (sshpam_authctxt->force_pwchange) {
360 sshpam_err = pam_chauthtok(sshpam_handle, 360 sshpam_err = pam_chauthtok(sshpam_handle,
361 PAM_CHANGE_EXPIRED_AUTHTOK); 361 PAM_CHANGE_EXPIRED_AUTHTOK);
362 if (sshpam_err != PAM_SUCCESS) 362 if (sshpam_err != PAM_SUCCESS)
@@ -370,7 +370,7 @@ sshpam_thread(void *ctxtp)
370#ifndef USE_POSIX_THREADS 370#ifndef USE_POSIX_THREADS
371 /* Export variables set by do_pam_account */ 371 /* Export variables set by do_pam_account */
372 buffer_put_int(&buffer, sshpam_account_status); 372 buffer_put_int(&buffer, sshpam_account_status);
373 buffer_put_int(&buffer, the_authctxt->force_pwchange); 373 buffer_put_int(&buffer, sshpam_authctxt->force_pwchange);
374 374
375 /* Export any environment strings set in child */ 375 /* Export any environment strings set in child */
376 for(i = 0; environ[i] != NULL; i++) 376 for(i = 0; environ[i] != NULL; i++)
@@ -469,7 +469,7 @@ sshpam_init(Authctxt *authctxt)
469 debug("PAM: initializing for \"%s\"", user); 469 debug("PAM: initializing for \"%s\"", user);
470 sshpam_err = 470 sshpam_err =
471 pam_start(SSHD_PAM_SERVICE, user, &null_conv, &sshpam_handle); 471 pam_start(SSHD_PAM_SERVICE, user, &null_conv, &sshpam_handle);
472 the_authctxt = authctxt; 472 sshpam_authctxt = authctxt;
473 473
474 if (sshpam_err != PAM_SUCCESS) { 474 if (sshpam_err != PAM_SUCCESS) {
475 pam_end(sshpam_handle, sshpam_err); 475 pam_end(sshpam_handle, sshpam_err);