diff options
author | Damien Miller <djm@mindrot.org> | 2000-01-21 00:18:15 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-01-21 00:18:15 +1100 |
commit | ee1c0b3d3b1334d2e498aded0151ea8c0d804ebc (patch) | |
tree | b31349cb094ac87bfcd36169810282a961be8f10 | |
parent | eab2ce023614ca49ad9d79c7c5a7ca8ee6204e7d (diff) |
- NetBSD patch from David Rankin <drankin@bohemians.lexington.ky.us> and
Christos Zoulas <christos@netbsd.org>
-rw-r--r-- | CREDITS | 2 | ||||
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | configure.in | 55 | ||||
-rw-r--r-- | defines.h | 4 | ||||
-rw-r--r-- | log-client.c | 6 | ||||
-rw-r--r-- | log-server.c | 8 | ||||
-rw-r--r-- | uidswap.c | 5 |
7 files changed, 51 insertions, 37 deletions
@@ -4,7 +4,7 @@ Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, | |||
4 | Theo de Raadt, and Dug Song - Creators of OpenSSH | 4 | Theo de Raadt, and Dug Song - Creators of OpenSSH |
5 | 5 | ||
6 | Andrew Stribblehill <a.d.stribblehill@durham.ac.uk> - Bugfixes | 6 | Andrew Stribblehill <a.d.stribblehill@durham.ac.uk> - Bugfixes |
7 | Andre Lucas <andre.lucas@dial.pipex.com> - Many portability fixes | 7 | Andre Lucas <andre.lucas@dial.pipex.com> - build, login and many other fixes |
8 | Ben Taylor <bent@clark.net> - Solaris debugging and fixes | 8 | Ben Taylor <bent@clark.net> - Solaris debugging and fixes |
9 | Chip Salzenberg <chip@valinux.com> - Assorted patches | 9 | Chip Salzenberg <chip@valinux.com> - Assorted patches |
10 | Chris Saia <csaia@wtower.com> - SuSE packaging | 10 | Chris Saia <csaia@wtower.com> - SuSE packaging |
@@ -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 | ||
19 | 20000119 | 23 | 20000119 |
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 | ||
52 | AC_C_INLINE | 52 | AC_C_INLINE |
53 | 53 | ||
54 | dnl Check for OpenSSL/SSLeay directories. | ||
55 | AC_MSG_CHECKING([for OpenSSL/SSLeay directory]) | ||
56 | for 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 | ||
67 | done | ||
68 | if test -z "$GOT_SSL" ; then | ||
69 | AC_MSG_ERROR([Could not find SSLeay / OpenSSL libraries, please install]) | ||
70 | fi | ||
71 | AC_SUBST(ssldir) | ||
72 | AC_DEFINE_UNQUOTED(ssldir, "$ssldir") | ||
73 | if test "$ssldir" != "/usr"; then | ||
74 | CFLAGS="$CFLAGS -I$ssldir/include" | ||
75 | LDFLAGS="$LDFLAGS -L$ssldir/lib" | ||
76 | fi | ||
77 | AC_MSG_RESULT($ssldir) | ||
78 | |||
54 | dnl Check for some target-specific stuff | 79 | dnl Check for some target-specific stuff |
55 | case "$host" in | 80 | case "$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 | ;; |
96 | esac | 126 | esac |
97 | 127 | ||
98 | dnl Check for OpenSSL/SSLeay directories. | ||
99 | AC_MSG_CHECKING([for OpenSSL/SSLeay directory]) | ||
100 | for 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 | ||
111 | done | ||
112 | if test -z "$GOT_SSL" ; then | ||
113 | AC_MSG_ERROR([Could not find SSLeay / OpenSSL libraries, please install]) | ||
114 | fi | ||
115 | AC_SUBST(ssldir) | ||
116 | AC_DEFINE_UNQUOTED(ssldir, "$ssldir") | ||
117 | if test "$ssldir" != "/usr"; then | ||
118 | CFLAGS="$CFLAGS -I$ssldir/include" | ||
119 | LDFLAGS="$LDFLAGS -L$ssldir/lib" | ||
120 | fi | ||
121 | AC_MSG_RESULT($ssldir) | ||
122 | |||
123 | dnl Check for RSAref library. | 128 | dnl Check for RSAref library. |
124 | AC_MSG_CHECKING([for RSAref library]) | 129 | AC_MSG_CHECKING([for RSAref library]) |
125 | saved_LIBS="$LIBS" | 130 | saved_LIBS="$LIBS" |
@@ -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" |
18 | RCSID("$Id: log-client.c,v 1.3 1999/11/24 13:26:22 damien Exp $"); | 18 | RCSID("$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 | ||
50 | void | 50 | void |
51 | do_log(LogLevel level, const char *fmt, va_list args) | 51 | do_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" |
18 | RCSID("$Id: log-server.c,v 1.5 1999/11/24 13:26:22 damien Exp $"); | 18 | RCSID("$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 | ||
102 | void | 102 | void |
103 | do_log(LogLevel level, const char *fmt, va_list args) | 103 | do_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 | ||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include "includes.h" | 9 | #include "includes.h" |
10 | RCSID("$Id: uidswap.c,v 1.3 1999/11/25 00:55:00 damien Exp $"); | 10 | RCSID("$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. */ |
31 | static uid_t saved_euid = 0; | 30 | static 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. |