From 248d5fd870d94dbb94cbd4342d717472dc217a1c Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Sun, 1 Nov 2009 16:57:59 +0000 Subject: [PATCH] 2009-11-01 Michel Hermier * src/su.c: Set the default ENV_SUPATH to /sbin:/bin:/usr/sbin:/usr/bin (i.e. PATH when no ENV_SUPATH is specified). --- ChangeLog | 6 ++++++ src/su.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e91c4d58..b17507e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-11-01 Michel Hermier + + * src/su.c: Set the default ENV_SUPATH to + /sbin:/bin:/usr/sbin:/usr/bin (i.e. PATH when no ENV_SUPATH is + specified). + 2009-10-15 Thorsten Kukuk * src/faillog.c, man/faillog.8.xml: Harmonize long option in code diff --git a/src/su.c b/src/su.c index 871d7fee..97970037 100644 --- a/src/su.c +++ b/src/su.c @@ -869,7 +869,7 @@ int main (int argc, char **argv) cp = getdef_str ((pwent.pw_uid == 0) ? "ENV_SUPATH" : "ENV_PATH"); if (NULL == cp) { - addenv ("PATH=/bin:/usr/bin", NULL); + addenv ((pwent.pw_uid == 0) ? "PATH=/sbin:/bin:/usr/sbin:/usr/bin" : "PATH=/bin:/usr/bin", NULL); } else if (strchr (cp, '=') != NULL) { addenv (cp, NULL); } else { -- 2.40.0