]> andersk Git - gssapi-openssh.git/blobdiff - openssh/auth2.c
merged OpenSSH 3.8.1p1 to trunk
[gssapi-openssh.git] / openssh / auth2.c
index eaa377f29af6c7b52ac7f274be1d6c07f8d31c88..03fe49e272199738e19f7912ded479f48e2cf8c3 100644 (file)
@@ -200,19 +200,20 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt)
                } else {
 #endif
                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
                }
 #ifdef GSSAPI
@@ -220,7 +221,6 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt)
 #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 && (authctxt->attempt == 1))
This page took 0.035909 seconds and 4 git commands to generate.