View | Details | Raw Unified | Return to bug 936 | Differences between
and this patch

Collapse All | Expand All

(-)auth-chall.c (+7 lines)
Lines 28-38 RCSID("$OpenBSD: auth-chall.c,v 1.9 2003 Link Here
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
34
extern KbdintDevice *devices[];
35
extern KbdintDevice *devices[];
35
static KbdintDevice *device;
36
static KbdintDevice *device;
37
extern ServerOptions options;
36
38
37
char *
39
char *
38
get_challenge(Authctxt *authctxt)
40
get_challenge(Authctxt *authctxt)
Lines 40-45 get_challenge(Authctxt *authctxt) Link Here
40
	char *challenge, *name, *info, **prompts;
42
	char *challenge, *name, *info, **prompts;
41
	u_int i, numprompts;
43
	u_int i, numprompts;
42
	u_int *echo_on;
44
	u_int *echo_on;
45
46
#ifdef USE_PAM
47
	if (!options.use_pam)
48
		remove_kbdint_device("pam");
49
#endif
43
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)
(-)auth.h (+2 lines)
Lines 130-135 int auth_shadow_pwexpired(Authctxt *); Link Here
130
#endif
130
#endif
131
131
132
#include "auth-pam.h"
132
#include "auth-pam.h"
133
void remove_kbdint_device(const char *);
134
133
void disable_forwarding(void);
135
void disable_forwarding(void);
134
136
135
void	do_authentication(Authctxt *);
137
void	do_authentication(Authctxt *);
(-)auth2-chall.c (+24 lines)
Lines 32-37 RCSID("$OpenBSD: auth2-chall.c,v 1.21 20 Link Here
32
#include "xmalloc.h"
32
#include "xmalloc.h"
33
#include "dispatch.h"
33
#include "dispatch.h"
34
#include "log.h"
34
#include "log.h"
35
#include "servconf.h"
36
37
/* import */
38
extern ServerOptions options;
35
39
36
static int auth2_challenge_start(Authctxt *);
40
static int auth2_challenge_start(Authctxt *);
37
static int send_userauth_info_request(Authctxt *);
41
static int send_userauth_info_request(Authctxt *);
Lines 71-82 struct KbdintAuthctxt Link Here
71
	u_int nreq;
75
	u_int nreq;
72
};
76
};
73
77
78
#ifdef USE_PAM
79
void
80
remove_kbdint_device(const char *devname)
81
{
82
	int i, j;
83
84
	for (i = 0; devices[i] != NULL; i++)
85
		if (strcmp(devices[i]->name, devname) == 0) {
86
			for (j = i; devices[j] != NULL; j++)
87
				devices[j] = devices[j+1];
88
			i--;
89
		}
90
}
91
#endif
92
74
static KbdintAuthctxt *
93
static KbdintAuthctxt *
75
kbdint_alloc(const char *devs)
94
kbdint_alloc(const char *devs)
76
{
95
{
77
	KbdintAuthctxt *kbdintctxt;
96
	KbdintAuthctxt *kbdintctxt;
78
	Buffer b;
97
	Buffer b;
79
	int i;
98
	int i;
99
100
#ifdef USE_PAM
101
	if (!options.use_pam)
102
		remove_kbdint_device("pam");
103
#endif
80
104
81
	kbdintctxt = xmalloc(sizeof(KbdintAuthctxt));
105
	kbdintctxt = xmalloc(sizeof(KbdintAuthctxt));
82
	if (strcmp(devs, "") == 0) {
106
	if (strcmp(devs, "") == 0) {

Return to bug 936