aboutsummaryrefslogtreecommitdiff
path: root/libbb/setup_environment.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/setup_environment.c')
-rw-r--r--libbb/setup_environment.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbb/setup_environment.c b/libbb/setup_environment.c
index aeb285a53..dfab786d9 100644
--- a/libbb/setup_environment.c
+++ b/libbb/setup_environment.c
@@ -58,7 +58,7 @@ void setup_environment ( const char *shell, int loginshell, int changeenv, const
58 * to change to that directory. There is no "default" home 58 * to change to that directory. There is no "default" home
59 * directory. 59 * directory.
60 * Some systems default to HOME=/ 60 * Some systems default to HOME=/
61 */ 61 */
62 if ( chdir ( pw-> pw_dir )) { 62 if ( chdir ( pw-> pw_dir )) {
63 if ( chdir ( "/" )) { 63 if ( chdir ( "/" )) {
64 syslog ( LOG_WARNING, "unable to cd to %s' for user %s'\n", pw-> pw_dir, pw-> pw_name ); 64 syslog ( LOG_WARNING, "unable to cd to %s' for user %s'\n", pw-> pw_dir, pw-> pw_name );
@@ -81,7 +81,7 @@ void setup_environment ( const char *shell, int loginshell, int changeenv, const
81 } 81 }
82 else if ( changeenv ) { 82 else if ( changeenv ) {
83 /* Set HOME, SHELL, and if not becoming a super-user, 83 /* Set HOME, SHELL, and if not becoming a super-user,
84 USER and LOGNAME. */ 84 USER and LOGNAME. */
85 xsetenv ( "HOME", pw-> pw_dir ); 85 xsetenv ( "HOME", pw-> pw_dir );
86 xsetenv ( "SHELL", shell ); 86 xsetenv ( "SHELL", shell );
87 if ( pw-> pw_uid ) { 87 if ( pw-> pw_uid ) {