diff options
author | Damien Miller <djm@mindrot.org> | 2002-05-13 10:48:57 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2002-05-13 10:48:57 +1000 |
commit | a18bbd398e053acb58a79a2b4e0f13b4db8a0bae (patch) | |
tree | 0d570609b81ffd0217ce20c46058d3cdad593d72 | |
parent | 802b9568686032c81e4a998dc282df6ed63d4090 (diff) |
- (djm) Add --with-superuser-path=xxx configure option to specify what $PATH
the superuser receives.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | configure.ac | 19 | ||||
-rw-r--r-- | session.c | 5 |
3 files changed, 28 insertions, 2 deletions
@@ -1,3 +1,7 @@ | |||
1 | 20020513 | ||
2 | - (djm) Add --with-superuser-path=xxx configure option to specify what $PATH | ||
3 | the superuser receives. | ||
4 | |||
1 | 20020511 | 5 | 20020511 |
2 | - (tim) [configure.ac] applied a rework of djm's OpenSSL search cleanup patch. | 6 | - (tim) [configure.ac] applied a rework of djm's OpenSSL search cleanup patch. |
3 | Now only searches system and /usr/local/ssl (OpenSSL's default install path) | 7 | Now only searches system and /usr/local/ssl (OpenSSL's default install path) |
@@ -567,4 +571,4 @@ | |||
567 | - (stevesk) entropy.c: typo in debug message | 571 | - (stevesk) entropy.c: typo in debug message |
568 | - (djm) ssh-keygen -i needs seeded RNG; report from markus@ | 572 | - (djm) ssh-keygen -i needs seeded RNG; report from markus@ |
569 | 573 | ||
570 | $Id: ChangeLog,v 1.2106 2002/05/11 22:30:04 tim Exp $ | 574 | $Id: ChangeLog,v 1.2107 2002/05/13 00:48:57 djm Exp $ |
diff --git a/configure.ac b/configure.ac index 637b14e40..1b8aa5e1c 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: configure.ac,v 1.56 2002/05/11 20:17:44 tim Exp $ | 1 | # $Id: configure.ac,v 1.57 2002/05/13 00:48:58 djm Exp $ |
2 | 2 | ||
3 | AC_INIT | 3 | AC_INIT |
4 | AC_CONFIG_SRCDIR([ssh.c]) | 4 | AC_CONFIG_SRCDIR([ssh.c]) |
@@ -2011,6 +2011,19 @@ if test "$USES_LOGIN_CONF" != "yes" ; then | |||
2011 | AC_SUBST(user_path) | 2011 | AC_SUBST(user_path) |
2012 | fi | 2012 | fi |
2013 | 2013 | ||
2014 | # Set superuser path separately to user path | ||
2015 | MD5_MSG="no" | ||
2016 | AC_ARG_WITH(superuser-path, | ||
2017 | [ --with-superuser-path= Specify different path for super-user], | ||
2018 | [ | ||
2019 | if test "x$withval" != "xno" ; then | ||
2020 | AC_DEFINE_UNQUOTED(SUPERUSER_PATH, "$withval") | ||
2021 | superuser_path=$withval | ||
2022 | fi | ||
2023 | ] | ||
2024 | ) | ||
2025 | |||
2026 | |||
2014 | # Whether to force IPv4 by default (needed on broken glibc Linux) | 2027 | # Whether to force IPv4 by default (needed on broken glibc Linux) |
2015 | IPV4_HACK_MSG="no" | 2028 | IPV4_HACK_MSG="no" |
2016 | AC_ARG_WITH(ipv4-default, | 2029 | AC_ARG_WITH(ipv4-default, |
@@ -2351,6 +2364,7 @@ E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}` | |||
2351 | F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}` | 2364 | F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}` |
2352 | G=`eval echo ${piddir}` ; G=`eval echo ${G}` | 2365 | G=`eval echo ${piddir}` ; G=`eval echo ${G}` |
2353 | H=`eval echo ${user_path}` ; H=`eval echo ${H}` | 2366 | H=`eval echo ${user_path}` ; H=`eval echo ${H}` |
2367 | I=`eval echo ${superuser_path}` ; I=`eval echo ${I}` | ||
2354 | 2368 | ||
2355 | echo "" | 2369 | echo "" |
2356 | echo "OpenSSH has been configured with the following options:" | 2370 | echo "OpenSSH has been configured with the following options:" |
@@ -2365,6 +2379,9 @@ echo " At runtime, sshd will use the path defined in /etc/login.conf" | |||
2365 | else | 2379 | else |
2366 | echo " sshd default user PATH: $H" | 2380 | echo " sshd default user PATH: $H" |
2367 | fi | 2381 | fi |
2382 | if test ! -z "$superuser_path" ; then | ||
2383 | echo " sshd superuser user PATH: $I" | ||
2384 | fi | ||
2368 | echo " Manpage format: $MANTYPE" | 2385 | echo " Manpage format: $MANTYPE" |
2369 | echo " PAM support: ${PAM_MSG}" | 2386 | echo " PAM support: ${PAM_MSG}" |
2370 | echo " KerberosIV support: $KRB4_MSG" | 2387 | echo " KerberosIV support: $KRB4_MSG" |
@@ -871,7 +871,12 @@ do_setup_env(Session *s, const char *shell) | |||
871 | * needed for loading shared libraries. So the path better | 871 | * needed for loading shared libraries. So the path better |
872 | * remains intact here. | 872 | * remains intact here. |
873 | */ | 873 | */ |
874 | # ifdef SUPERUSER_PATH | ||
875 | child_set_env(&env, &envsize, "PATH", | ||
876 | s->pw->pw_uid == 0 ? SUPERUSER_PATH : _PATH_STDPATH); | ||
877 | # else | ||
874 | child_set_env(&env, &envsize, "PATH", _PATH_STDPATH); | 878 | child_set_env(&env, &envsize, "PATH", _PATH_STDPATH); |
879 | # endif /* SUPERUSER_PATH */ | ||
875 | # endif /* HAVE_CYGWIN */ | 880 | # endif /* HAVE_CYGWIN */ |
876 | #endif /* HAVE_LOGIN_CAP */ | 881 | #endif /* HAVE_LOGIN_CAP */ |
877 | 882 | ||