summaryrefslogtreecommitdiff
path: root/sbin/disklabel
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2015-10-15 19:30:04 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2015-10-15 19:30:04 +0000
commitd2546ad665f225654f6ce94b2dfbed4f814ff422 (patch)
tree679ae73a178926f19a25060ab94cea97e0520c6c /sbin/disklabel
parent244e984f33a2a20ee49b3e477bdba951ccf3d3a5 (diff)
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 'sbin/disklabel')
0 files changed, 0 insertions, 0 deletions