diff options
author | Tim Rice <tim@multitalents.net> | 2001-03-10 13:50:45 -0800 |
---|---|---|
committer | Tim Rice <tim@multitalents.net> | 2001-03-10 13:50:45 -0800 |
commit | 59ea0a0efd273671167a58108532b3c48daa3573 (patch) | |
tree | 608bbf9cc63418f1b77a5ce98de502e2a2abaa4d | |
parent | d20d0f3e27884c7daf9d48d335168898e147b65b (diff) |
make sure $bindir is in USER_PATH so scp will work
-rw-r--r-- | Makefile.in | 5 | ||||
-rw-r--r-- | configure.in | 60 | ||||
-rw-r--r-- | sshd_config | 2 |
3 files changed, 63 insertions, 4 deletions
diff --git a/Makefile.in b/Makefile.in index c109e098d..f4f77e9fd 100644 --- a/Makefile.in +++ b/Makefile.in | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: Makefile.in,v 1.157 2001/03/09 19:48:37 mouring Exp $ | 1 | # $Id: Makefile.in,v 1.158 2001/03/10 21:50:46 tim Exp $ |
2 | 2 | ||
3 | prefix=@prefix@ | 3 | prefix=@prefix@ |
4 | exec_prefix=@exec_prefix@ | 4 | exec_prefix=@exec_prefix@ |
@@ -68,7 +68,8 @@ PATHSUBS = \ | |||
68 | -D/var/run/sshd.pid=$(piddir)/sshd.pid \ | 68 | -D/var/run/sshd.pid=$(piddir)/sshd.pid \ |
69 | -D/etc/primes=$(sysconfdir)/primes \ | 69 | -D/etc/primes=$(sysconfdir)/primes \ |
70 | -D/etc/sshrc=$(sysconfdir)/sshrc \ | 70 | -D/etc/sshrc=$(sysconfdir)/sshrc \ |
71 | -D/usr/X11R6/bin/xauth=$(XAUTH_PATH) | 71 | -D/usr/X11R6/bin/xauth=$(XAUTH_PATH) \ |
72 | -D/usr/bin:/bin:/usr/sbin:/sbin=@user_path@ | ||
72 | 73 | ||
73 | FIXPATHSCMD = $(PERL) $(srcdir)/fixpaths $(PATHSUBS) | 74 | FIXPATHSCMD = $(PERL) $(srcdir)/fixpaths $(PATHSUBS) |
74 | 75 | ||
diff --git a/configure.in b/configure.in index 176e3b4ba..9edb6ac6e 100644 --- a/configure.in +++ b/configure.in | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: configure.in,v 1.262 2001/03/08 18:26:57 stevesk Exp $ | 1 | # $Id: configure.in,v 1.263 2001/03/10 21:50:45 tim Exp $ |
2 | 2 | ||
3 | AC_INIT(ssh.c) | 3 | AC_INIT(ssh.c) |
4 | 4 | ||
@@ -1418,11 +1418,65 @@ AC_ARG_WITH(default-path, | |||
1418 | [ --with-default-path=PATH Specify default \$PATH environment for server], | 1418 | [ --with-default-path=PATH Specify default \$PATH environment for server], |
1419 | [ | 1419 | [ |
1420 | if test "x$withval" != "xno" ; then | 1420 | if test "x$withval" != "xno" ; then |
1421 | AC_DEFINE_UNQUOTED(USER_PATH, "$withval") | 1421 | user_path="$withval" |
1422 | SERVER_PATH_MSG="$withval" | 1422 | SERVER_PATH_MSG="$withval" |
1423 | fi | 1423 | fi |
1424 | ], | ||
1425 | [ | ||
1426 | AC_TRY_RUN( | ||
1427 | [ | ||
1428 | /* find out what STDPATH is */ | ||
1429 | #include <stdio.h> | ||
1430 | #include "config.h" | ||
1431 | #ifdef HAVE_PATHS_H | ||
1432 | # include <paths.h> | ||
1433 | #endif | ||
1434 | #ifndef _PATH_STDPATH | ||
1435 | # define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin" | ||
1436 | #endif | ||
1437 | #include <sys/types.h> | ||
1438 | #include <sys/stat.h> | ||
1439 | #include <fcntl.h> | ||
1440 | #define DATA "conftest.stdpath" | ||
1441 | |||
1442 | main() | ||
1443 | { | ||
1444 | FILE *fd; | ||
1445 | int rc; | ||
1446 | |||
1447 | fd = fopen(DATA,"w"); | ||
1448 | if(fd == NULL) | ||
1449 | exit(1); | ||
1450 | |||
1451 | if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0) | ||
1452 | exit(1); | ||
1453 | |||
1454 | exit(0); | ||
1455 | } | ||
1456 | ], [ user_path=`cat conftest.stdpath` ], | ||
1457 | [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ], | ||
1458 | [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ] | ||
1459 | ) | ||
1460 | # make sure $bindir is in USER_PATH so scp will work | ||
1461 | t_bindir=`eval echo ${bindir}` | ||
1462 | case $t_bindir in | ||
1463 | NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$prefix~"` ;; | ||
1464 | esac | ||
1465 | case $t_bindir in | ||
1466 | NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$ac_default_prefix~"` ;; | ||
1467 | esac | ||
1468 | echo $user_path | grep ":$t_bindir" > /dev/null 2>&1 | ||
1469 | if test $? -ne 0 ; then | ||
1470 | echo $user_path | grep "^$t_bindir" > /dev/null 2>&1 | ||
1471 | if test $? -ne 0 ; then | ||
1472 | user_path=$user_path:$t_bindir | ||
1473 | AC_MSG_RESULT(Adding $t_bindir to USER_PATH so scp will work) | ||
1474 | fi | ||
1475 | fi | ||
1424 | ] | 1476 | ] |
1425 | ) | 1477 | ) |
1478 | AC_DEFINE_UNQUOTED(USER_PATH, "$user_path") | ||
1479 | AC_SUBST(user_path) | ||
1426 | 1480 | ||
1427 | # Whether to force IPv4 by default (needed on broken glibc Linux) | 1481 | # Whether to force IPv4 by default (needed on broken glibc Linux) |
1428 | IPV4_HACK_MSG="no" | 1482 | IPV4_HACK_MSG="no" |
@@ -1779,6 +1833,7 @@ D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}` | |||
1779 | E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}` | 1833 | E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}` |
1780 | F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}` | 1834 | F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}` |
1781 | G=`eval echo ${piddir}` ; G=`eval echo ${G}` | 1835 | G=`eval echo ${piddir}` ; G=`eval echo ${G}` |
1836 | H=`eval echo ${user_path}` ; H=`eval echo ${H}` | ||
1782 | 1837 | ||
1783 | echo "" | 1838 | echo "" |
1784 | echo "OpenSSH configured has been configured with the following options." | 1839 | echo "OpenSSH configured has been configured with the following options." |
@@ -1788,6 +1843,7 @@ echo " Configuration files: $D" | |||
1788 | echo " Askpass program: $E" | 1843 | echo " Askpass program: $E" |
1789 | echo " Manual pages: $F" | 1844 | echo " Manual pages: $F" |
1790 | echo " PID file: $G" | 1845 | echo " PID file: $G" |
1846 | echo " sshd default user PATH: $H" | ||
1791 | echo " Random number collection: $RAND_MSG" | 1847 | echo " Random number collection: $RAND_MSG" |
1792 | echo " Manpage format: $MAN_MSG" | 1848 | echo " Manpage format: $MAN_MSG" |
1793 | echo " PAM support: ${PAM_MSG}" | 1849 | echo " PAM support: ${PAM_MSG}" |
diff --git a/sshd_config b/sshd_config index 0e2970078..c122558b5 100644 --- a/sshd_config +++ b/sshd_config | |||
@@ -1,5 +1,7 @@ | |||
1 | # $OpenBSD: sshd_config,v 1.34 2001/02/24 10:37:26 deraadt Exp $ | 1 | # $OpenBSD: sshd_config,v 1.34 2001/02/24 10:37:26 deraadt Exp $ |
2 | 2 | ||
3 | # This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin | ||
4 | |||
3 | # This is the sshd server system-wide configuration file. See sshd(8) | 5 | # This is the sshd server system-wide configuration file. See sshd(8) |
4 | # for more information. | 6 | # for more information. |
5 | 7 | ||