diff options
author | Darren Tucker <dtucker@zip.com.au> | 2005-09-24 12:43:51 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2005-09-24 12:43:51 +1000 |
commit | d3eff2bfa56dbb37dbb2ea25cf4804193411ba4f (patch) | |
tree | 91bd402b9d31dda195482a332816b2686be82ee9 /auth2.c | |
parent | 82171c66075254a6aedc0bde704b604da32c2ba4 (diff) |
- (dtucker) [auth2.c] Move start_pam() calls out of if-else block to remove
duplicate call. ok djm@
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); |