From f38ba20df530935c085eee2011f5d6693b79b806 Mon Sep 17 00:00:00 2001 From: Ben Lindstrom Date: Fri, 21 Mar 2003 01:07:44 +0000 Subject: - (bal) Collection of Cray patches (bsd-cray.h fix for CRAYT3E and improved guessing rules) --- openbsd-compat/bsd-cray.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'openbsd-compat') diff --git a/openbsd-compat/bsd-cray.h b/openbsd-compat/bsd-cray.h index 9a15cb251..68947c92f 100644 --- a/openbsd-compat/bsd-cray.h +++ b/openbsd-compat/bsd-cray.h @@ -1,5 +1,5 @@ /* - * $Id: bsd-cray.h,v 1.6 2003/01/27 21:15:11 mouring Exp $ + * $Id: bsd-cray.h,v 1.6.2.1 2003/03/21 01:07:45 mouring Exp $ * * bsd-cray.h * @@ -49,8 +49,10 @@ extern char cray_tmpdir[]; /* cray tmpdir */ #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 64 #endif +#ifndef _CRAYT3E #include #define TIOCGPGRP (tIOC|20) #endif +#endif #endif /* _BSD_CRAY_H */ -- cgit v1.2.3 From c0d2468298d069cb0d234a4b1b9465b8edc8e005 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 26 Mar 2003 16:02:47 +1100 Subject: - (djm) Fix getpeerid support for 64 bit BE systems. From Arnd Bergmann --- ChangeLog | 4 +++- openbsd-compat/bsd-getpeereid.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'openbsd-compat') diff --git a/ChangeLog b/ChangeLog index eae68464d..cdcd73df3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ [sftp-server.c] one last fix to the tree: race fix broke stuff; pr 3169; srp@srparish.net, help from djm + - (djm) Fix getpeerid support for 64 bit BE systems. From + Arnd Bergmann - Release 3.6p1 20030324 @@ -1254,4 +1256,4 @@ save auth method before monitor_reset_key_state(); bugzilla bug #284; ok provos@ -$Id: ChangeLog,v 1.2633.2.7 2003/03/26 04:59:47 djm Exp $ +$Id: ChangeLog,v 1.2633.2.8 2003/03/26 05:02:47 djm Exp $ diff --git a/openbsd-compat/bsd-getpeereid.c b/openbsd-compat/bsd-getpeereid.c index c7876823d..3f554e72a 100644 --- a/openbsd-compat/bsd-getpeereid.c +++ b/openbsd-compat/bsd-getpeereid.c @@ -24,7 +24,7 @@ #include "includes.h" -RCSID("$Id: bsd-getpeereid.c,v 1.1 2002/09/12 00:33:02 djm Exp $"); +RCSID("$Id: bsd-getpeereid.c,v 1.1.4.1 2003/03/26 05:02:47 djm Exp $"); #if !defined(HAVE_GETPEEREID) @@ -33,7 +33,7 @@ int getpeereid(int s, uid_t *euid, gid_t *gid) { struct ucred cred; - size_t len = sizeof(cred); + socklen_t len = sizeof(cred); if (getsockopt(s, SOL_SOCKET, SO_PEERCRED, &cred, &len) < 0) return (-1); -- cgit v1.2.3 From ae225aa5594655e3fa5685b4dd7f2ae0e1a5e2d7 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 26 Mar 2003 16:03:05 +1100 Subject: - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. Report from murple@murple.net, diagnosis from dtucker@zip.com.au --- ChangeLog | 4 +++- openbsd-compat/fake-getaddrinfo.c | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'openbsd-compat') diff --git a/ChangeLog b/ChangeLog index cdcd73df3..9a7e2ea93 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,8 @@ srp@srparish.net, help from djm - (djm) Fix getpeerid support for 64 bit BE systems. From Arnd Bergmann + - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. + Report from murple@murple.net, diagnosis from dtucker@zip.com.au - Release 3.6p1 20030324 @@ -1256,4 +1258,4 @@ save auth method before monitor_reset_key_state(); bugzilla bug #284; ok provos@ -$Id: ChangeLog,v 1.2633.2.8 2003/03/26 05:02:47 djm Exp $ +$Id: ChangeLog,v 1.2633.2.9 2003/03/26 05:03:05 djm Exp $ diff --git a/openbsd-compat/fake-getaddrinfo.c b/openbsd-compat/fake-getaddrinfo.c index e04776606..bc58f30a6 100644 --- a/openbsd-compat/fake-getaddrinfo.c +++ b/openbsd-compat/fake-getaddrinfo.c @@ -12,7 +12,7 @@ #include "includes.h" #include "ssh.h" -RCSID("$Id: fake-getaddrinfo.c,v 1.4 2003/02/24 01:35:09 djm Exp $"); +RCSID("$Id: fake-getaddrinfo.c,v 1.4.2.1 2003/03/26 05:03:06 djm Exp $"); #ifndef HAVE_GAI_STRERROR char *gai_strerror(int ecode) @@ -71,6 +71,7 @@ int getaddrinfo(const char *hostname, const char *servname, struct in_addr in; int i; long int port; + u_long addr; port = 0; if (servname != NULL) { @@ -86,7 +87,10 @@ int getaddrinfo(const char *hostname, const char *servname, } if (hints && hints->ai_flags & AI_PASSIVE) { - if (NULL != (*res = malloc_ai(port, htonl(0x00000000)))) + addr = htonl(0x00000000); + if (hostname && inet_aton(hostname, &in) != 0) + addr = in.s_addr; + if (NULL != (*res = malloc_ai(port, addr))) return 0; else return EAI_MEMORY; -- cgit v1.2.3 From 4dd222cb8747903750eea47be63305cfc9f1a483 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 19 Sep 2003 16:55:01 +1000 Subject: - (djm) Bug #680: Remove missing inet_ntoa.h header reference --- ChangeLog | 3 ++- openbsd-compat/inet_ntoa.c | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'openbsd-compat') diff --git a/ChangeLog b/ChangeLog index 692b17255..fb5e7d111 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 20030919 - (djm) Bug #683: Remove reference to --with-ipv4-default from INSTALL; djast AT cs.toronto.edu + - (djm) Bug #680: Remove missing inet_ntoa.h header reference 20030918 - (djm) Bug #652: Fix empty password auth @@ -1122,4 +1123,4 @@ - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. Report from murple@murple.net, diagnosis from dtucker@zip.com.au -$Id: ChangeLog,v 1.2994.2.8 2003/09/19 06:31:31 djm Exp $ +$Id: ChangeLog,v 1.2994.2.9 2003/09/19 06:55:01 djm Exp $ diff --git a/openbsd-compat/inet_ntoa.c b/openbsd-compat/inet_ntoa.c index e0384491d..f9fdc9ee5 100644 --- a/openbsd-compat/inet_ntoa.c +++ b/openbsd-compat/inet_ntoa.c @@ -43,7 +43,6 @@ static char rcsid[] = "$OpenBSD: inet_ntoa.c,v 1.4 2003/06/02 20:18:35 millert E #include #include #include -#include "inet_ntoa.h" char *inet_ntoa(struct in_addr in) { -- cgit v1.2.3 From 387666a626a625b516ea621e463682e647ffbb50 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Fri, 19 Sep 2003 20:46:21 +1000 Subject: - (dtucker) [openbsd-compat/port-aix.h] Bug #640: Don't include audit.h unless required. Reorder to reduce warnings. --- ChangeLog | 4 +++- openbsd-compat/port-aix.h | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'openbsd-compat') diff --git a/ChangeLog b/ChangeLog index 31ce3af46..94b8aa5db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,8 @@ djast AT cs.toronto.edu - (djm) Bug #680: Remove missing inet_ntoa.h header reference - (djm) Bug #646: Fix location of x11-ssh-askpass; Jim + - (dtucker) [openbsd-compat/port-aix.h] Bug #640: Don't include audit.h + unless required. Reorder to reduce warnings. 20030918 - (djm) Bug #652: Fix empty password auth @@ -1124,4 +1126,4 @@ - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. Report from murple@murple.net, diagnosis from dtucker@zip.com.au -$Id: ChangeLog,v 1.2994.2.10 2003/09/19 07:06:06 djm Exp $ +$Id: ChangeLog,v 1.2994.2.11 2003/09/19 10:46:21 dtucker Exp $ diff --git a/openbsd-compat/port-aix.h b/openbsd-compat/port-aix.h index 09e7f9e97..94c8c5119 100644 --- a/openbsd-compat/port-aix.h +++ b/openbsd-compat/port-aix.h @@ -1,4 +1,4 @@ -/* $Id: port-aix.h,v 1.14 2003/08/29 16:59:52 mouring Exp $ */ +/* $Id: port-aix.h,v 1.14.2.1 2003/09/19 10:46:22 dtucker Exp $ */ /* * @@ -30,10 +30,10 @@ #ifdef WITH_AIXAUTHENTICATE # include # include -# include -# ifdef HAVE_SYS_AUDIT_H +# if defined(HAVE_SYS_AUDIT_H) && defined(AIX_LOGINFAILED_4ARG) # include # endif +# include #endif /* Some versions define r_type in the above headers, which causes a conflict */ -- cgit v1.2.3 From 7724e94d041d267b5b9915b37d44c0986b12fe6d Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 22 Sep 2003 12:09:17 +1000 Subject: - (dtucker) [configure.ac openbsd-compat/fake-rfc2553.c openbsd-compat/fake-rfc2553.h] Bug #659: Test for and handle systems with where gai_strerror is defined as "const char *". Part of patch supplied by bugzilla-openssh at thewrittenword.com --- ChangeLog | 6 +++++- configure.ac | 19 +++++++++++++++++-- openbsd-compat/fake-rfc2553.c | 6 +++++- openbsd-compat/fake-rfc2553.h | 4 ++-- 4 files changed, 29 insertions(+), 6 deletions(-) (limited to 'openbsd-compat') diff --git a/ChangeLog b/ChangeLog index 77ca50246..933b8094d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,10 @@ Patch from david.haughton at ncr.com - (dtucker) [configure.ac] Bug #659: uid swapping issues on IRIX 6. Part of patch supplied by bugzilla-openssh at thewrittenword.com + - (dtucker) [configure.ac openbsd-compat/fake-rfc2553.c + openbsd-compat/fake-rfc2553.h] Bug #659: Test for and handle systems with + where gai_strerror is defined as "const char *". Part of patch supplied + by bugzilla-openssh at thewrittenword.com 20030919 - (djm) Bug #683: Remove reference to --with-ipv4-default from INSTALL; @@ -1141,4 +1145,4 @@ - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. Report from murple@murple.net, diagnosis from dtucker@zip.com.au -$Id: ChangeLog,v 1.2994.2.18 2003/09/22 01:58:44 dtucker Exp $ +$Id: ChangeLog,v 1.2994.2.19 2003/09/22 02:09:17 dtucker Exp $ diff --git a/configure.ac b/configure.ac index 5cf7d9097..c5f98468f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -# $Id: configure.ac,v 1.154.2.6 2003/09/22 01:58:44 dtucker Exp $ +# $Id: configure.ac,v 1.154.2.7 2003/09/22 02:09:18 dtucker Exp $ AC_INIT AC_CONFIG_SRCDIR([ssh.c]) @@ -731,7 +731,7 @@ dnl Checks for library functions. Please keep in alphabetical order AC_CHECK_FUNCS(\ arc4random __b64_ntop b64_ntop __b64_pton b64_pton basename \ bcopy bindresvport_sa clock fchmod fchown freeaddrinfo futimes \ - gai_strerror getaddrinfo getcwd getgrouplist getnameinfo getopt \ + getaddrinfo getcwd getgrouplist getnameinfo getopt \ getpeereid _getpty getrlimit getttyent glob inet_aton \ inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove \ mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openlog_r openpty \ @@ -743,6 +743,21 @@ AC_CHECK_FUNCS(\ truncate utimes vhangup vsnprintf waitpid \ ) +# IRIX has a const char return value for gai_strerror() +AC_CHECK_FUNCS(gai_strerror,[ + AC_DEFINE(HAVE_GAI_STRERROR) + AC_TRY_COMPILE([ +#include +#include +#include + +const char *gai_strerror(int);],[ +char *str; + +str = gai_strerror(0);],[ + AC_DEFINE(HAVE_CONST_GAI_STRERROR_PROTO, 1, + [Define if gai_strerror() returns const char *])])]) + AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP)) dnl Make sure prototypes are defined for these before using them. diff --git a/openbsd-compat/fake-rfc2553.c b/openbsd-compat/fake-rfc2553.c index f44924836..b0cc69bd7 100644 --- a/openbsd-compat/fake-rfc2553.c +++ b/openbsd-compat/fake-rfc2553.c @@ -37,7 +37,7 @@ #include "includes.h" -RCSID("$Id: fake-rfc2553.c,v 1.4 2003/06/13 22:43:23 djm Exp $"); +RCSID("$Id: fake-rfc2553.c,v 1.4.2.1 2003/09/22 02:09:18 dtucker Exp $"); #ifndef HAVE_GETNAMEINFO int getnameinfo(const struct sockaddr *sa, size_t salen, char *host, @@ -77,7 +77,11 @@ int getnameinfo(const struct sockaddr *sa, size_t salen, char *host, #endif /* !HAVE_GETNAMEINFO */ #ifndef HAVE_GAI_STRERROR +#ifdef HAVE_CONST_GAI_STRERROR_PROTO +const char * +#else char * +#endif gai_strerror(int err) { switch (err) { diff --git a/openbsd-compat/fake-rfc2553.h b/openbsd-compat/fake-rfc2553.h index b70b928f8..2d5439296 100644 --- a/openbsd-compat/fake-rfc2553.h +++ b/openbsd-compat/fake-rfc2553.h @@ -1,4 +1,4 @@ -/* $Id: fake-rfc2553.h,v 1.6 2003/08/29 16:59:52 mouring Exp $ */ +/* $Id: fake-rfc2553.h,v 1.6.2.1 2003/09/22 02:09:18 dtucker Exp $ */ /* * Copyright (C) 2000-2003 Damien Miller. All rights reserved. @@ -137,7 +137,7 @@ int getaddrinfo(const char *, const char *, const struct addrinfo *, struct addrinfo **); #endif /* !HAVE_GETADDRINFO */ -#ifndef HAVE_GAI_STRERROR +#if !defined(HAVE_GAI_STRERROR) && !defined(HAVE_CONST_GAI_STRERROR_PROTO) char *gai_strerror(int); #endif /* !HAVE_GAI_STRERROR */ -- cgit v1.2.3 From 537d716831e65176b7ec1ac52b7ea370d1e9e7c0 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 22 Sep 2003 13:05:48 +1000 Subject: - (dtucker) [openbsd-compat/port-aix.c] Use correct include for xmalloc.h, add canohost.h to stop warning. Based on patch from openssh-unix-dev at thewrittenword.com --- ChangeLog | 5 ++++- openbsd-compat/port-aix.c | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'openbsd-compat') diff --git a/ChangeLog b/ChangeLog index 29951f6d5..fb121b124 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,9 @@ - (dtucker) [uidswap.c] Don't test restoration of uid on Cygwin since the OS does not support permanently dropping privileges. Patch from vinschen at redhat.com. + - (dtucker) [openbsd-compat/port-aix.c] Use correct include for xmalloc.h, + add canohost.h to stop warning. Based on patch from openssh-unix-dev at + thewrittenword.com 20030919 - (djm) Bug #683: Remove reference to --with-ipv4-default from INSTALL; @@ -1151,4 +1154,4 @@ - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. Report from murple@murple.net, diagnosis from dtucker@zip.com.au -$Id: ChangeLog,v 1.2994.2.21 2003/09/22 02:55:20 dtucker Exp $ +$Id: ChangeLog,v 1.2994.2.22 2003/09/22 03:05:48 dtucker Exp $ diff --git a/openbsd-compat/port-aix.c b/openbsd-compat/port-aix.c index 7a981634b..9fbcce936 100644 --- a/openbsd-compat/port-aix.c +++ b/openbsd-compat/port-aix.c @@ -27,11 +27,12 @@ #include "ssh.h" #include "log.h" #include "servconf.h" +#include "canohost.h" +#include "xmalloc.h" #ifdef _AIX #include -#include <../xmalloc.h> #include "port-aix.h" extern ServerOptions options; -- cgit v1.2.3