aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface_unix.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-06-13 22:20:18 (GMT)
committerJouni Malinen <j@w1.fi>2014-06-14 09:32:52 (GMT)
commitf62415df8a948b62ba6f88c24f854d38626f8bb1 (patch)
treeb45ac6efb610890eebfdbcb598ff5b12ab4ce405 /wpa_supplicant/ctrl_iface_unix.c
parent305000e160f26cfbbe93a099027e23bb2bdc97fc (diff)
downloadhostap-f62415df8a948b62ba6f88c24f854d38626f8bb1.zip
hostap-f62415df8a948b62ba6f88c24f854d38626f8bb1.tar.gz
hostap-f62415df8a948b62ba6f88c24f854d38626f8bb1.tar.bz2
Note chmod() failure in debug log even in ignore case (CID 62843)
If this chmod() call fails, the global control interface is allowed to be used since there was no change to its group. Anyway, it can be helpful to note the error case in debug log instead of silently ignoring it. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/ctrl_iface_unix.c')
-rw-r--r--wpa_supplicant/ctrl_iface_unix.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/wpa_supplicant/ctrl_iface_unix.c b/wpa_supplicant/ctrl_iface_unix.c
index d4e45de..40082e2 100644
--- a/wpa_supplicant/ctrl_iface_unix.c
+++ b/wpa_supplicant/ctrl_iface_unix.c
@@ -990,7 +990,13 @@ static int wpas_global_ctrl_iface_open_sock(struct wpa_global *global,
goto fail;
}
} else {
- chmod(ctrl, S_IRWXU);
+ if (chmod(ctrl, S_IRWXU) < 0) {
+ wpa_printf(MSG_DEBUG,
+ "chmod[global_ctrl_interface=%s](S_IRWXU): %s",
+ ctrl, strerror(errno));
+ /* continue anyway since group change was not required
+ */
+ }
}
havesock: