util-linux/util-linux-2.22-su_paths.patch

19 lines
707 B
Diff

--- a/login-utils/su.c.badpaths Tue Apr 05 14:26:55 2005
+++ b/login-utils/su.c Tue Apr 05 14:40:21 EDT 2005
@@ -147,6 +147,15 @@
#define DEFAULT_ROOT_LOGIN_PATH "/usr/ucb:/bin:/usr/bin:/etc"
#endif
+/* The default paths which get set are both bogus and oddly influenced
+ by <paths.h> and -D on the commands line. Just to be clear, we'll set
+ these explicitly. -ewt */
+#undef DEFAULT_LOGIN_PATH
+#undef DEFAULT_ROOT_LOGIN_PATH
+#define DEFAULT_LOGIN_PATH "/bin:/usr/bin:/usr/local/bin"
+#define DEFAULT_ROOT_LOGIN_PATH \
+ "/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
+
/* The shell to run if none is given in the user's passwd entry. */
#define DEFAULT_SHELL "/bin/sh"