diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-10-27 11:28:59 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-10-27 11:28:59 +0200 |
commit | 2eb0a7e1b9a579ba34e4780c9ed8e74f38bc6b85 (patch) | |
tree | d02a7697eafd348e66aa1ef17fc5334d7b8f950e /shell/hush.c | |
parent | 70392331a98d266af539be4b910812fc7b0a72d4 (diff) | |
download | busybox-w32-2eb0a7e1b9a579ba34e4780c9ed8e74f38bc6b85.tar.gz busybox-w32-2eb0a7e1b9a579ba34e4780c9ed8e74f38bc6b85.tar.bz2 busybox-w32-2eb0a7e1b9a579ba34e4780c9ed8e74f38bc6b85.zip |
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>
Diffstat (limited to 'shell/hush.c')
-rw-r--r-- | shell/hush.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/shell/hush.c b/shell/hush.c index d7a0d761e..c80429d5c 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -8405,6 +8405,7 @@ int hush_main(int argc, char **argv) | |||
8405 | * "bash <script>" (which is never interactive (unless -i?)) | 8405 | * "bash <script>" (which is never interactive (unless -i?)) |
8406 | * sources $BASH_ENV here (without scanning $PATH). | 8406 | * sources $BASH_ENV here (without scanning $PATH). |
8407 | * If called as sh, does the same but with $ENV. | 8407 | * If called as sh, does the same but with $ENV. |
8408 | * Also NB, per POSIX, $ENV should undergo parameter expansion. | ||
8408 | */ | 8409 | */ |
8409 | G.global_argc--; | 8410 | G.global_argc--; |
8410 | G.global_argv++; | 8411 | G.global_argv++; |