- (bal) Changed from GNU rx to PCRE on suggestion from djm.
- (bal) Integrated Sony NEWS-OS patches from NAKAJI Hirouyuki <nakaji@tutrp.tut.ac.jp>
This commit is contained in:
parent
2594de81d3
commit
b5628647ad
|
@ -4,6 +4,9 @@
|
||||||
- (djm) Don't rely on atomicio's retval to determine length of askpass
|
- (djm) Don't rely on atomicio's retval to determine length of askpass
|
||||||
supplied passphrase. Problem report from Lutz Jaenicke
|
supplied passphrase. Problem report from Lutz Jaenicke
|
||||||
<Lutz.Jaenicke@aet.TU-Cottbus.DE>
|
<Lutz.Jaenicke@aet.TU-Cottbus.DE>
|
||||||
|
- (bal) Changed from GNU rx to PCRE on suggestion from djm.
|
||||||
|
- (bal) Integrated Sony NEWS-OS patches from NAKAJI Hirouyuki
|
||||||
|
<nakaji@tutrp.tut.ac.jp>
|
||||||
|
|
||||||
20001016
|
20001016
|
||||||
- (djm) Sync with OpenBSD:
|
- (djm) Sync with OpenBSD:
|
||||||
|
|
4
INSTALL
4
INSTALL
|
@ -40,8 +40,8 @@ ftp://ftp.gnu.org/gnu/make/
|
||||||
OpenSSH has only been tested with GNU make. It may work with other
|
OpenSSH has only been tested with GNU make. It may work with other
|
||||||
'make' programs, but you are on your own.
|
'make' programs, but you are on your own.
|
||||||
|
|
||||||
GNU rx:
|
pcre (POSIX Regular Expression library):
|
||||||
ftp:://ftp.gnu.org/gnu/rx/
|
ftp://ftp.cus.cam.ac.uk/pub/software/programs/pcre/
|
||||||
|
|
||||||
Most platforms do not required this. However older 4.3 BSD do not
|
Most platforms do not required this. However older 4.3 BSD do not
|
||||||
have a posix regex library.
|
have a posix regex library.
|
||||||
|
|
10
acconfig.h
10
acconfig.h
|
@ -52,8 +52,8 @@
|
||||||
/* Define if you are on Cygwin */
|
/* Define if you are on Cygwin */
|
||||||
#undef HAVE_CYGWIN
|
#undef HAVE_CYGWIN
|
||||||
|
|
||||||
/* Define if you lack native POSIX regex and you are using GNU rx library */
|
/* Define if you lack native POSIX regex and you are using PCRE */
|
||||||
#undef HAVE_LIBRX
|
#undef HAVE_LIBPCRE
|
||||||
|
|
||||||
/* Define if you have a broken realpath. */
|
/* Define if you have a broken realpath. */
|
||||||
#undef BROKEN_REALPATH
|
#undef BROKEN_REALPATH
|
||||||
|
@ -61,6 +61,9 @@
|
||||||
/* Define if you are on NeXT */
|
/* Define if you are on NeXT */
|
||||||
#undef HAVE_NEXT
|
#undef HAVE_NEXT
|
||||||
|
|
||||||
|
/* Define if you are on NEWS-OS */
|
||||||
|
#undef HAVE_NEWS4
|
||||||
|
|
||||||
/* Define if you want to disable PAM support */
|
/* Define if you want to disable PAM support */
|
||||||
#undef DISABLE_PAM
|
#undef DISABLE_PAM
|
||||||
|
|
||||||
|
@ -254,6 +257,9 @@
|
||||||
/* Use IPv4 for connection by default, IPv6 can still if explicity asked */
|
/* Use IPv4 for connection by default, IPv6 can still if explicity asked */
|
||||||
#undef IPV4_DEFAULT
|
#undef IPV4_DEFAULT
|
||||||
|
|
||||||
|
/* If you have no atexit() but xatexit(), and want to use xatexit() */
|
||||||
|
#undef HAVE_XATEXIT
|
||||||
|
|
||||||
/* getaddrinfo is broken (if present) */
|
/* getaddrinfo is broken (if present) */
|
||||||
#undef BROKEN_GETADDRINFO
|
#undef BROKEN_GETADDRINFO
|
||||||
|
|
||||||
|
|
4
compat.c
4
compat.c
|
@ -29,8 +29,8 @@ RCSID("$OpenBSD: compat.c,v 1.25 2000/10/14 12:16:56 markus Exp $");
|
||||||
#include "packet.h"
|
#include "packet.h"
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#ifdef HAVE_LIBRX
|
#ifdef HAVE_LIBPCRE
|
||||||
# include <rxposix.h>
|
# include <pcreposix.h>
|
||||||
#else /* Use native regex libraries */
|
#else /* Use native regex libraries */
|
||||||
# include <regex.h>
|
# include <regex.h>
|
||||||
#endif /* HAVE_LIBRX */
|
#endif /* HAVE_LIBRX */
|
||||||
|
|
15
configure.in
15
configure.in
|
@ -119,6 +119,13 @@ case "$host" in
|
||||||
AC_DEFINE(PAM_TTY_KLUDGE)
|
AC_DEFINE(PAM_TTY_KLUDGE)
|
||||||
inet6_default_4in6=yes
|
inet6_default_4in6=yes
|
||||||
;;
|
;;
|
||||||
|
mips-sony-bsd|mips-sony-newsos4)
|
||||||
|
AC_DEFINE(HAVE_NEWS4)
|
||||||
|
SONY=1
|
||||||
|
AC_CHECK_LIB(iberty, xatexit, AC_DEFINE(HAVE_XATEXIT),
|
||||||
|
AC_MSG_ERROR([*** libiberty missing - please install first ***])
|
||||||
|
)
|
||||||
|
;;
|
||||||
*-*-netbsd*)
|
*-*-netbsd*)
|
||||||
need_dash_r=1
|
need_dash_r=1
|
||||||
;;
|
;;
|
||||||
|
@ -257,7 +264,8 @@ AC_ARG_WITH(libs,
|
||||||
# Checks for libraries.
|
# Checks for libraries.
|
||||||
AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
|
AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
|
||||||
AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
|
AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
|
||||||
AC_CHECK_LIB(rx, regcomp, AC_DEFINE(HAVE_LIBRX) LIBS="$LIBS -lrx")
|
AC_CHECK_LIB(pcre, pcre_info,
|
||||||
|
AC_DEFINE(HAVE_LIBPCRE) LIBS="$LIBS -lpcreposix -lpcre")
|
||||||
|
|
||||||
if test -z "$no_libsocket" ; then
|
if test -z "$no_libsocket" ; then
|
||||||
AC_CHECK_LIB(nsl, yp_match, , )
|
AC_CHECK_LIB(nsl, yp_match, , )
|
||||||
|
@ -490,6 +498,11 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Cheap hack to ensure NEWS-OS libraries are arranged right.
|
||||||
|
if test ! -z "$SONY" ; then
|
||||||
|
LIBS="$LIBS -liberty";
|
||||||
|
fi
|
||||||
|
|
||||||
# Checks for data types
|
# Checks for data types
|
||||||
AC_CHECK_SIZEOF(char, 1)
|
AC_CHECK_SIZEOF(char, 1)
|
||||||
AC_CHECK_SIZEOF(short int, 2)
|
AC_CHECK_SIZEOF(short int, 2)
|
||||||
|
|
|
@ -354,6 +354,10 @@ struct winsize {
|
||||||
|
|
||||||
#if !defined(HAVE_ATEXIT) && defined(HAVE_ON_EXIT)
|
#if !defined(HAVE_ATEXIT) && defined(HAVE_ON_EXIT)
|
||||||
# define atexit(a) on_exit(a)
|
# define atexit(a) on_exit(a)
|
||||||
|
#else
|
||||||
|
# if defined(HAVE_XATEXIT)
|
||||||
|
# define atexit(a) xatexit(a)
|
||||||
|
# endif /* defined(HAVE_XATEXIT) */
|
||||||
#endif /* !defined(HAVE_ATEXIT) && defined(HAVE_ON_EXIT) */
|
#endif /* !defined(HAVE_ATEXIT) && defined(HAVE_ON_EXIT) */
|
||||||
|
|
||||||
#if defined(HAVE_VHANGUP) && !defined(BROKEN_VHANGUP)
|
#if defined(HAVE_VHANGUP) && !defined(BROKEN_VHANGUP)
|
||||||
|
|
|
@ -20,6 +20,7 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include "next-posix.h"
|
#include "next-posix.h"
|
||||||
|
#include "news4-posix.h"
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_NEWS4
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
#include <sys/fcntl.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <sys/file.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <termios.h>
|
||||||
|
#include <sys/wait.h>
|
||||||
|
|
||||||
|
#include "xmalloc.h"
|
||||||
|
#include "ssh.h"
|
||||||
|
#include "news4-posix.h"
|
||||||
|
|
||||||
|
int
|
||||||
|
waitpid(int pid, int *stat_loc, int options)
|
||||||
|
{
|
||||||
|
if (pid <= 0) {
|
||||||
|
if (pid != -1) {
|
||||||
|
errno = EINVAL;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
pid = 0; /* wait4() expects pid=0 for indiscriminate wait. */
|
||||||
|
}
|
||||||
|
return wait4(pid, (union wait *)stat_loc, options, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* HAVE_NEWS4 */
|
|
@ -0,0 +1,35 @@
|
||||||
|
/*
|
||||||
|
* Defines and prototypes specific to News4 system
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _NEWS4_POSIX_H
|
||||||
|
#define _NEWS4_POSIX_H
|
||||||
|
|
||||||
|
#ifdef HAVE_NEWS4
|
||||||
|
|
||||||
|
#include <sys/wait.h>
|
||||||
|
|
||||||
|
typedef long clock_t;
|
||||||
|
|
||||||
|
/* FILE */
|
||||||
|
#define O_NONBLOCK 00004 /* non-blocking open */
|
||||||
|
|
||||||
|
/* WAITPID */
|
||||||
|
#undef WIFEXITED
|
||||||
|
#undef WIFSTOPPED
|
||||||
|
#undef WIFSIGNALED
|
||||||
|
|
||||||
|
#define _W_INT(w) (*(int*)&(w)) /* convert union wait to int */
|
||||||
|
#define WIFEXITED(w) (!((_W_INT(w)) & 0377))
|
||||||
|
#define WIFSTOPPED(w) ((_W_INT(w)) & 0100)
|
||||||
|
#define WIFSIGNALED(w) (!WIFEXITED(w) && !WIFSTOPPED(w))
|
||||||
|
#define WEXITSTATUS(w) (int)(WIFEXITED(w) ? ((_W_INT(w) >> 8) & 0377) : -1)
|
||||||
|
#define WTERMSIG(w) (int)(WIFSIGNALED(w) ? (_W_INT(w) & 0177) : -1)
|
||||||
|
#define WCOREFLAG 0x80
|
||||||
|
#define WCOREDUMP(w) ((_W_INT(w)) & WCOREFLAG)
|
||||||
|
|
||||||
|
int waitpid(int pid,int *stat_loc,int options);
|
||||||
|
#define setsid() setpgrp(0, getpid())
|
||||||
|
|
||||||
|
#endif /* HAVE_NEWS4 */
|
||||||
|
#endif /* _NEWS4_POSIX_H */
|
4
pty.c
4
pty.c
|
@ -242,6 +242,10 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname)
|
||||||
*/
|
*/
|
||||||
ioctl(*ttyfd, TIOCSCTTY, NULL);
|
ioctl(*ttyfd, TIOCSCTTY, NULL);
|
||||||
#endif /* TIOCSCTTY */
|
#endif /* TIOCSCTTY */
|
||||||
|
#ifdef HAVE_NEWS4
|
||||||
|
if (setpgrp(0,0) < 0)
|
||||||
|
error("SETPGRP %s",strerror(errno));
|
||||||
|
#endif /* HAVE_NEWS4 */
|
||||||
#ifdef USE_VHANGUP
|
#ifdef USE_VHANGUP
|
||||||
old = signal(SIGHUP, SIG_IGN);
|
old = signal(SIGHUP, SIG_IGN);
|
||||||
vhangup();
|
vhangup();
|
||||||
|
|
Loading…
Reference in New Issue