summaryrefslogtreecommitdiff
path: root/auth2.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth2.c')
-rw-r--r--auth2.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/auth2.c b/auth2.c
index bb25597e7..f12440815 100644
--- a/auth2.c
+++ b/auth2.c
@@ -163,21 +163,17 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt)
163 if (authctxt->pw && strcmp(service, "ssh-connection")==0) { 163 if (authctxt->pw && strcmp(service, "ssh-connection")==0) {
164 authctxt->valid = 1; 164 authctxt->valid = 1;
165 debug2("input_userauth_request: setting up authctxt for %s", user); 165 debug2("input_userauth_request: setting up authctxt for %s", user);
166#ifdef USE_PAM
167 if (options.use_pam)
168 PRIVSEP(start_pam(authctxt));
169#endif
170 } else { 166 } else {
171 logit("input_userauth_request: invalid user %s", user); 167 logit("input_userauth_request: invalid user %s", user);
172 authctxt->pw = fakepw(); 168 authctxt->pw = fakepw();
173#ifdef USE_PAM
174 if (options.use_pam)
175 PRIVSEP(start_pam(authctxt));
176#endif
177#ifdef SSH_AUDIT_EVENTS 169#ifdef SSH_AUDIT_EVENTS
178 PRIVSEP(audit_event(SSH_INVALID_USER)); 170 PRIVSEP(audit_event(SSH_INVALID_USER));
179#endif 171#endif
180 } 172 }
173#ifdef USE_PAM
174 if (options.use_pam)
175 PRIVSEP(start_pam(authctxt));
176#endif
181 setproctitle("%s%s", authctxt->valid ? user : "unknown", 177 setproctitle("%s%s", authctxt->valid ? user : "unknown",
182 use_privsep ? " [net]" : ""); 178 use_privsep ? " [net]" : "");
183 authctxt->service = xstrdup(service); 179 authctxt->service = xstrdup(service);