- Several patches from SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp>

- INSTALL typo and URL fix
  - Makefile fix
  - Solaris fixes
 - Checking for ssize_t and memmove. Based on patch from SAKAI Kiyotaka
   <ksakai@kso.netwk.ntt-at.co.jp>
This commit is contained in:
Damien Miller 2000-05-17 22:53:33 +10:00
parent dcb6ecd1b3
commit 615f939ebb
11 changed files with 60 additions and 11 deletions

View File

@ -34,6 +34,7 @@ jonchen (email unknown) - the original author of PAM support of SSH
Juergen Keil <jk@tools.de> - scp bugfixing Juergen Keil <jk@tools.de> - scp bugfixing
Kees Cook <cook@cpoint.net> - scp fixes Kees Cook <cook@cpoint.net> - scp fixes
Kiyokazu SUTO <suto@ks-and-ks.ne.jp> - Bugfixes Kiyokazu SUTO <suto@ks-and-ks.ne.jp> - Bugfixes
Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE> - Bugfixes
Marc G. Fournier <marc.fournier@acadiau.ca> - Solaris patches Marc G. Fournier <marc.fournier@acadiau.ca> - Solaris patches
Matt Richards <v2matt@btv.ibm.com> - AIX patches Matt Richards <v2matt@btv.ibm.com> - AIX patches
Nalin Dahyabhai <nalin.dahyabhai@pobox.com> - PAM environment patch Nalin Dahyabhai <nalin.dahyabhai@pobox.com> - PAM environment patch
@ -41,7 +42,10 @@ Niels Kristian Bech Jensen <nkbj@image.dk> - Assorted patches
Peter Kocks <peter.kocks@baygate.com> - Makefile fixes Peter Kocks <peter.kocks@baygate.com> - Makefile fixes
Phil Hands <phil@hands.com> - Debian scripts, assorted patches Phil Hands <phil@hands.com> - Debian scripts, assorted patches
Phil Karn <karn@ka9q.ampr.org> - Autoconf fix Phil Karn <karn@ka9q.ampr.org> - Autoconf fix
SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp> - Multiple bugfixes
Simon Wilkinson <sxw@dcs.ed.ac.uk> - PAM fixes
Thomas Neumann <tom@smart.ruhr.de> - Shadow passwords Thomas Neumann <tom@smart.ruhr.de> - Shadow passwords
Tom Bertelson's <tbert@abac.com> - AIX auth fixes
Tor-Ake Fransson <torake@hotmail.com> - AIX support Tor-Ake Fransson <torake@hotmail.com> - AIX support
Tudor Bosman <tudorb@jm.nu> - MD5 password support Tudor Bosman <tudorb@jm.nu> - MD5 password support

View File

@ -25,6 +25,12 @@
enable nonblocking IO for sshd w/ proto 1, too; split out common code enable nonblocking IO for sshd w/ proto 1, too; split out common code
[aux.c] [aux.c]
missing include missing include
- Several patches from SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp>
- INSTALL typo and URL fix
- Makefile fix
- Solaris fixes
- Checking for ssize_t and memmove. Based on patch from SAKAI Kiyotaka
<ksakai@kso.netwk.ntt-at.co.jp>
20000513 20000513
- Fix for non-recognised DSA keys from Arkadiusz Miskiewicz - Fix for non-recognised DSA keys from Arkadiusz Miskiewicz

View File

@ -4,7 +4,7 @@
You will need working installations of Zlib and OpenSSL. You will need working installations of Zlib and OpenSSL.
Zlib: Zlib:
http://www.cdrom.com/pub/infozip/zlib/ http://www.freesoftware.com/pub/infozip/zlib/
OpenSSL 0.9.5a or greater: OpenSSL 0.9.5a or greater:
http://www.openssl.org/ http://www.openssl.org/
@ -90,7 +90,7 @@ need a working installation of GNOME, including the development
headers, for this to work. headers, for this to work.
--with-random=/some/file allows you to specify an alternate source of --with-random=/some/file allows you to specify an alternate source of
random numbers (the default is /dev/urandom). Unless you are absolutly random numbers (the default is /dev/urandom). Unless you are absolutely
sure of what you are doing, it is best to leave this alone. sure of what you are doing, it is best to leave this alone.
--with-egd-pool=/some/file allows you to enable Entropy Gathering --with-egd-pool=/some/file allows you to enable Entropy Gathering
@ -152,7 +152,7 @@ are installed.
real (AF_INET) IPv4 addresses. Works around some quirks on Linux. real (AF_INET) IPv4 addresses. Works around some quirks on Linux.
If you need to pass special options to the compiler or linker, you If you need to pass special options to the compiler or linker, you
can specify these as enviornment variables before running ./configure. can specify these as environment variables before running ./configure.
For example: For example:
CFLAGS="-O -m486" LFLAGS="-s" LIBS="-lrubbish" LD="/usr/foo/ld" ./configure CFLAGS="-O -m486" LFLAGS="-s" LIBS="-lrubbish" LD="/usr/foo/ld" ./configure
@ -186,5 +186,5 @@ for sshd, ssh and ssh-agent.
If you experience problems compiling, installing or running OpenSSH. If you experience problems compiling, installing or running OpenSSH.
Please refer to the "reporting bugs" section of the webpage at Please refer to the "reporting bugs" section of the webpage at
http://violet.ibs.com.au/openssh/ http://www.openssh.com/

View File

@ -90,11 +90,11 @@ $(MANPAGES) $(CONFIGFILES)::
$(FIXPATHSCMD) $(srcdir)/$@ $(FIXPATHSCMD) $(srcdir)/$@
clean: clean:
rm -f *.o *.a $(TARGETS) config.status config.cache config.log rm -f *.o *.a $(TARGETS) config.cache config.log
rm -f *.out ssh_prng_cmds core rm -f *.out core
distclean: clean distclean: clean
rm -f Makefile config.h core *~ rm -f Makefile config.h config.status ssh_prng_cmds *~
mrproper: distclean mrproper: distclean

View File

@ -117,6 +117,7 @@
#undef HAVE_UINTXX_T #undef HAVE_UINTXX_T
#undef HAVE_SOCKLEN_T #undef HAVE_SOCKLEN_T
#undef HAVE_SIZE_T #undef HAVE_SIZE_T
#undef HAVE_SSIZE_T
#undef HAVE_STRUCT_SOCKADDR_STORAGE #undef HAVE_STRUCT_SOCKADDR_STORAGE
#undef HAVE_STRUCT_ADDRINFO #undef HAVE_STRUCT_ADDRINFO
#undef HAVE_STRUCT_IN6_ADDR #undef HAVE_STRUCT_IN6_ADDR

View File

@ -73,6 +73,7 @@ struct utmp * utp;
int t = 0; int t = 0;
struct utmp * u; struct utmp * u;
#ifdef HAVE_TYPE_IN_UTMP
setutent(); setutent();
while((u = getutent()) != NULL) { while((u = getutent()) != NULL) {
@ -91,6 +92,7 @@ struct utmp * utp;
} }
endutent(); endutent();
#endif
return(-1); return(-1);
} }
@ -128,6 +130,7 @@ login(utp)
/* If no tty was found... */ /* If no tty was found... */
if (tty == -1) { if (tty == -1) {
/* ... append it to utmp on login */ /* ... append it to utmp on login */
#ifdef HAVE_TYPE_IN_UTMP
if (utp->ut_type == USER_PROCESS) { if (utp->ut_type == USER_PROCESS) {
if ((fd = open(_PATH_UTMP, O_WRONLY|O_APPEND, 0)) >= 0) { if ((fd = open(_PATH_UTMP, O_WRONLY|O_APPEND, 0)) >= 0) {
(void)write(fd, utp, sizeof(struct utmp)); (void)write(fd, utp, sizeof(struct utmp));
@ -138,6 +141,7 @@ login(utp)
/* Between login and logout */ /* Between login and logout */
log("No tty slot found at logout"); log("No tty slot found at logout");
} }
#endif
} else { } else {
/* Otherwise, tty was found - update at its location */ /* Otherwise, tty was found - update at its location */
#if defined(HAVE_HOST_IN_UTMP) #if defined(HAVE_HOST_IN_UTMP)

View File

@ -135,7 +135,7 @@ fi
AC_CHECK_HEADERS(bstring.h endian.h lastlog.h login.h maillock.h netdb.h netgroup.h netinet/in_systm.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 stddef.h util.h utmp.h utmpx.h) AC_CHECK_HEADERS(bstring.h endian.h lastlog.h login.h maillock.h netdb.h netgroup.h netinet/in_systm.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 stddef.h util.h utmp.h utmpx.h)
# Checks for library functions. # Checks for library functions.
AC_CHECK_FUNCS(arc4random b64_ntop bindresvport_af clock freeaddrinfo gai_strerror getaddrinfo getnameinfo getrusage innetgr md5_crypt mkdtemp openpty rresvport_af setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf vhangup _getpty __b64_ntop) AC_CHECK_FUNCS(arc4random b64_ntop bcopy bindresvport_af clock freeaddrinfo gai_strerror getaddrinfo getnameinfo getrusage innetgr md5_crypt memmove mkdtemp openpty rresvport_af setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf vhangup _getpty __b64_ntop)
AC_CHECK_FUNC(login, AC_CHECK_FUNC(login,
[AC_DEFINE(HAVE_LOGIN)], [AC_DEFINE(HAVE_LOGIN)],
@ -381,6 +381,20 @@ if test "x$ac_cv_have_size_t" = "xyes" ; then
AC_DEFINE(HAVE_SIZE_T) AC_DEFINE(HAVE_SIZE_T)
fi fi
AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
AC_TRY_COMPILE(
[
#include <sys/types.h>
],
[ ssize_t foo; foo = 1235; ],
[ ac_cv_have_ssize_t="yes" ],
[ ac_cv_have_ssize_t="no" ]
)
])
if test "x$ac_cv_have_ssize_t" = "xyes" ; then
AC_DEFINE(HAVE_SSIZE_T)
fi
AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [ AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
AC_TRY_COMPILE( AC_TRY_COMPILE(

View File

@ -150,6 +150,11 @@ typedef unsigned int size_t;
# define HAVE_SIZE_T # define HAVE_SIZE_T
#endif /* HAVE_SIZE_T */ #endif /* HAVE_SIZE_T */
#ifndef HAVE_SSIZE_T
typedef int ssize_t;
# define HAVE_SSIZE_T
#endif /* HAVE_SSIZE_T */
#if !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE___SS_FAMILY_IN_SS) #if !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE___SS_FAMILY_IN_SS)
# define ss_family __ss_family # define ss_family __ss_family
#endif /* !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE_SA_FAMILY_IN_SS) */ #endif /* !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE_SA_FAMILY_IN_SS) */
@ -216,6 +221,10 @@ typedef unsigned int size_t;
# define _PATH_DEVNULL "/dev/null" # define _PATH_DEVNULL "/dev/null"
#endif #endif
#ifndef MAIL_DIRECTORY
# define MAIL_DIRECTORY "/var/spool/mail"
#endif
#ifndef MAILDIR #ifndef MAILDIR
# define MAILDIR MAIL_DIRECTORY # define MAILDIR MAIL_DIRECTORY
#endif #endif
@ -280,4 +289,8 @@ typedef unsigned int size_t;
# undef HAVE_GETADDRINFO # undef HAVE_GETADDRINFO
#endif /* defined(BROKEN_GETADDRINFO) && defined(HAVE_GETADDRINFO) */ #endif /* defined(BROKEN_GETADDRINFO) && defined(HAVE_GETADDRINFO) */
#if !defined(HAVE_MEMMOVE) && defined(HAVE_BCOPY)
# define memmove(s1, s2, n) bcopy((s2), (s1), (n))
#endif /* !defined(HAVE_MEMMOVE) && defined(HAVE_BCOPY) */
#endif /* _DEFINES_H */ #endif /* _DEFINES_H */

View File

@ -17,7 +17,7 @@
*/ */
#include "includes.h" #include "includes.h"
RCSID("$Id: packet.c,v 1.22 2000/05/07 02:03:17 damien Exp $"); RCSID("$Id: packet.c,v 1.23 2000/05/17 12:53:35 damien Exp $");
#include "xmalloc.h" #include "xmalloc.h"
#include "buffer.h" #include "buffer.h"
@ -1237,10 +1237,12 @@ packet_set_interactive(int interactive, int keepalives)
* Set IP options for an interactive connection. Use * Set IP options for an interactive connection. Use
* IPTOS_LOWDELAY and TCP_NODELAY. * IPTOS_LOWDELAY and TCP_NODELAY.
*/ */
#ifdef IP_TOS
int lowdelay = IPTOS_LOWDELAY; int lowdelay = IPTOS_LOWDELAY;
if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *) &lowdelay, if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *) &lowdelay,
sizeof(lowdelay)) < 0) sizeof(lowdelay)) < 0)
error("setsockopt IPTOS_LOWDELAY: %.100s", strerror(errno)); error("setsockopt IPTOS_LOWDELAY: %.100s", strerror(errno));
#endif
if (setsockopt(connection_in, IPPROTO_TCP, TCP_NODELAY, (void *) &on, if (setsockopt(connection_in, IPPROTO_TCP, TCP_NODELAY, (void *) &on,
sizeof(on)) < 0) sizeof(on)) < 0)
error("setsockopt TCP_NODELAY: %.100s", strerror(errno)); error("setsockopt TCP_NODELAY: %.100s", strerror(errno));
@ -1249,10 +1251,12 @@ packet_set_interactive(int interactive, int keepalives)
* Set IP options for a non-interactive connection. Use * Set IP options for a non-interactive connection. Use
* IPTOS_THROUGHPUT. * IPTOS_THROUGHPUT.
*/ */
#ifdef IP_TOS
int throughput = IPTOS_THROUGHPUT; int throughput = IPTOS_THROUGHPUT;
if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *) &throughput, if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *) &throughput,
sizeof(throughput)) < 0) sizeof(throughput)) < 0)
error("setsockopt IPTOS_THROUGHPUT: %.100s", strerror(errno)); error("setsockopt IPTOS_THROUGHPUT: %.100s", strerror(errno));
#endif
} }
} }

