summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2004-04-14 17:24:30 +1000
committerDarren Tucker <dtucker@zip.com.au>2004-04-14 17:24:30 +1000
commit06a8cfe796bc9afb8bdd9127f348139ec68809fd (patch)
treecacace28ddb2b3e2611bdaed86e60a581cd6ff28
parent3b908f65b4b668d20ef0d20c695cb053829bdaef (diff)
downloadopenssh-git-06a8cfe796bc9afb8bdd9127f348139ec68809fd.tar.gz
- (dtucker) [auth-skey.c defines.h monitor.c] Make skeychallenge explicitly
4-arg, with compatibility for 3-arg versions. From djm@, ok me.
-rw-r--r--ChangeLog4
-rw-r--r--auth-skey.c3
-rw-r--r--defines.h13
-rw-r--r--monitor.c3
4 files changed, 14 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 409c9bae..d8cab5ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
from bug #701 (text from jfh at cise.ufl.edu).
- (dtucker) [acconfig.h configure.ac defines.h] Bug #673: check for 4-arg
skeychallenge(), eg on NetBSD. ok mouring@
+ - (dtucker) [auth-skey.c defines.h monitor.c] Make skeychallenge explicitly
+ 4-arg, with compatibility for 3-arg versions. From djm@, ok me.
20040408
- (dtucker) [loginrec.c] Use UT_LINESIZE if available, prevents truncating
@@ -963,4 +965,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
-$Id: ChangeLog,v 1.3309 2004/04/14 05:26:39 dtucker Exp $
+$Id: ChangeLog,v 1.3310 2004/04/14 07:24:30 dtucker Exp $
diff --git a/auth-skey.c b/auth-skey.c
index f9ea03fd..ac1af69e 100644
--- a/auth-skey.c
+++ b/auth-skey.c
@@ -47,7 +47,8 @@ skey_query(void *ctx, char **name, char **infotxt,
int len;
struct skey skey;
- if (skeychallenge(&skey, authctxt->user, challenge) == -1)
+ if (_compat_skeychallenge(&skey, authctxt->user, challenge,
+ sizeof(challenge)) == -1)
return -1;
*name = xstrdup("");
diff --git a/defines.h b/defines.h
index f52dfd25..9b72afec 100644
--- a/defines.h
+++ b/defines.h
@@ -25,7 +25,7 @@
#ifndef _DEFINES_H
#define _DEFINES_H
-/* $Id: defines.h,v 1.114 2004/04/14 05:26:39 dtucker Exp $ */
+/* $Id: defines.h,v 1.115 2004/04/14 07:24:30 dtucker Exp $ */
/* Constants */
@@ -538,6 +538,12 @@ struct winsize {
# define krb5_get_err_text(context,code) error_message(code)
#endif
+#if defined(SKEYCHALLENGE_4ARG)
+# define _compat_skeychallenge(a,b,c,d) skeychallenge(a,b,c,d)
+#else
+# define _compat_skeychallenge(a,b,c,d) skeychallenge(a,b,c)
+#endif
+
/* Maximum number of file descriptors available */
#ifdef HAVE_SYSCONF
# define SSH_SYSFDMAX sysconf(_SC_OPEN_MAX)
@@ -546,11 +552,6 @@ struct winsize {
#endif
-/* Some platforms, eg NetBSD, have a 4th argument for skeychallenge() */
-#ifdef SKEYCHALLENGE_4ARG
-# define skeychallenge(a,b,c) skeychallenge((a), (b), (c), (sizeof(c)))
-#endif
-
/*
* Define this to use pipes instead of socketpairs for communicating with the
* client program. Socketpairs do not seem to work on all systems.
diff --git a/monitor.c b/monitor.c
index 37d40fcc..9c30c1c3 100644
--- a/monitor.c
+++ b/monitor.c
@@ -744,7 +744,8 @@ mm_answer_skeyquery(int socket, Buffer *m)
char challenge[1024];
u_int success;
- success = skeychallenge(&skey, authctxt->user, challenge) < 0 ? 0 : 1;
+ success = _compat_skeychallenge(&skey, authctxt->user, challenge,
+ sizeof(challenge)) < 0 ? 0 : 1;
buffer_clear(m);
buffer_put_int(m, success);