diff options
author | Damien Miller <djm@mindrot.org> | 2003-05-10 19:28:02 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2003-05-10 19:28:02 +1000 |
commit | 4f9f42a9bb6a6aa8f6100d873dc6344f2f9994de (patch) | |
tree | f81c39146e1cfabb4b198f57f60453b2dcaac299 /auth2-chall.c | |
parent | c437cda328b4733b59a7ed028b72e6b7f58f86e6 (diff) |
- (djm) Merge FreeBSD PAM code: replaces PAM password auth kludge with
proper challenge-response module
Diffstat (limited to 'auth2-chall.c')
-rw-r--r-- | auth2-chall.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/auth2-chall.c b/auth2-chall.c index 0d1709307..12e3cc934 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 |
@@ -323,15 +329,22 @@ privsep_challenge_enable(void) | |||
323 | #ifdef BSD_AUTH | 329 | #ifdef BSD_AUTH |
324 | extern KbdintDevice mm_bsdauth_device; | 330 | extern KbdintDevice mm_bsdauth_device; |
325 | #endif | 331 | #endif |
332 | #ifdef USE_PAM | ||
333 | extern KbdintDevice mm_sshpam_device; | ||
334 | #endif | ||
326 | #ifdef SKEY | 335 | #ifdef SKEY |
327 | extern KbdintDevice mm_skey_device; | 336 | extern KbdintDevice mm_skey_device; |
328 | #endif | 337 | #endif |
329 | /* As long as SSHv1 has devices[0] hard coded this is fine */ | 338 | int n = 0; |
339 | |||
330 | #ifdef BSD_AUTH | 340 | #ifdef BSD_AUTH |
331 | devices[0] = &mm_bsdauth_device; | 341 | devices[n++] = &mm_bsdauth_device; |
332 | #else | 342 | #else |
343 | #ifdef USE_PAM | ||
344 | devices[n++] = &mm_sshpam_device; | ||
345 | #endif | ||
333 | #ifdef SKEY | 346 | #ifdef SKEY |
334 | devices[0] = &mm_skey_device; | 347 | devices[n++] = &mm_skey_device; |
335 | #endif | 348 | #endif |
336 | #endif | 349 | #endif |
337 | } | 350 | } |