summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/auth2.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssh/auth2.c')
-rw-r--r--crypto/openssh/auth2.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/crypto/openssh/auth2.c b/crypto/openssh/auth2.c
index 4a578c4..b37eb38 100644
--- a/crypto/openssh/auth2.c
+++ b/crypto/openssh/auth2.c
@@ -165,21 +165,17 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt)
if (authctxt->pw && strcmp(service, "ssh-connection")==0) {
authctxt->valid = 1;
debug2("input_userauth_request: setting up authctxt for %s", user);
-#ifdef USE_PAM
- if (options.use_pam)
- PRIVSEP(start_pam(authctxt));
-#endif
} else {
logit("input_userauth_request: invalid user %s", user);
authctxt->pw = fakepw();
-#ifdef USE_PAM
- if (options.use_pam)
- PRIVSEP(start_pam(authctxt));
-#endif
#ifdef SSH_AUDIT_EVENTS
PRIVSEP(audit_event(SSH_INVALID_USER));
#endif
}
+#ifdef USE_PAM
+ if (options.use_pam)
+ PRIVSEP(start_pam(authctxt));
+#endif
setproctitle("%s%s", authctxt->valid ? user : "unknown",
use_privsep ? " [net]" : "");
authctxt->service = xstrdup(service);
OpenPOWER on IntegriCloud