diff options
Diffstat (limited to 'auth2-chall.c')
-rw-r--r-- | auth2-chall.c | 21 |
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 |
42 | extern KbdintDevice bsdauth_device; | 42 | extern KbdintDevice bsdauth_device; |
43 | #else | 43 | #else |
44 | #ifdef USE_PAM | ||
45 | extern KbdintDevice sshpam_device; | ||
46 | #endif | ||
44 | #ifdef SKEY | 47 | #ifdef SKEY |
45 | extern KbdintDevice skey_device; | 48 | extern 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) | |||
320 | void | 326 | void |
321 | privsep_challenge_enable(void) | 327 | privsep_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 | } |