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

List:       busybox
Subject:    Re: [PATCH] Re: ash fails to read $HOME/.profile
From:       Xabier Oneca  --  xOneca <xoneca () gmail ! com>
Date:       2017-06-27 19:47:28
Message-ID: CACkgH707JUv_ybsef0uz9VV4msBnsWHZ2unub6sDugH0EqVMnA () mail ! gmail ! com
[Download RAW message or body]

Hello,

> --- shell/ash.c.orig    2017-06-25 22:04:07.000000000 +0200
> +++ shell/ash.c 2017-06-26 22:09:29.245454443 +0200
> @@ -13629,8 +13629,15 @@ int ash_main(int argc UNUSED_PARAM, char
>   state1:
>                 state = 2;
>                 hp = lookupvar("HOME");
> -               if (hp)
> +               if (hp) {
> +#if ENABLE_ASH_EXPAND_PRMT
>                         read_profile("$HOME/.profile");
> +#else
> +                       hp = concat_path_file(hp, ".profile");
> +                       read_profile(hp);
> +                       free((char*)hp);
> +#endif
> +               }
>         }
>   state2:
>         state = 3;

What about always using the "else" part here and forget about
ENABLE_ASH_EXPAND_PRMT at all?

Cheers,

Xabier Oneca_,,_
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

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