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