hostap/wpa_supplicant/dbus
Paul Stewart 45ac5793fc new_dbus_handlers: Clear errno
There are a few instances where dbus handlers test the value
of errno to test whether strtoul completes successfully.
Since strtoul does not clear errno, and there's no strong
reason to suspect that errno is already clear, it is safer
to clear it right before calling strtoul.  Also, any failure
in strtoul (setting errno non-zero) should be considered a
failure.

While testing using dbus-send, I found that a malformed
network path can cause a crash due to net_id being left
NULL.  We should test for this before calling strtoul
on it.

Tested with:

dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \
    /fi/w1/wpa_supplicant1/Interfaces/0 \
    org.freedesktop.DBus.Properties.Get \
    string:fi.w1.wpa_supplicant1.Interface string:Networks
dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \
   /fi/w1/wpa_supplicant1/Interfaces/0 \
   fi.w1.wpa_supplicant1.Interface.RemoveNetwork \
   objpath:/fi/w1/wpa_supplicant1/Interfaces/0/Networks/0
dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \
   /fi/w1/wpa_supplicant1/Interfaces/0 \
   fi.w1.wpa_supplicant1.Interface.RemoveNetwork \
   objpath:/fi/w1/wpa_supplicant1/Interfaces/0/Networks/0
dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \
   /fi/w1/wpa_supplicant1/Interfaces/0 \
   fi.w1.wpa_supplicant1.Interface.RemoveNetwork \
   objpath:/fi/w1/wpa_supplicant1/Interfaces/0

Signed-hostap: Paul Stewart <pstew@chromium.org>
intended-for: hostap-1
2012-11-11 11:18:31 +02:00
..
.gitignore dbus: Clean dbus build files on wpa_supplicant 'make clean' 2009-12-20 20:29:09 +02:00
dbus-wpa_supplicant.conf Move D-Bus related files into their own subdirectory 2009-12-20 20:11:14 +02:00
dbus_common.c Update license notification in D-Bus interface files 2012-07-02 12:04:38 +03:00
dbus_common.h Update license notification in D-Bus interface files 2012-07-02 12:04:38 +03:00
dbus_common_i.h Update license notification in D-Bus interface files 2012-07-02 12:04:38 +03:00
dbus_dict_helpers.c Convert os_realloc() for an array to use os_realloc_array() 2012-08-13 21:21:23 +03:00
dbus_dict_helpers.h Update license notification in D-Bus interface files 2012-07-02 12:04:38 +03:00
dbus_new.c dbus: Add getter for WPS properties 2012-11-03 18:38:51 +02:00
dbus_new.h dbus: Add getter for WPS properties 2012-11-03 18:38:51 +02:00
dbus_new_handlers.c new_dbus_handlers: Clear errno 2012-11-11 11:18:31 +02:00
dbus_new_handlers.h dbus: Add getter for WPS properties 2012-11-03 18:38:51 +02:00
dbus_new_handlers_p2p.c P2P: Allow p2p_invite-persistent to specify channel for GO 2012-08-31 21:20:51 +03:00
dbus_new_handlers_p2p.h Update copyright and license notification in D-Bus interace P2P files 2012-05-07 13:07:22 +03:00
dbus_new_handlers_wps.c WPS: Allow PIN timeout to be specified with wpa_supplicant AP/GO 2012-10-10 17:22:35 +03:00
dbus_new_helpers.c Update license notification in D-Bus interface files 2012-07-02 12:04:38 +03:00
dbus_new_helpers.h Update license notification in D-Bus interface files 2012-07-02 12:04:38 +03:00
dbus_new_introspect.c Update license notification in D-Bus interface files 2012-07-02 12:04:38 +03:00
dbus_old.c Update license notification in D-Bus interface files 2012-07-02 12:04:38 +03:00
dbus_old.h Update license notification in D-Bus interface files 2012-07-02 12:04:38 +03:00
dbus_old_handlers.c Update license notification in D-Bus interface files 2012-07-02 12:04:38 +03:00
dbus_old_handlers.h Update license notification in D-Bus interface files 2012-07-02 12:04:38 +03:00
dbus_old_handlers_wps.c Update license notification in D-Bus interface files 2012-07-02 12:04:38 +03:00
fi.epitest.hostap.WPASupplicant.service.in wpa_supplicant: Edit BINDIR in dbus and systemd service files 2011-07-15 12:25:02 +03:00
fi.w1.wpa_supplicant1.service.in wpa_supplicant: Edit BINDIR in dbus and systemd service files 2011-07-15 12:25:02 +03:00
Makefile dbus: Remove unused D-Bus version defines 2012-01-29 12:53:12 +02:00