svn commit: trunk/busybox/libbb

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Fri Oct 31 09:08:41 UTC 2008


On Thu, Oct 30, 2008 at 04:58:20PM -0700, vda at busybox.net wrote:
>Author: vda
>Date: 2008-10-30 16:58:19 -0700 (Thu, 30 Oct 2008)
>New Revision: 23867
>
>Log:
>setup_environment: cd $HOME regardless of clear_env value.

> 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);

I'd put the error_msg before the xchdir, just to be paranoid..



More information about the busybox mailing list