diff options
author | Peter Korsgaard <jacmet@sunsite.dk> | 2008-11-02 13:06:44 +0000 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2008-11-02 13:06:44 +0000 |
commit | a2274077d97f7f1d5c5a5b28a044dbc012169d4b (patch) | |
tree | f9814439402bbd0ef3402a7101ae1cf00fa8e327 /package/busybox/busybox-1.12.1-login.patch | |
parent | 0138389b0b211312215fdd70c652d62cf6765edf (diff) | |
download | buildroot-novena-a2274077d97f7f1d5c5a5b28a044dbc012169d4b.tar.gz buildroot-novena-a2274077d97f7f1d5c5a5b28a044dbc012169d4b.zip |
busybox: additional 1.12.1 patches
Diffstat (limited to 'package/busybox/busybox-1.12.1-login.patch')
-rw-r--r-- | package/busybox/busybox-1.12.1-login.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/package/busybox/busybox-1.12.1-login.patch b/package/busybox/busybox-1.12.1-login.patch new file mode 100644 index 000000000..cc015ea47 --- /dev/null +++ b/package/busybox/busybox-1.12.1-login.patch @@ -0,0 +1,25 @@ +--- busybox-1.12.1/libbb/setup_environment.c Sun Sep 28 20:04:20 2008 ++++ busybox-1.12.1-login/libbb/setup_environment.c Fri Oct 31 00:56:51 2008 +@@ -32,15 +32,15 @@ + + void FAST_FUNC setup_environment(const char *shell, int clear_env, int change_env, const struct passwd *pw) + { ++ /* Change the current working directory to be the home directory ++ * of the user */ ++ if (chdir(pw->pw_dir)) { ++ xchdir("/"); ++ bb_error_msg("can't chdir to home directory '%s'", pw->pw_dir); ++ } ++ + if (clear_env) { + const char *term; +- +- /* Change the current working directory to be the home directory +- * of the user */ +- if (chdir(pw->pw_dir)) { +- xchdir("/"); +- bb_error_msg("can't chdir to home directory '%s'", pw->pw_dir); +- } + + /* Leave TERM unchanged. Set HOME, SHELL, USER, LOGNAME, PATH. + Unset all other environment variables. */ |