6
scp.c
View File

@ -45,7 +45,7 @@
*/ */
#include "includes.h" #include "includes.h"
RCSID("$Id: scp.c,v 1.22 2000/05/07 02:03:17 damien Exp $"); RCSID("$Id: scp.c,v 1.23 2000/05/17 12:53:35 damien Exp $");
#include "ssh.h" #include "ssh.h"
#include "xmalloc.h" #include "xmalloc.h"
@ -1008,7 +1008,7 @@ run_err(const char *fmt,...)
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $Id: scp.c,v 1.22 2000/05/07 02:03:17 damien Exp $ * $Id: scp.c,v 1.23 2000/05/17 12:53:35 damien Exp $
*/ */
char * char *
@ -1235,7 +1235,9 @@ progressmeter(int flag)
struct sigaction sa; struct sigaction sa;
sa.sa_handler = updateprogressmeter; sa.sa_handler = updateprogressmeter;
sigemptyset(&sa.sa_mask); sigemptyset(&sa.sa_mask);
#ifdef SA_RESTART
sa.sa_flags = SA_RESTART; sa.sa_flags = SA_RESTART;
#endif
sigaction(SIGALRM, &sa, NULL); sigaction(SIGALRM, &sa, NULL);
alarmtimer(1); alarmtimer(1);
} else if (flag == 1) { } else if (flag == 1) {

View File

@ -507,6 +507,7 @@ main(int ac, char **av)
struct sockaddr_un sunaddr; struct sockaddr_un sunaddr;
pid_t pid; pid_t pid;
char *shell, *format, *pidstr, pidstrbuf[1 + 3 * sizeof pid]; char *shell, *format, *pidstr, pidstrbuf[1 + 3 * sizeof pid];
extern int optind;
/* check if RSA support exists */ /* check if RSA support exists */
if (rsa_alive() == 0) { if (rsa_alive() == 0) {