summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2015-10-15 19:30:03 +0000
committerbluhm <bluhm@openbsd.org>2015-10-15 19:30:03 +0000
commitd2efe23825fe8bb84d6d754226a6134669f76c28 (patch)
treebd5c8e6c64ee5b0ac5b5daa2e046890e2d4144e1 /lib
parentNo need to create links for xxboot now that MI installboot is the preferred (diff)
downloadwireguard-openbsd-d2efe23825fe8bb84d6d754226a6134669f76c28.tar.xz
wireguard-openbsd-d2efe23825fe8bb84d6d754226a6134669f76c28.zip
Avoid a race between fopen(3) and fchmod(2). Use umask(2) and
unlink(2) and fopen(3) to prevent an attacker to open an old file with wrong permissions before the secret is written into it. This also guarantees that a new file with correct permissions is created. Without fchmod(2) "fattr" can be removed from pledge. with and OK deraadt@
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions