projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3945c6
)
network: warn when wireguard keys are stored in world readable files
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Sun, 7 Apr 2019 18:48:57 +0000
(
03:48
+0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Tue, 9 Apr 2019 06:50:22 +0000
(15:50 +0900)
src/network/netdev/wireguard.c
patch
|
blob
|
history
diff --git
a/src/network/netdev/wireguard.c
b/src/network/netdev/wireguard.c
index
0b61896
..
5fac92a
100644
(file)
--- a/
src/network/netdev/wireguard.c
+++ b/
src/network/netdev/wireguard.c
@@
-494,6
+494,9
@@
static int wireguard_decode_key_and_warn(
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);
if (r < 0) {
log_syntax(unit, LOG_ERR, filename, line, r,