mirror of
https://xff.cz/git/u-boot/
synced 2025-08-31 16:22:36 +02:00
env: Add support for explicit write access list
This option marks any U-Boot variable which does not have explicit 'w' writeable flag set as read-only. This way the environment can be locked down and only variables explicitly configured to be writeable can ever be changed by either 'env import', 'env set' or loading user environment from environment storage. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
@@ -950,9 +950,12 @@ int himport_r(struct hsearch_data *htab,
|
||||
e.data = value;
|
||||
|
||||
hsearch_r(e, ENV_ENTER, &rv, htab, flag);
|
||||
if (rv == NULL)
|
||||
#if !CONFIG_IS_ENABLED(ENV_WRITEABLE_LIST)
|
||||
if (rv == NULL) {
|
||||
printf("himport_r: can't insert \"%s=%s\" into hash table\n",
|
||||
name, value);
|
||||
}
|
||||
#endif
|
||||
|
||||
debug("INSERT: table %p, filled %d/%d rv %p ==> name=\"%s\" value=\"%s\"\n",
|
||||
htab, htab->filled, htab->size,
|
||||
|
Reference in New Issue
Block a user