summaryrefslogtreecommitdiff
path: root/auth2.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth2.c')
-rw-r--r--auth2.c6
1 files changed, 3 insertions, 3 deletions
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)
150 if (authctxt->attempt++ == 0) { 150 if (authctxt->attempt++ == 0) {
151 /* setup auth context */ 151 /* setup auth context */
152 authctxt->pw = PRIVSEP(getpwnamallow(user)); 152 authctxt->pw = PRIVSEP(getpwnamallow(user));
153 authctxt->user = xstrdup(user);
153 if (authctxt->pw && strcmp(service, "ssh-connection")==0) { 154 if (authctxt->pw && strcmp(service, "ssh-connection")==0) {
154 authctxt->valid = 1; 155 authctxt->valid = 1;
155 debug2("input_userauth_request: setting up authctxt for %s", user); 156 debug2("input_userauth_request: setting up authctxt for %s", user);
156#ifdef USE_PAM 157#ifdef USE_PAM
157 if (options.use_pam) 158 if (options.use_pam)
158 PRIVSEP(start_pam(authctxt->pw->pw_name)); 159 PRIVSEP(start_pam(authctxt));
159#endif 160#endif
160 } else { 161 } else {
161 logit("input_userauth_request: illegal user %s", user); 162 logit("input_userauth_request: illegal user %s", user);
162 authctxt->pw = fakepw(); 163 authctxt->pw = fakepw();
163#ifdef USE_PAM 164#ifdef USE_PAM
164 if (options.use_pam) 165 if (options.use_pam)
165 PRIVSEP(start_pam(user)); 166 PRIVSEP(start_pam(authctxt));
166#endif 167#endif
167 } 168 }
168 setproctitle("%s%s", authctxt->pw ? user : "unknown", 169 setproctitle("%s%s", authctxt->pw ? user : "unknown",
169 use_privsep ? " [net]" : ""); 170 use_privsep ? " [net]" : "");
170 authctxt->user = xstrdup(user);
171 authctxt->service = xstrdup(service); 171 authctxt->service = xstrdup(service);
172 authctxt->style = style ? xstrdup(style) : NULL; 172 authctxt->style = style ? xstrdup(style) : NULL;
173 if (use_privsep) 173 if (use_privsep)