mirror of
https://github.com/systemd/systemd.git
synced 2024-12-25 01:34:28 +03:00
network: warn when wireguard keys are stored in world readable files
This commit is contained in:
parent
a3945c6361
commit
26f86d500e
@ -494,6 +494,9 @@ static int wireguard_decode_key_and_warn(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!streq(lvalue, "PublicKey"))
|
||||||
|
(void) warn_file_is_world_accessible(filename, NULL, unit, line);
|
||||||
|
|
||||||
r = unbase64mem_full(rvalue, strlen(rvalue), true, &key, &len);
|
r = unbase64mem_full(rvalue, strlen(rvalue), true, &key, &len);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
log_syntax(unit, LOG_ERR, filename, line, r,
|
log_syntax(unit, LOG_ERR, filename, line, r,
|
||||||
|
Loading…
Reference in New Issue
Block a user