summaryrefslogtreecommitdiff
path: root/auth2-chall.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-05-10 19:28:02 +1000
committerDamien Miller <djm@mindrot.org>2003-05-10 19:28:02 +1000
commit4f9f42a9bb6a6aa8f6100d873dc6344f2f9994de (patch)
treef81c39146e1cfabb4b198f57f60453b2dcaac299 /auth2-chall.c
parentc437cda328b4733b59a7ed028b72e6b7f58f86e6 (diff)
downloadopenssh-git-4f9f42a9bb6a6aa8f6100d873dc6344f2f9994de.tar.gz
- (djm) Merge FreeBSD PAM code: replaces PAM password auth kludge withAFTER_FREEBSD_PAM_MERGE
proper challenge-response module
Diffstat (limited to 'auth2-chall.c')
-rw-r--r--auth2-chall.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/auth2-chall.c b/auth2-chall.c
index 0d170930..12e3cc93 100644
--- a/auth2-chall.c
+++ b/auth2-chall.c
@@ -41,6 +41,9 @@ static void input_userauth_info_response(int, u_int32_t, void *);
#ifdef BSD_AUTH
extern KbdintDevice bsdauth_device;
#else
+#ifdef USE_PAM
+extern KbdintDevice sshpam_device;
+#endif
#ifdef SKEY
extern KbdintDevice skey_device;
#endif
@@ -50,6 +53,9 @@ KbdintDevice *devices[] = {
#ifdef BSD_AUTH
&bsdauth_device,
#else
+#ifdef USE_PAM
+ &sshpam_device,
+#endif
#ifdef SKEY
&skey_device,
#endif
@@ -323,15 +329,22 @@ privsep_challenge_enable(void)
#ifdef BSD_AUTH
extern KbdintDevice mm_bsdauth_device;
#endif
+#ifdef USE_PAM
+ extern KbdintDevice mm_sshpam_device;
+#endif
#ifdef SKEY
extern KbdintDevice mm_skey_device;
#endif
- /* As long as SSHv1 has devices[0] hard coded this is fine */
+ int n = 0;
+
#ifdef BSD_AUTH
- devices[0] = &mm_bsdauth_device;
+ devices[n++] = &mm_bsdauth_device;
#else
+#ifdef USE_PAM
+ devices[n++] = &mm_sshpam_device;
+#endif
#ifdef SKEY
- devices[0] = &mm_skey_device;
+ devices[n++] = &mm_skey_device;
#endif
#endif
}