summaryrefslogtreecommitdiff
path: root/auth-bsdauth.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth-bsdauth.c')
-rw-r--r--auth-bsdauth.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/auth-bsdauth.c b/auth-bsdauth.c
index 920c977d8..37d527d11 100644
--- a/auth-bsdauth.c
+++ b/auth-bsdauth.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: auth-bsdauth.c,v 1.10 2006/08/03 03:34:41 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
3 * 4 *
@@ -21,13 +22,23 @@
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 * (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 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */ 24 */
25
24#include "includes.h" 26#include "includes.h"
25RCSID("$OpenBSD: auth-bsdauth.c,v 1.6 2005/01/19 13:11:47 dtucker Exp $"); 27
28#include <sys/types.h>
29
30#include <stdarg.h>
26 31
27#ifdef BSD_AUTH 32#ifdef BSD_AUTH
28#include "xmalloc.h" 33#include "xmalloc.h"
34#include "key.h"
35#include "hostfile.h"
29#include "auth.h" 36#include "auth.h"
30#include "log.h" 37#include "log.h"
38#include "buffer.h"
39#ifdef GSSAPI
40#include "ssh-gss.h"
41#endif
31#include "monitor_wrap.h" 42#include "monitor_wrap.h"
32 43
33static void * 44static void *
@@ -69,9 +80,8 @@ bsdauth_query(void *ctx, char **name, char **infotxt,
69 *name = xstrdup(""); 80 *name = xstrdup("");
70 *infotxt = xstrdup(""); 81 *infotxt = xstrdup("");
71 *numprompts = 1; 82 *numprompts = 1;
72 *prompts = xmalloc(*numprompts * sizeof(char *)); 83 *prompts = xcalloc(*numprompts, sizeof(char *));
73 *echo_on = xmalloc(*numprompts * sizeof(u_int)); 84 *echo_on = xcalloc(*numprompts, sizeof(u_int));
74 (*echo_on)[0] = 0;
75 (*prompts)[0] = xstrdup(challenge); 85 (*prompts)[0] = xstrdup(challenge);
76 86
77 return 0; 87 return 0;