mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
hostapd: Don't chown control interface to root
If ctrl_interface_group in the config file is set hostapd tries to chown the dir and socket to uid 0. This causes the chown to fail if hostapd is run as non-root. Signed-hostap: Pontus Fuchs <pontus.fuchs@gmail.com>
This commit is contained in:
parent
9904ff876a
commit
9cbd5845d0
@ -997,7 +997,7 @@ int hostapd_ctrl_iface_init(struct hostapd_data *hapd)
|
||||
}
|
||||
|
||||
if (hapd->conf->ctrl_interface_gid_set &&
|
||||
chown(hapd->conf->ctrl_interface, 0,
|
||||
chown(hapd->conf->ctrl_interface, -1,
|
||||
hapd->conf->ctrl_interface_gid) < 0) {
|
||||
perror("chown[ctrl_interface]");
|
||||
return -1;
|
||||
@ -1055,7 +1055,7 @@ int hostapd_ctrl_iface_init(struct hostapd_data *hapd)
|
||||
}
|
||||
|
||||
if (hapd->conf->ctrl_interface_gid_set &&
|
||||
chown(fname, 0, hapd->conf->ctrl_interface_gid) < 0) {
|
||||
chown(fname, -1, hapd->conf->ctrl_interface_gid) < 0) {
|
||||
perror("chown[ctrl_interface/ifname]");
|
||||
goto fail;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user