diff --git a/ChangeLog b/ChangeLog index 9ca51be28..952e9b61a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,11 @@ - Xauth fix from Markus Friedl - Don't touch utmp if USE_UTMPX defined - SunOS 4.x support from Todd C. Miller + - SIGCHLD fix for AIX and HPUX from Tom Bertelson + - HPUX and Configure fixes from Lutz Jaenicke + + - Use mkinstalldirs script to make directories instead of non-portable + "install -d". Suggested by Lutz Jaenicke 20000518 - Include Andre Lucas' fixprogs script. Forgot to "cvs add" it yesterday diff --git a/Makefile.in b/Makefile.in index 0dc71c6cd..584f3054d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -109,11 +109,11 @@ catman-do: done install: manpages $(TARGETS) - $(INSTALL) -d $(DESTDIR)$(bindir) - $(INSTALL) -d $(DESTDIR)$(sbindir) - $(INSTALL) -d $(DESTDIR)$(mandir) - $(INSTALL) -d $(DESTDIR)$(mandir)/$(mansubdir)1 - $(INSTALL) -d $(DESTDIR)$(mandir)/$(mansubdir)8 + ./mkinstalldirs $(DESTDIR)$(bindir) + ./mkinstalldirs $(DESTDIR)$(sbindir) + ./mkinstalldirs $(DESTDIR)$(mandir) + ./mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)1 + ./mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)8 $(INSTALL) -m 4755 -s ssh $(DESTDIR)$(bindir)/ssh $(INSTALL) -s scp $(DESTDIR)$(bindir)/scp $(INSTALL) -s ssh-add $(DESTDIR)$(bindir)/ssh-add @@ -132,7 +132,7 @@ install: manpages $(TARGETS) ln -s ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_config -a ! -f $(DESTDIR)$(sysconfdir)/sshd_config ]; then \ - $(INSTALL) -d $(DESTDIR)$(sysconfdir); \ + ./mkinstalldirs $(DESTDIR)$(sysconfdir); \ $(INSTALL) -m 644 ssh_config.out $(DESTDIR)$(sysconfdir)/ssh_config; \ $(INSTALL) -m 644 sshd_config.out $(DESTDIR)$(sysconfdir)/sshd_config; \ fi diff --git a/configure.in b/configure.in index 60036c7b4..a8b9794fd 100644 --- a/configure.in +++ b/configure.in @@ -39,11 +39,9 @@ case "$host" in ;; *-*-hpux10*) if test -z "$GCC"; then - CFLAGS="$CFLAGS -Aa" + CFLAGS="$CFLAGS -Ae" fi CFLAGS="$CFLAGS -D_HPUX_SOURCE" - CFLAGS="$CFLAGS -I/usr/local/include" - LDFLAGS="$LDFLAGS -L/usr/local/lib" AC_DEFINE(IPADDR_IN_DISPLAY) AC_DEFINE(USE_UTMPX) AC_MSG_CHECKING(for HPUX trusted system password database) @@ -64,8 +62,6 @@ case "$host" in CFLAGS="$CFLAGS -Ae" fi CFLAGS="$CFLAGS -D_HPUX_SOURCE" - CFLAGS="$CFLAGS -I/usr/local/include" - LDFLAGS="$LDFLAGS -L/usr/local/lib" AC_DEFINE(IPADDR_IN_DISPLAY) AC_DEFINE(USE_UTMPX) AC_MSG_CHECKING(for HPUX trusted system password database) diff --git a/mkinstalldirs b/mkinstalldirs new file mode 100755 index 000000000..614ef33d8 --- /dev/null +++ b/mkinstalldirs @@ -0,0 +1,40 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# Created: 1993-05-16 +# Public domain + +# $Id: mkinstalldirs,v 1.1 2000/05/20 05:33:45 damien Exp $ + +errstatus=0 + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# mkinstalldirs ends here diff --git a/serverloop.c b/serverloop.c index 58e901de8..977ed41f6 100644 --- a/serverloop.c +++ b/serverloop.c @@ -85,7 +85,6 @@ sigchld_handler2(int sig) int save_errno = errno; debug("Received SIGCHLD."); child_terminated = 1; - signal(SIGCHLD, sigchld_handler2); errno = save_errno; } @@ -650,6 +649,7 @@ server_loop2(void) while ((pid = waitpid(-1, &status, WNOHANG)) > 0) session_close_by_pid(pid, status); child_terminated = 0; + signal(SIGCHLD, sigchld_handler2); } channel_after_select(&readset, &writeset); process_input(&readset);