Deleted Added
full compact
auth-chall.c (126277) auth-chall.c (147005)
1/*
2 * Copyright (c) 2001 Markus Friedl. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 10 unchanged lines hidden (view full) ---

19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25#include "includes.h"
26RCSID("$OpenBSD: auth-chall.c,v 1.9 2003/11/03 09:03:37 djm Exp $");
1/*
2 * Copyright (c) 2001 Markus Friedl. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 10 unchanged lines hidden (view full) ---

19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25#include "includes.h"
26RCSID("$OpenBSD: auth-chall.c,v 1.9 2003/11/03 09:03:37 djm Exp $");
27RCSID("$FreeBSD: head/crypto/openssh/auth-chall.c 126277 2004-02-26 10:52:33Z des $");
27RCSID("$FreeBSD: head/crypto/openssh/auth-chall.c 147005 2005-06-05 15:46:09Z des $");
28
29#include "auth.h"
30#include "log.h"
31#include "xmalloc.h"
28
29#include "auth.h"
30#include "log.h"
31#include "xmalloc.h"
32#include "servconf.h"
32
33/* limited protocol v1 interface to kbd-interactive authentication */
34
35extern KbdintDevice *devices[];
36static KbdintDevice *device;
33
34/* limited protocol v1 interface to kbd-interactive authentication */
35
36extern KbdintDevice *devices[];
37static KbdintDevice *device;
38extern ServerOptions options;
37
38char *
39get_challenge(Authctxt *authctxt)
40{
41 char *challenge, *name, *info, **prompts;
42 u_int i, numprompts;
43 u_int *echo_on;
44
39
40char *
41get_challenge(Authctxt *authctxt)
42{
43 char *challenge, *name, *info, **prompts;
44 u_int i, numprompts;
45 u_int *echo_on;
46
47#ifdef USE_PAM
48 if (!options.use_pam)
49 remove_kbdint_device("pam");
50#endif
51
45 device = devices[0]; /* we always use the 1st device for protocol 1 */
46 if (device == NULL)
47 return NULL;
48 if ((authctxt->kbdintctxt = device->init_ctx(authctxt)) == NULL)
49 return NULL;
50 if (device->query(authctxt->kbdintctxt, &name, &info,
51 &numprompts, &prompts, &echo_on)) {
52 device->free_ctx(authctxt->kbdintctxt);

--- 59 unchanged lines hidden ---
52 device = devices[0]; /* we always use the 1st device for protocol 1 */
53 if (device == NULL)
54 return NULL;
55 if ((authctxt->kbdintctxt = device->init_ctx(authctxt)) == NULL)
56 return NULL;
57 if (device->query(authctxt->kbdintctxt, &name, &info,
58 &numprompts, &prompts, &echo_on)) {
59 device->free_ctx(authctxt->kbdintctxt);

--- 59 unchanged lines hidden ---