diff options
-rw-r--r-- | shell/ash.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index 369bb5bb9..e7a0e5dc5 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -13578,7 +13578,8 @@ init(void) | |||
13578 | 13578 | ||
13579 | /* some initialisation normally performed at login */ | 13579 | /* some initialisation normally performed at login */ |
13580 | pw = xgetpwuid(getuid()); | 13580 | pw = xgetpwuid(getuid()); |
13581 | setup_environment(pw->pw_shell, SETUP_ENV_CHANGEENV, pw); | 13581 | setup_environment(pw->pw_shell, |
13582 | SETUP_ENV_CHANGEENV|SETUP_ENV_NO_CHDIR, pw); | ||
13582 | } | 13583 | } |
13583 | #endif | 13584 | #endif |
13584 | for (envp = environ; envp && *envp; envp++) { | 13585 | for (envp = environ; envp && *envp; envp++) { |
@@ -13823,6 +13824,11 @@ int ash_main(int argc UNUSED_PARAM, char **argv) | |||
13823 | if (isloginsh) { | 13824 | if (isloginsh) { |
13824 | const char *hp; | 13825 | const char *hp; |
13825 | 13826 | ||
13827 | #if ENABLE_PLATFORM_MINGW32 | ||
13828 | chdir(xgetpwuid(getuid())->pw_dir); | ||
13829 | setpwd(NULL, 0); | ||
13830 | #endif | ||
13831 | |||
13826 | state = 1; | 13832 | state = 1; |
13827 | read_profile("/etc/profile"); | 13833 | read_profile("/etc/profile"); |
13828 | state1: | 13834 | state1: |