diff options
author | Darren Tucker <dtucker@zip.com.au> | 2004-03-08 13:04:06 +0100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2004-03-08 13:04:06 +0100 |
commit | dbf7a74ee569a9544276db42eb7aee1141072a24 (patch) | |
tree | f9aea6fab5efea9441557696611b04a065ad8128 /auth2.c | |
parent | - (dtucker) [configure.ac sshd.c openbsd-compat/bsd-misc.h (diff) | |
download | openssh-dbf7a74ee569a9544276db42eb7aee1141072a24.tar.xz openssh-dbf7a74ee569a9544276db42eb7aee1141072a24.zip |
- (dtucker) [auth-pam.c auth-pam.h auth1.c auth2.c monitor.c monitor_wrap.c
monitor_wrap.h] Bug #808: Ensure force_pwchange is correctly initialized
even if keyboard-interactive is not used by the client. Prevents segfaults
in some cases where the user's password is expired (note this is not
considered a security exposure). ok djm@
Diffstat (limited to 'auth2.c')
-rw-r--r-- | auth2.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -150,24 +150,24 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt) if (authctxt->attempt++ == 0) { /* setup auth context */ authctxt->pw = PRIVSEP(getpwnamallow(user)); + authctxt->user = xstrdup(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 if (options.use_pam) - PRIVSEP(start_pam(authctxt->pw->pw_name)); + PRIVSEP(start_pam(authctxt)); #endif } else { logit("input_userauth_request: illegal user %s", user); authctxt->pw = fakepw(); #ifdef USE_PAM if (options.use_pam) - PRIVSEP(start_pam(user)); + PRIVSEP(start_pam(authctxt)); #endif } setproctitle("%s%s", authctxt->pw ? user : "unknown", use_privsep ? " [net]" : ""); - authctxt->user = xstrdup(user); authctxt->service = xstrdup(service); authctxt->style = style ? xstrdup(style) : NULL; if (use_privsep) |