ash: [SHELL] Expand ENV before using it

Upstream commit:

    Date: Sun, 13 Jul 2008 21:51:52 +0800
    [SHELL] Expand ENV before using it

    Per POSIX ENV needs to undergo parameter expansion.

    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2016-10-27 11:28:59 +02:00
parent 70392331a9
commit 2eb0a7e1b9
2 changed files with 8 additions and 10 deletions

View File

@@ -8405,6 +8405,7 @@ int hush_main(int argc, char **argv)
* "bash <script>" (which is never interactive (unless -i?))
* sources $BASH_ENV here (without scanning $PATH).
* If called as sh, does the same but with $ENV.
* Also NB, per POSIX, $ENV should undergo parameter expansion.
*/
G.global_argc--;
G.global_argv++;