- SCO compile fixes from Gary E. Miller <gem@rellim.com>
This commit is contained in:
parent
9550a24e01
commit
eaf9994f7e
|
@ -1,4 +1,5 @@
|
||||||
20000119
|
20000119
|
||||||
|
- SCO compile fixes from Gary E. Miller <gem@rellim.com>
|
||||||
- Compile fix from Darren_Hall@progressive.com
|
- Compile fix from Darren_Hall@progressive.com
|
||||||
|
|
||||||
20000118
|
20000118
|
||||||
|
|
|
@ -61,18 +61,18 @@ rresvport_af(alport, af)
|
||||||
struct sockaddr *sa;
|
struct sockaddr *sa;
|
||||||
u_int16_t *portp;
|
u_int16_t *portp;
|
||||||
int s;
|
int s;
|
||||||
int sa_len;
|
int salen;
|
||||||
|
|
||||||
bzero(&ss, sizeof ss);
|
bzero(&ss, sizeof ss);
|
||||||
sa = (struct sockaddr *)&ss;
|
sa = (struct sockaddr *)&ss;
|
||||||
|
|
||||||
switch (af) {
|
switch (af) {
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
sa_len = sizeof(struct sockaddr_in);
|
salen = sizeof(struct sockaddr_in);
|
||||||
portp = &((struct sockaddr_in *)sa)->sin_port;
|
portp = &((struct sockaddr_in *)sa)->sin_port;
|
||||||
break;
|
break;
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
sa_len = sizeof(struct sockaddr_in6);
|
salen = sizeof(struct sockaddr_in6);
|
||||||
portp = &((struct sockaddr_in6 *)sa)->sin6_port;
|
portp = &((struct sockaddr_in6 *)sa)->sin6_port;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -87,7 +87,7 @@ rresvport_af(alport, af)
|
||||||
|
|
||||||
*portp = htons(*alport);
|
*portp = htons(*alport);
|
||||||
if (*alport < IPPORT_RESERVED - 1) {
|
if (*alport < IPPORT_RESERVED - 1) {
|
||||||
if (bind(s, sa, sa_len) >= 0)
|
if (bind(s, sa, salen) >= 0)
|
||||||
return (s);
|
return (s);
|
||||||
if (errno != EADDRINUSE) {
|
if (errno != EADDRINUSE) {
|
||||||
(void)close(s);
|
(void)close(s);
|
||||||
|
|
|
@ -141,7 +141,7 @@ if test -z "$no_libnsl" ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Checks for header files.
|
dnl Checks for header files.
|
||||||
AC_CHECK_HEADERS(bstring.h endian.h lastlog.h login.h maillock.h netdb.h netgroup.h paths.h poll.h pty.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/select.h sys/stropts.h sys/time.h sys/ttcompat.h util.h utmp.h utmpx.h)
|
AC_CHECK_HEADERS(bstring.h endian.h lastlog.h login.h maillock.h netdb.h netgroup.h paths.h poll.h pty.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/select.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h util.h utmp.h utmpx.h)
|
||||||
|
|
||||||
dnl Checks for library functions.
|
dnl Checks for library functions.
|
||||||
AC_CHECK_FUNCS(arc4random bindresvport_af freeaddrinfo gai_strerror getaddrinfo getpagesize getnameinfo innetgr md5_crypt mkdtemp openpty rresvport_af setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf _getpty)
|
AC_CHECK_FUNCS(arc4random bindresvport_af freeaddrinfo gai_strerror getaddrinfo getpagesize getnameinfo innetgr md5_crypt mkdtemp openpty rresvport_af setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf _getpty)
|
||||||
|
@ -188,7 +188,7 @@ AC_TRY_COMPILE(
|
||||||
[AC_MSG_RESULT(no)]
|
[AC_MSG_RESULT(no)]
|
||||||
)
|
)
|
||||||
|
|
||||||
if test -z "$have_u_intxx_t" -a -z "$have_intxx_t" -a \
|
if test -z "$have_u_intxx_t" -o -z "$have_intxx_t" -a \
|
||||||
"x$ac_cv_header_sys_bitypes_h" = "xyes"
|
"x$ac_cv_header_sys_bitypes_h" = "xyes"
|
||||||
then
|
then
|
||||||
AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
|
AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
|
||||||
|
|
|
@ -86,6 +86,9 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
|
||||||
# include <sys/poll.h>
|
# include <sys/poll.h>
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_SYS_SYSMACROS_H
|
||||||
|
# include <sys/sysmacros.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
|
|
12
sshconnect.c
12
sshconnect.c
|
@ -8,7 +8,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$Id: sshconnect.c,v 1.21 2000/01/14 04:45:52 damien Exp $");
|
RCSID("$Id: sshconnect.c,v 1.22 2000/01/19 02:45:07 damien Exp $");
|
||||||
|
|
||||||
#ifdef HAVE_OPENSSL
|
#ifdef HAVE_OPENSSL
|
||||||
#include <openssl/bn.h>
|
#include <openssl/bn.h>
|
||||||
|
@ -1070,7 +1070,7 @@ check_host_key(char *host, struct sockaddr *hostaddr, RSA *host_key)
|
||||||
HostStatus host_status;
|
HostStatus host_status;
|
||||||
HostStatus ip_status;
|
HostStatus ip_status;
|
||||||
int local = 0, host_ip_differ = 0;
|
int local = 0, host_ip_differ = 0;
|
||||||
int sa_len;
|
int salen;
|
||||||
char ntop[NI_MAXHOST];
|
char ntop[NI_MAXHOST];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1084,15 +1084,15 @@ check_host_key(char *host, struct sockaddr *hostaddr, RSA *host_key)
|
||||||
switch (hostaddr->sa_family) {
|
switch (hostaddr->sa_family) {
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
local = (ntohl(((struct sockaddr_in *)hostaddr)->sin_addr.s_addr) >> 24) == IN_LOOPBACKNET;
|
local = (ntohl(((struct sockaddr_in *)hostaddr)->sin_addr.s_addr) >> 24) == IN_LOOPBACKNET;
|
||||||
sa_len = sizeof(struct sockaddr_in);
|
salen = sizeof(struct sockaddr_in);
|
||||||
break;
|
break;
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
local = IN6_IS_ADDR_LOOPBACK(&(((struct sockaddr_in6 *)hostaddr)->sin6_addr));
|
local = IN6_IS_ADDR_LOOPBACK(&(((struct sockaddr_in6 *)hostaddr)->sin6_addr));
|
||||||
sa_len = sizeof(struct sockaddr_in6);
|
salen = sizeof(struct sockaddr_in6);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
local = 0;
|
local = 0;
|
||||||
sa_len = sizeof(struct sockaddr_storage);
|
salen = sizeof(struct sockaddr_storage);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (local) {
|
if (local) {
|
||||||
|
@ -1108,7 +1108,7 @@ check_host_key(char *host, struct sockaddr *hostaddr, RSA *host_key)
|
||||||
options.check_host_ip = 0;
|
options.check_host_ip = 0;
|
||||||
|
|
||||||
if (options.check_host_ip) {
|
if (options.check_host_ip) {
|
||||||
if (getnameinfo(hostaddr, sa_len, ntop, sizeof(ntop),
|
if (getnameinfo(hostaddr, salen, ntop, sizeof(ntop),
|
||||||
NULL, 0, NI_NUMERICHOST) != 0)
|
NULL, 0, NI_NUMERICHOST) != 0)
|
||||||
fatal("check_host_key: getnameinfo failed");
|
fatal("check_host_key: getnameinfo failed");
|
||||||
ip = xstrdup(ntop);
|
ip = xstrdup(ntop);
|
||||||
|
|
Loading…
Reference in New Issue