diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index 413deb4d9..670764f52 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: configure.ac,v 1.25 2002/03/08 03:50:58 mouring Exp $ | 1 | # $Id: configure.ac,v 1.26 2002/03/17 20:17:35 tim Exp $ |
2 | 2 | ||
3 | AC_INIT | 3 | AC_INIT |
4 | AC_CONFIG_SRCDIR([ssh.c]) | 4 | AC_CONFIG_SRCDIR([ssh.c]) |
@@ -1006,6 +1006,20 @@ AC_ARG_WITH(entropy-timeout, | |||
1006 | 1006 | ||
1007 | AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout) | 1007 | AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout) |
1008 | 1008 | ||
1009 | # We do this little dance with the search path to insure | ||
1010 | # that programs that we select for use by installed programs | ||
1011 | # (which may be run by the super-user) come from trusted | ||
1012 | # locations before they come from the user's private area. | ||
1013 | # This should help avoid accidentally configuring some | ||
1014 | # random version of a program in someone's personal bin. | ||
1015 | |||
1016 | OPATH=$PATH | ||
1017 | PATH=/bin:/usr/bin | ||
1018 | test -L /bin && PATH=/usr/bin | ||
1019 | test -d /sbin && PATH=$PATH:/sbin | ||
1020 | test -d /usr/sbin && PATH=$PATH:/usr/sbin | ||
1021 | PATH=$PATH:/etc:$OPATH | ||
1022 | |||
1009 | # These programs are used by the command hashing source to gather entropy | 1023 | # These programs are used by the command hashing source to gather entropy |
1010 | OSSH_PATH_ENTROPY_PROG(PROG_LS, ls) | 1024 | OSSH_PATH_ENTROPY_PROG(PROG_LS, ls) |
1011 | OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat) | 1025 | OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat) |
@@ -1023,6 +1037,8 @@ OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat) | |||
1023 | OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime) | 1037 | OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime) |
1024 | OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs) | 1038 | OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs) |
1025 | OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail) | 1039 | OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail) |
1040 | # restore PATH | ||
1041 | PATH=$OPATH | ||
1026 | 1042 | ||
1027 | # Where does ssh-rand-helper get its randomness from? | 1043 | # Where does ssh-rand-helper get its randomness from? |
1028 | INSTALL_SSH_PRNG_CMDS="" | 1044 | INSTALL_SSH_PRNG_CMDS="" |
@@ -2007,23 +2023,26 @@ AC_SUBST(SSHMODE) | |||
2007 | 2023 | ||
2008 | # Where to place sshd.pid | 2024 | # Where to place sshd.pid |
2009 | piddir=/var/run | 2025 | piddir=/var/run |
2026 | # make sure the directory exists | ||
2027 | if test ! -d $piddir ; then | ||
2028 | piddir=`eval echo ${sysconfdir}` | ||
2029 | case $piddir in | ||
2030 | NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;; | ||
2031 | esac | ||
2032 | fi | ||
2033 | |||
2010 | AC_ARG_WITH(pid-dir, | 2034 | AC_ARG_WITH(pid-dir, |
2011 | [ --with-pid-dir=PATH Specify location of ssh.pid file], | 2035 | [ --with-pid-dir=PATH Specify location of ssh.pid file], |
2012 | [ | 2036 | [ |
2013 | if test "x$withval" != "xno" ; then | 2037 | if test "x$withval" != "xno" ; then |
2014 | piddir=$withval | 2038 | piddir=$withval |
2039 | if test ! -d $piddir ; then | ||
2040 | AC_MSG_WARN([** no $piddir directory on this system **]) | ||
2041 | fi | ||
2015 | fi | 2042 | fi |
2016 | ] | 2043 | ] |
2017 | ) | 2044 | ) |
2018 | 2045 | ||
2019 | # make sure the directory exists | ||
2020 | if test ! -d $piddir ; then | ||
2021 | piddir=`eval echo ${sysconfdir}` | ||
2022 | case $piddir in | ||
2023 | NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;; | ||
2024 | esac | ||
2025 | fi | ||
2026 | |||
2027 | AC_DEFINE_UNQUOTED(_PATH_SSH_PIDDIR, "$piddir") | 2046 | AC_DEFINE_UNQUOTED(_PATH_SSH_PIDDIR, "$piddir") |
2028 | AC_SUBST(piddir) | 2047 | AC_SUBST(piddir) |
2029 | 2048 | ||