]> git.ipfire.org Git - thirdparty/hostap.git/commit
Use lchown() instead of chown() for self-created files
authorJouni Malinen <j@w1.fi>
Sun, 6 Jan 2019 18:28:04 +0000 (20:28 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 6 Jan 2019 18:28:04 +0000 (20:28 +0200)
commit02f52ab6f5cedf4b51e799dfbde692fea92d7702
tree4eee3fba6c59cda9e3338e8f51da0986e7608d76
parentb686745c76b8fe88a6d4adda1be136d2d74f094c
Use lchown() instead of chown() for self-created files

There is no need to allow symlink dereferencing in these cases where a
file (including directories and sockets) are created by the same
process, so use the safer lchown() variant to avoid leaving potential
windows for something external to replace the file before the chown()
call. The particular locations used here should not have write
permissions enabled for processes with less privileges, so this may not
be needed, but anyway, it is better to make these more restrictive
should there be cases where directory permissions are not as expected
for a good deployment.

Signed-off-by: Jouni Malinen <j@w1.fi>
hostapd/ctrl_iface.c
hs20/client/osu_client.c
wpa_supplicant/ctrl_iface_unix.c
wpa_supplicant/hs20_supplicant.c