mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix environment passung to eval'ed commands.
PR: bin/6577 Submitted by: Anatoly Vorobey <mellon@pobox.com> Approved by: silence amoung other sh experts
This commit is contained in:
parent
e6b52a8395
commit
b2acf8878e
2 changed files with 2 additions and 1 deletions
|
|
@ -850,6 +850,7 @@ evalcommand(cmd, flags, backcmd)
|
|||
exitstatus = (*builtinfunc[cmdentry.u.index])(argc, argv);
|
||||
flushall();
|
||||
cmddone:
|
||||
cmdenviron = NULL;
|
||||
out1 = &output;
|
||||
out2 = &errout;
|
||||
freestdout();
|
||||
|
|
|
|||
|
|
@ -667,7 +667,7 @@ again: /* jump here after setting a variable with ${var=text} */
|
|||
set = varisset(var, varflags & VSNUL);
|
||||
val = NULL;
|
||||
} else {
|
||||
val = lookupvar(var);
|
||||
val = bltinlookup(var, 1);
|
||||
if (val == NULL || ((varflags & VSNUL) && val[0] == '\0')) {
|
||||
val = NULL;
|
||||
set = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue