summaryrefslogtreecommitdiffstats
path: root/auth2.c
diff options
context:
space:
mode:
authorKevin Steves <stevesk@pobox.com>2002-03-22 20:43:05 +0000
committerKevin Steves <stevesk@pobox.com>2002-03-22 20:43:05 +0000
commit205cc1ef461d0c6996dc3757e52e229b5053274b (patch)
treee587c1178897b898957ae39e0357008322563778 /auth2.c
parent1adb12077974ba849984df5fd81e3c1bca327a25 (diff)
- (stevesk) [auth2.c] merge cleanup/sync
Diffstat (limited to 'auth2.c')
-rw-r--r--auth2.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/auth2.c b/auth2.c
index 98e1eda1..3377fde8 100644
--- a/auth2.c
+++ b/auth2.c
@@ -184,14 +184,12 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt)
if (authctxt->attempt++ == 0) {
/* setup auth context */
- struct passwd *pw = NULL;
- pw = PRIVSEP(getpwnamallow(user));
- if (pw && strcmp(service, "ssh-connection")==0) {
- authctxt->pw = pwcopy(pw);
+ authctxt->pw = PRIVSEP(getpwnamallow(user));
+ if (authctxt->pw && strcmp(service, "ssh-connection")==0) {
authctxt->valid = 1;
debug2("input_userauth_request: setting up authctxt for %s", user);
#ifdef USE_PAM
- start_pam(pw->pw_name);
+ start_pam(authctxt->pw->pw_name);
#endif
} else {
log("input_userauth_request: illegal user %s", user);