mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +03:00
core: add logs when credential value is duplicated
This commit is contained in:
parent
8c6493e59e
commit
2400743e1f
@ -4541,8 +4541,11 @@ int config_parse_set_credential(
|
||||
r = hashmap_ensure_put(&context->set_credentials, &exec_set_credential_hash_ops, sc->id, sc);
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (r < 0) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, l,
|
||||
"Duplicated credential value '%s', ignoring assignment: %s", sc->id, rvalue);
|
||||
return 0;
|
||||
}
|
||||
|
||||
TAKE_PTR(sc);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user