summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-05-13 10:48:57 +1000
committerDamien Miller <djm@mindrot.org>2002-05-13 10:48:57 +1000
commita18bbd398e053acb58a79a2b4e0f13b4db8a0bae (patch)
tree0d570609b81ffd0217ce20c46058d3cdad593d72 /session.c
parent802b9568686032c81e4a998dc282df6ed63d4090 (diff)
- (djm) Add --with-superuser-path=xxx configure option to specify what $PATH
the superuser receives.
Diffstat (limited to 'session.c')
-rw-r--r--session.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/session.c b/session.c
index 20e6a889..10d803e9 100644
--- a/session.c
+++ b/session.c
@@ -871,7 +871,12 @@ do_setup_env(Session *s, const char *shell)
* needed for loading shared libraries. So the path better
* remains intact here.
*/
+# ifdef SUPERUSER_PATH
+ child_set_env(&env, &envsize, "PATH",
+ s->pw->pw_uid == 0 ? SUPERUSER_PATH : _PATH_STDPATH);
+# else
child_set_env(&env, &envsize, "PATH", _PATH_STDPATH);
+# endif /* SUPERUSER_PATH */
# endif /* HAVE_CYGWIN */
#endif /* HAVE_LOGIN_CAP */