[U-Boot] [PATCH] Handle environment variables like commands
Wolfgang Denk
wd at denx.de
Wed Oct 15 13:01:56 CEST 2008
Dear Petri Lehtinen,
In message <20081015104550.GB6881 at colossus> you wrote:
>
> > The command interpreter checks always if an environment variable
> > for that name exists and in this case the content of the variable
> > is executed. It becomes possible to redefine all U-Boot commands.
> > A new "builtin" command is added to be able to run builtin U-boot commands
> > even if they are redefined.
...
> It seems to me that the "builtin" command itself can still be
> redefined. Is this an issue?
Good catch. Yes, this must be prevented. Any variable named "builtin"
must be ignored here - i. e. we should issue an erro when someone
tries a "setenv", and ignore this variable explicitly (just in case
someone sneaks this into the default environment, or uses un-fixed
Linux tools to create such a variable).
Thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Objects in mirror are closer than they appear.
More information about the U-Boot
mailing list