auth-skey.c (99046) | auth-skey.c (106130) |
---|---|
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. --- 8 unchanged lines hidden (view full) --- 17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 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#include "includes.h" | 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. --- 8 unchanged lines hidden (view full) --- 17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 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#include "includes.h" |
25RCSID("$OpenBSD: auth-skey.c,v 1.19 2002/06/19 00:27:55 deraadt Exp $"); 26RCSID("$FreeBSD: head/crypto/openssh/auth-skey.c 99046 2002-06-29 10:44:37Z des $"); | 25RCSID("$OpenBSD: auth-skey.c,v 1.20 2002/06/30 21:59:45 deraadt Exp $"); 26RCSID("$FreeBSD: head/crypto/openssh/auth-skey.c 106130 2002-10-29 10:16:02Z des $"); |
27 28#ifdef SKEY 29 30#ifdef OPIE 31#include <opie.h> 32#define skey opie 33#define skeychallenge(k, u, c) opiechallenge((k), (u), (c)) 34#define skey_haskey(u) opie_haskey((u)) --- 22 unchanged lines hidden (view full) --- 57 struct skey skey; 58 59 if (skeychallenge(&skey, authctxt->user, challenge) == -1) 60 return -1; 61 62 *name = xstrdup(""); 63 *infotxt = xstrdup(""); 64 *numprompts = 1; | 27 28#ifdef SKEY 29 30#ifdef OPIE 31#include <opie.h> 32#define skey opie 33#define skeychallenge(k, u, c) opiechallenge((k), (u), (c)) 34#define skey_haskey(u) opie_haskey((u)) --- 22 unchanged lines hidden (view full) --- 57 struct skey skey; 58 59 if (skeychallenge(&skey, authctxt->user, challenge) == -1) 60 return -1; 61 62 *name = xstrdup(""); 63 *infotxt = xstrdup(""); 64 *numprompts = 1; |
65 *prompts = xmalloc(*numprompts * sizeof(char*)); | 65 *prompts = xmalloc(*numprompts * sizeof(char *)); |
66 *echo_on = xmalloc(*numprompts * sizeof(u_int)); 67 (*echo_on)[0] = 0; 68 69 len = strlen(challenge) + strlen(SKEY_PROMPT) + 1; 70 p = xmalloc(len); 71 strlcpy(p, challenge, len); 72 strlcat(p, SKEY_PROMPT, len); 73 (*prompts)[0] = p; --- 39 unchanged lines hidden --- | 66 *echo_on = xmalloc(*numprompts * sizeof(u_int)); 67 (*echo_on)[0] = 0; 68 69 len = strlen(challenge) + strlen(SKEY_PROMPT) + 1; 70 p = xmalloc(len); 71 strlcpy(p, challenge, len); 72 strlcat(p, SKEY_PROMPT, len); 73 (*prompts)[0] = p; --- 39 unchanged lines hidden --- |