summaryrefslogtreecommitdiff
path: root/auth-chall.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2005-01-20 22:20:50 +1100
committerDarren Tucker <dtucker@zip.com.au>2005-01-20 22:20:50 +1100
commit3c66080aa26e5121805c80728a9c801b08a7870e (patch)
tree350a6cd92438b1ad876622b92557be577e8457b7 /auth-chall.c
parent33bc334a8bb6f20ca659f7d4f4669a04d54bd2e8 (diff)
- (dtucker) [auth-chall.c auth.h auth2-chall.c] Bug #936: Remove pam from
the list of available kbdint devices if UsePAM=no. ok djm@
Diffstat (limited to 'auth-chall.c')
-rw-r--r--auth-chall.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/auth-chall.c b/auth-chall.c
index a9d314dd2..e4f783096 100644
--- a/auth-chall.c
+++ b/auth-chall.c
@@ -28,11 +28,13 @@ RCSID("$OpenBSD: auth-chall.c,v 1.9 2003/11/03 09:03:37 djm Exp $");
28#include "auth.h" 28#include "auth.h"
29#include "log.h" 29#include "log.h"
30#include "xmalloc.h" 30#include "xmalloc.h"
31#include "servconf.h"
31 32
32/* limited protocol v1 interface to kbd-interactive authentication */ 33/* limited protocol v1 interface to kbd-interactive authentication */
33 34
34extern KbdintDevice *devices[]; 35extern KbdintDevice *devices[];
35static KbdintDevice *device; 36static KbdintDevice *device;
37extern ServerOptions options;
36 38
37char * 39char *
38get_challenge(Authctxt *authctxt) 40get_challenge(Authctxt *authctxt)
@@ -41,6 +43,11 @@ get_challenge(Authctxt *authctxt)
41 u_int i, numprompts; 43 u_int i, numprompts;
42 u_int *echo_on; 44 u_int *echo_on;
43 45
46#ifdef USE_PAM
47 if (!options.use_pam)
48 remove_kbdint_device("pam");
49#endif
50
44 device = devices[0]; /* we always use the 1st device for protocol 1 */ 51 device = devices[0]; /* we always use the 1st device for protocol 1 */
45 if (device == NULL) 52 if (device == NULL)
46 return NULL; 53 return NULL;