[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: svn commit: trunk/busybox/libbb
From:       Bernhard Reutner-Fischer <rep.dot.nop () gmail ! com>
Date:       2008-10-31 9:08:41
Message-ID: 20081031090841.GG26468 () mx ! loc
[Download RAW message or body]

On Thu, Oct 30, 2008 at 04:58:20PM -0700, vda@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..
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic