summaryrefslogtreecommitdiff
path: root/auth2-chall.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth2-chall.c')
-rw-r--r--auth2-chall.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/auth2-chall.c b/auth2-chall.c
index 0d1709307..aacbf0bcc 100644
--- a/auth2-chall.c
+++ b/auth2-chall.c
@@ -41,6 +41,9 @@ static void input_userauth_info_response(int, u_int32_t, void *);
41#ifdef BSD_AUTH 41#ifdef BSD_AUTH
42extern KbdintDevice bsdauth_device; 42extern KbdintDevice bsdauth_device;
43#else 43#else
44#ifdef USE_PAM
45extern KbdintDevice sshpam_device;
46#endif
44#ifdef SKEY 47#ifdef SKEY
45extern KbdintDevice skey_device; 48extern KbdintDevice skey_device;
46#endif 49#endif
@@ -50,6 +53,9 @@ KbdintDevice *devices[] = {
50#ifdef BSD_AUTH 53#ifdef BSD_AUTH
51 &bsdauth_device, 54 &bsdauth_device,
52#else 55#else
56#ifdef USE_PAM
57 &sshpam_device,
58#endif
53#ifdef SKEY 59#ifdef SKEY
54 &skey_device, 60 &skey_device,
55#endif 61#endif
@@ -320,18 +326,27 @@ input_userauth_info_response(int type, u_int32_t seq, void *ctxt)
320void 326void
321privsep_challenge_enable(void) 327privsep_challenge_enable(void)
322{ 328{
329#if defined(BSD_AUTH) || defined(USE_PAM) || defined(SKEY)
330 int n = 0;
331#endif
323#ifdef BSD_AUTH 332#ifdef BSD_AUTH
324 extern KbdintDevice mm_bsdauth_device; 333 extern KbdintDevice mm_bsdauth_device;
325#endif 334#endif
335#ifdef USE_PAM
336 extern KbdintDevice mm_sshpam_device;
337#endif
326#ifdef SKEY 338#ifdef SKEY
327 extern KbdintDevice mm_skey_device; 339 extern KbdintDevice mm_skey_device;
328#endif 340#endif
329 /* As long as SSHv1 has devices[0] hard coded this is fine */ 341
330#ifdef BSD_AUTH 342#ifdef BSD_AUTH
331 devices[0] = &mm_bsdauth_device; 343 devices[n++] = &mm_bsdauth_device;
332#else 344#else
345#ifdef USE_PAM
346 devices[n++] = &mm_sshpam_device;
347#endif
333#ifdef SKEY 348#ifdef SKEY
334 devices[0] = &mm_skey_device; 349 devices[n++] = &mm_skey_device;
335#endif 350#endif
336#endif 351#endif
337} 352}