]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
[HAVE_PATHS_H]: Include <paths.h>.
authorJim Meyering <jim@meyering.net>
Thu, 19 Dec 1996 04:20:53 +0000 (04:20 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 19 Dec 1996 04:20:53 +0000 (04:20 +0000)
[_PATH_DEFPATH]: Use this to define DEFAULT_LOGIN_PATH.
[_PATH_DEFPATH_ROOT]: Use this to define DEFAULT_ROOT_LOGIN_PATH.
From Rik Faith.

login-utils/su.c

index 6399d7cf861d38e30a339f2ea3f3131526f91f85..51e2e8165fa928330029b01db5c5dbd1bd8ea504 100644 (file)
@@ -114,11 +114,23 @@ uid_t getuid ();
 
 #include "error.h"
 
+#ifdef HAVE_PATHS_H
+#include <paths.h>
+#endif
+
 /* The default PATH for simulated logins to non-superuser accounts.  */
+#ifdef _PATH_DEFPATH
+#define DEFAULT_LOGIN_PATH _PATH_DEFPATH
+#else
 #define DEFAULT_LOGIN_PATH ":/usr/ucb:/bin:/usr/bin"
+#endif
 
 /* The default PATH for simulated logins to superuser accounts.  */
+#ifdef _PATH_DEFPATH_ROOT
+#define DEFAULT_ROOT_LOGIN_PATH _PATH_DEFPATH_ROOT
+#else
 #define DEFAULT_ROOT_LOGIN_PATH "/usr/ucb:/bin:/usr/bin:/etc"
+#endif
 
 /* The shell to run if none is given in the user's passwd entry.  */
 #define DEFAULT_SHELL "/bin/sh"