summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-01-21 00:18:15 +1100
committerDamien Miller <djm@mindrot.org>2000-01-21 00:18:15 +1100
commitee1c0b3d3b1334d2e498aded0151ea8c0d804ebc (patch)
treeb31349cb094ac87bfcd36169810282a961be8f10
parenteab2ce023614ca49ad9d79c7c5a7ca8ee6204e7d (diff)
- NetBSD patch from David Rankin <drankin@bohemians.lexington.ky.us> and
Christos Zoulas <christos@netbsd.org>
-rw-r--r--CREDITS2
-rw-r--r--ChangeLog8
-rw-r--r--configure.in55
-rw-r--r--defines.h4
-rw-r--r--log-client.c6
-rw-r--r--log-server.c8
-rw-r--r--uidswap.c5
7 files changed, 51 insertions, 37 deletions
diff --git a/CREDITS b/CREDITS
index f0be1263b..ac992e300 100644
--- a/CREDITS
+++ b/CREDITS
@@ -4,7 +4,7 @@ Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
4Theo de Raadt, and Dug Song - Creators of OpenSSH 4Theo de Raadt, and Dug Song - Creators of OpenSSH
5 5
6Andrew Stribblehill <a.d.stribblehill@durham.ac.uk> - Bugfixes 6Andrew Stribblehill <a.d.stribblehill@durham.ac.uk> - Bugfixes
7Andre Lucas <andre.lucas@dial.pipex.com> - Many portability fixes 7Andre Lucas <andre.lucas@dial.pipex.com> - build, login and many other fixes
8Ben Taylor <bent@clark.net> - Solaris debugging and fixes 8Ben Taylor <bent@clark.net> - Solaris debugging and fixes
9Chip Salzenberg <chip@valinux.com> - Assorted patches 9Chip Salzenberg <chip@valinux.com> - Assorted patches
10Chris Saia <csaia@wtower.com> - SuSE packaging 10Chris Saia <csaia@wtower.com> - SuSE packaging
diff --git a/ChangeLog b/ChangeLog
index 259f7d8e2..14005e7aa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,15 +6,19 @@
6 - [sshconnect.c] 6 - [sshconnect.c]
7 - disable agent fwding for proto 1.3, remove abuse of auth-rsa flags. 7 - disable agent fwding for proto 1.3, remove abuse of auth-rsa flags.
8 - destroy keys earlier 8 - destroy keys earlier
9 - split key exchange (kex) and user authentication (user-auth), ok: provos@ 9 - split key exchange (kex) and user authentication (user-auth),
10 ok: provos@
10 - [sshd.c] 11 - [sshd.c]
11 - no need for poll.h; from bright@wintelcom.net 12 - no need for poll.h; from bright@wintelcom.net
12 - disable agent fwding for proto 1.3, remove abuse of auth-rsa flags. 13 - disable agent fwding for proto 1.3, remove abuse of auth-rsa flags.
13 - split key exchange (kex) and user authentication (user-auth), ok: provos@ 14 - split key exchange (kex) and user authentication (user-auth),
15 ok: provos@
14 - Big manpage and config file cleanup from Andre Lucas 16 - Big manpage and config file cleanup from Andre Lucas
15 <andre.lucas@dial.pipex.com> 17 <andre.lucas@dial.pipex.com>
16 - Re-added latest (unmodified) OpenBSD manpages 18 - Re-added latest (unmodified) OpenBSD manpages
17 - Doc updates 19 - Doc updates
20 - NetBSD patch from David Rankin <drankin@bohemians.lexington.ky.us> and
21 Christos Zoulas <christos@netbsd.org>
18 22
1920000119 2320000119
20 - SCO compile fixes from Gary E. Miller <gem@rellim.com> 24 - SCO compile fixes from Gary E. Miller <gem@rellim.com>
diff --git a/configure.in b/configure.in
index 90ed2bb80..4158b99b2 100644
--- a/configure.in
+++ b/configure.in
@@ -51,6 +51,31 @@ if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi
51 51
52AC_C_INLINE 52AC_C_INLINE
53 53
54dnl Check for OpenSSL/SSLeay directories.
55AC_MSG_CHECKING([for OpenSSL/SSLeay directory])
56for ssldir in $prefix /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local $prefix /usr/pkg ; do
57 if test -f "$ssldir/include/openssl/crypto.h"; then
58 AC_DEFINE(HAVE_OPENSSL)
59 GOT_SSL="yes"
60 break
61 fi
62 if test -f "$ssldir/include/ssl/crypto.h"; then
63 AC_DEFINE(HAVE_SSL)
64 GOT_SSL="yes"
65 break
66 fi
67done
68if test -z "$GOT_SSL" ; then
69 AC_MSG_ERROR([Could not find SSLeay / OpenSSL libraries, please install])
70fi
71AC_SUBST(ssldir)
72AC_DEFINE_UNQUOTED(ssldir, "$ssldir")
73if test "$ssldir" != "/usr"; then
74 CFLAGS="$CFLAGS -I$ssldir/include"
75 LDFLAGS="$LDFLAGS -L$ssldir/lib"
76fi
77AC_MSG_RESULT($ssldir)
78
54dnl Check for some target-specific stuff 79dnl Check for some target-specific stuff
55case "$host" in 80case "$host" in
56*-*-aix*) 81*-*-aix*)
@@ -87,6 +112,11 @@ case "$host" in
87*-*-linux*) 112*-*-linux*)
88 no_dev_ptmx=1 113 no_dev_ptmx=1
89 ;; 114 ;;
115*-*-netbsd*)
116 if test "$GOT_SSL" = "yes"; then
117 LDFLAGS="$LDFLAGS -R$ssldir/lib"
118 fi
119 ;;
90*-*-solaris*) 120*-*-solaris*)
91 AC_DEFINE(USE_UTMPX) 121 AC_DEFINE(USE_UTMPX)
92 ;; 122 ;;
@@ -95,31 +125,6 @@ case "$host" in
95 ;; 125 ;;
96esac 126esac
97 127
98dnl Check for OpenSSL/SSLeay directories.
99AC_MSG_CHECKING([for OpenSSL/SSLeay directory])
100for ssldir in $prefix /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local $prefix /usr/pkg ; do
101 if test -f "$ssldir/include/openssl/crypto.h"; then
102 AC_DEFINE(HAVE_OPENSSL)
103 GOT_SSL="yes"
104 break
105 fi
106 if test -f "$ssldir/include/ssl/crypto.h"; then
107 AC_DEFINE(HAVE_SSL)
108 GOT_SSL="yes"
109 break
110 fi
111done
112if test -z "$GOT_SSL" ; then
113 AC_MSG_ERROR([Could not find SSLeay / OpenSSL libraries, please install])
114fi
115AC_SUBST(ssldir)
116AC_DEFINE_UNQUOTED(ssldir, "$ssldir")
117if test "$ssldir" != "/usr"; then
118 CFLAGS="$CFLAGS -I$ssldir/include"
119 LDFLAGS="$LDFLAGS -L$ssldir/lib"
120fi
121AC_MSG_RESULT($ssldir)
122
123dnl Check for RSAref library. 128dnl Check for RSAref library.
124AC_MSG_CHECKING([for RSAref library]) 129AC_MSG_CHECKING([for RSAref library])
125saved_LIBS="$LIBS" 130saved_LIBS="$LIBS"
diff --git a/defines.h b/defines.h
index 3db1d0d95..519ebbaa2 100644
--- a/defines.h
+++ b/defines.h
@@ -34,6 +34,10 @@
34# include <sys/cdefs.h> /* For __P() */ 34# include <sys/cdefs.h> /* For __P() */
35#endif 35#endif
36 36
37#ifdef HAVE_SYS_SYSMACROS_H
38# include <sys/sysmacros.h> /* For MIN, MAX, etc */
39#endif
40
37/* Constants */ 41/* Constants */
38 42
39#ifndef SHUT_RDWR 43#ifndef SHUT_RDWR
diff --git a/log-client.c b/log-client.c
index 4d40cf268..668aafff0 100644
--- a/log-client.c
+++ b/log-client.c
@@ -15,7 +15,7 @@
15 */ 15 */
16 16
17#include "includes.h" 17#include "includes.h"
18RCSID("$Id: log-client.c,v 1.3 1999/11/24 13:26:22 damien Exp $"); 18RCSID("$Id: log-client.c,v 1.4 2000/01/20 13:18:16 damien Exp $");
19 19
20#include "xmalloc.h" 20#include "xmalloc.h"
21#include "ssh.h" 21#include "ssh.h"
@@ -45,12 +45,12 @@ log_init(char *av0, LogLevel level, SyslogFacility ignored1, int ignored2)
45 } 45 }
46} 46}
47 47
48#define MSGBUFSIZE 1024 48#define SSH_MSGBUFSIZE 1024
49 49
50void 50void
51do_log(LogLevel level, const char *fmt, va_list args) 51do_log(LogLevel level, const char *fmt, va_list args)
52{ 52{
53 char msgbuf[MSGBUFSIZE]; 53 char msgbuf[SSH_MSGBUFSIZE];
54 54
55 if (level > log_level) 55 if (level > log_level)
56 return; 56 return;
diff --git a/log-server.c b/log-server.c
index 34f77b2be..264288109 100644
--- a/log-server.c
+++ b/log-server.c
@@ -15,7 +15,7 @@
15 */ 15 */
16 16
17#include "includes.h" 17#include "includes.h"
18RCSID("$Id: log-server.c,v 1.5 1999/11/24 13:26:22 damien Exp $"); 18RCSID("$Id: log-server.c,v 1.6 2000/01/20 13:18:16 damien Exp $");
19 19
20#include <syslog.h> 20#include <syslog.h>
21#include "packet.h" 21#include "packet.h"
@@ -97,13 +97,13 @@ log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr)
97 log_on_stderr = on_stderr; 97 log_on_stderr = on_stderr;
98} 98}
99 99
100#define MSGBUFSIZE 1024 100#define SSH_MSGBUFSIZE 1024
101 101
102void 102void
103do_log(LogLevel level, const char *fmt, va_list args) 103do_log(LogLevel level, const char *fmt, va_list args)
104{ 104{
105 char msgbuf[MSGBUFSIZE]; 105 char msgbuf[SSH_MSGBUFSIZE];
106 char fmtbuf[MSGBUFSIZE]; 106 char fmtbuf[SSH_MSGBUFSIZE];
107 char *txt = NULL; 107 char *txt = NULL;
108 int pri = LOG_INFO; 108 int pri = LOG_INFO;
109 109
diff --git a/uidswap.c b/uidswap.c
index d81fde9d2..ca9e28eb7 100644
--- a/uidswap.c
+++ b/uidswap.c
@@ -7,7 +7,7 @@
7 */ 7 */
8 8
9#include "includes.h" 9#include "includes.h"
10RCSID("$Id: uidswap.c,v 1.3 1999/11/25 00:55:00 damien Exp $"); 10RCSID("$Id: uidswap.c,v 1.4 2000/01/20 13:18:16 damien Exp $");
11 11
12#include "ssh.h" 12#include "ssh.h"
13#include "uidswap.h" 13#include "uidswap.h"
@@ -25,11 +25,12 @@ RCSID("$Id: uidswap.c,v 1.3 1999/11/25 00:55:00 damien Exp $");
25/* Lets assume that posix saved ids also work with seteuid, even though that 25/* Lets assume that posix saved ids also work with seteuid, even though that
26 is not part of the posix specification. */ 26 is not part of the posix specification. */
27#define SAVED_IDS_WORK_WITH_SETEUID 27#define SAVED_IDS_WORK_WITH_SETEUID
28#endif /* _POSIX_SAVED_IDS */
29 28
30/* Saved effective uid. */ 29/* Saved effective uid. */
31static uid_t saved_euid = 0; 30static uid_t saved_euid = 0;
32 31
32#endif /* _POSIX_SAVED_IDS */
33
33/* 34/*
34 * Temporarily changes to the given uid. If the effective user 35 * Temporarily changes to the given uid. If the effective user
35 * id is not root, this does nothing. This call cannot be nested. 36 * id is not root, this does nothing. This call cannot be nested.