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