coreutils/coreutils-6.9-su_setrootpaths.patch

14 lines
442 B
Diff

diff -ru coreutils-6.9.orig/src/su.c coreutils-6.9/src/su.c
--- coreutils-6.9.orig/src/su.c 2007-04-19 12:05:12.000000000 +0200
+++ coreutils-6.9/src/su.c 2007-04-19 12:07:56.000000000 +0200
@@ -387,6 +387,9 @@
xsetenv ("USER", pw->pw_name);
xsetenv ("LOGNAME", pw->pw_name);
}
+ xsetenv ("PATH", (pw->pw_uid
+ ? DEFAULT_LOGIN_PATH
+ : DEFAULT_ROOT_LOGIN_PATH));
}
}
}