1
1
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:
Yu Watanabe 2021-01-18 01:32:49 +09:00
parent 8c6493e59e
commit 2400743e1f

View File

@ -4541,8 +4541,11 @@ int config_parse_set_credential(
r = hashmap_ensure_put(&context->set_credentials, &exec_set_credential_hash_ops, sc->id, sc); r = hashmap_ensure_put(&context->set_credentials, &exec_set_credential_hash_ops, sc->id, sc);
if (r == -ENOMEM) if (r == -ENOMEM)
return log_oom(); return log_oom();
if (r < 0) if (r < 0) {
return r; log_syntax(unit, LOG_WARNING, filename, line, l,
"Duplicated credential value '%s', ignoring assignment: %s", sc->id, rvalue);
return 0;
}
TAKE_PTR(sc); TAKE_PTR(sc);
} }