diff options
Diffstat (limited to 'auth2.c')
-rw-r--r-- | auth2.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -156,21 +156,17 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt) | |||
156 | if (authctxt->pw && strcmp(service, "ssh-connection")==0) { | 156 | if (authctxt->pw && strcmp(service, "ssh-connection")==0) { |
157 | authctxt->valid = 1; | 157 | authctxt->valid = 1; |
158 | debug2("input_userauth_request: setting up authctxt for %s", user); | 158 | debug2("input_userauth_request: setting up authctxt for %s", user); |
159 | #ifdef USE_PAM | ||
160 | if (options.use_pam) | ||
161 | PRIVSEP(start_pam(authctxt)); | ||
162 | #endif | ||
163 | } else { | 159 | } else { |
164 | logit("input_userauth_request: invalid user %s", user); | 160 | logit("input_userauth_request: invalid user %s", user); |
165 | authctxt->pw = fakepw(); | 161 | authctxt->pw = fakepw(); |
166 | #ifdef USE_PAM | ||
167 | if (options.use_pam) | ||
168 | PRIVSEP(start_pam(authctxt)); | ||
169 | #endif | ||
170 | #ifdef SSH_AUDIT_EVENTS | 162 | #ifdef SSH_AUDIT_EVENTS |
171 | PRIVSEP(audit_event(SSH_INVALID_USER)); | 163 | PRIVSEP(audit_event(SSH_INVALID_USER)); |
172 | #endif | 164 | #endif |
173 | } | 165 | } |
166 | #ifdef USE_PAM | ||
167 | if (options.use_pam) | ||
168 | PRIVSEP(start_pam(authctxt)); | ||
169 | #endif | ||
174 | setproctitle("%s%s", authctxt->valid ? user : "unknown", | 170 | setproctitle("%s%s", authctxt->valid ? user : "unknown", |
175 | use_privsep ? " [net]" : ""); | 171 | use_privsep ? " [net]" : ""); |
176 | authctxt->service = xstrdup(service); | 172 | authctxt->service = xstrdup(service); |