conf: fix overwriting locked options during copy
If we copy entries into another context, we must not overwrite locked entries. Furthermore, if we copy a locked entry, we must also copy that lock. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
06c6e56d4c
commit
78cf66f087
@ -135,6 +135,12 @@ int conf_ctx_parse_ctx(struct conf_ctx *ctx, const struct conf_ctx *src)
|
||||
|
||||
if (d->type != s->type)
|
||||
continue;
|
||||
if (d->flags & CONF_LOCKED)
|
||||
continue;
|
||||
|
||||
if (s->flags & CONF_LOCKED)
|
||||
d->flags |= CONF_LOCKED;
|
||||
|
||||
if (!d->type->copy)
|
||||
continue;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user