]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
[configure.ac] Assume path given with --with-pid-dir=PATH is wanted,
authorTim Rice <tim@multitalents.net>
Sun, 17 Mar 2002 20:17:34 +0000 (12:17 -0800)
committerTim Rice <tim@multitalents.net>
Sun, 17 Mar 2002 20:17:34 +0000 (12:17 -0800)
warn if directory doesn not exist. Put system directories in front of
PATH for finding entorpy commands.

ChangeLog
configure.ac

index fe0e60d5cddd1c854503c0542252363fb6c7a7eb..f6c2735246b071d03e022bf4306ac4c4f466abf6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+20020317
+ - (tim) [configure.ac] Assume path given with --with-pid-dir=PATH is wanted,
+   warn if directory does not exist. Put system directories in front of
+   PATH for finding entorpy commands.
+
 20020311
  - (tim) [contrib/solaris/buildpkg.sh, contrib/solaris/README] Updated to
    build on all platforms that support SVR4 style package tools. Now runs
  - Wrote replacements for strlcpy and mkdtemp
  - Released 1.0pre1
 
-$Id: ChangeLog,v 1.1921 2002/03/12 04:55:53 tim Exp $
+$Id: ChangeLog,v 1.1922 2002/03/17 20:17:34 tim Exp $
index 413deb4d9345cd914cb37b97fa382c1bda376057..670764f52dc91b018999f115b5e78a65f5a48d1b 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: configure.ac,v 1.25 2002/03/08 03:50:58 mouring Exp $
+# $Id: configure.ac,v 1.26 2002/03/17 20:17:35 tim Exp $
 
 AC_INIT
 AC_CONFIG_SRCDIR([ssh.c])
@@ -1006,6 +1006,20 @@ AC_ARG_WITH(entropy-timeout,
 
 AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
 
+# We do this little dance with the search path to insure
+# that programs that we select for use by installed programs
+# (which may be run by the super-user) come from trusted
+# locations before they come from the user's private area.
+# This should help avoid accidentally configuring some
+# random version of a program in someone's personal bin.
+
+OPATH=$PATH
+PATH=/bin:/usr/bin
+test -L /bin && PATH=/usr/bin
+test -d /sbin && PATH=$PATH:/sbin
+test -d /usr/sbin && PATH=$PATH:/usr/sbin
+PATH=$PATH:/etc:$OPATH
+
 # These programs are used by the command hashing source to gather entropy 
 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
 OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
@@ -1023,6 +1037,8 @@ OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
 OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
 OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
 OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
+# restore PATH
+PATH=$OPATH
 
 # Where does ssh-rand-helper get its randomness from?
 INSTALL_SSH_PRNG_CMDS=""
@@ -2007,23 +2023,26 @@ AC_SUBST(SSHMODE)
 
 # Where to place sshd.pid
 piddir=/var/run
+# make sure the directory exists
+if test ! -d $piddir ; then    
+       piddir=`eval echo ${sysconfdir}`
+       case $piddir in
+               NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
+       esac
+fi
+
 AC_ARG_WITH(pid-dir,
        [  --with-pid-dir=PATH     Specify location of ssh.pid file],
        [
                if test "x$withval" != "xno" ; then     
                        piddir=$withval
+                       if test ! -d $piddir ; then     
+                       AC_MSG_WARN([** no $piddir directory on this system **])
+                       fi
                fi
        ]
 )
 
-# make sure the directory exists
-if test ! -d $piddir ; then    
-       piddir=`eval echo ${sysconfdir}`
-       case $piddir in
-               NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
-       esac
-fi
-
 AC_DEFINE_UNQUOTED(_PATH_SSH_PIDDIR, "$piddir")
 AC_SUBST(piddir)