From 9414b9d65cdc953c2436ba0a607b149e4b4cde1a Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Fri, 5 Mar 2004 16:26:32 +0000 Subject: Really pick up upstream fix for OpenSSH bug #808, a segfault. The previous auth-pam.c change was in fact a different bug. --- auth2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'auth2.c') diff --git a/auth2.c b/auth2.c index a9490ccfd..1177efa73 100644 --- a/auth2.c +++ b/auth2.c @@ -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) -- cgit v1.2.3