diff options
| author | Dmitry Shmidt <dimitrysh@google.com> | 2015-02-25 14:36:37 -0800 |
|---|---|---|
| committer | Dmitry Shmidt <dimitrysh@google.com> | 2015-03-10 11:04:32 -0700 |
| commit | 7f65602d49069f96a7bb44da8bd79ffe8d4c6a98 (patch) | |
| tree | 0f5470742861a3ea4efb80552c3f8282fb79092c /hs20 | |
| parent | 912d96b4e283c9bc0633a065901153bf74e1f911 (diff) | |
| download | android_external_wpa_supplicant_8-7f65602d49069f96a7bb44da8bd79ffe8d4c6a98.tar.gz android_external_wpa_supplicant_8-7f65602d49069f96a7bb44da8bd79ffe8d4c6a98.tar.bz2 android_external_wpa_supplicant_8-7f65602d49069f96a7bb44da8bd79ffe8d4c6a98.zip | |
Cumulative patch from commit f51f54a007e0de1d413dee3523472d3bbeed2ecc
f51f54a nl80211: Resubscribe to nl80211 events on global nl_event socket
48ec694 Fix Linux packet socket workaround to not close the socket too easily
0d2030e Use estimated throughput to improve roaming selection
1d747e2 Add snr and est_throughput to the BSS entries
a1b790e Select AP based on estimated maximum throughput
ab647ff Add wpa_supplicant Makefile target libwpa_ctrl.a
abae2d1 trace: Initialize alloc_list even without os_program_init() call
891dfb3 Add helper function to clear and free wpa_psk list
71d77ad Update current BSS level when signal change event occurs
f1609f1 wpa_supplicant: Cancel sched_scan when stopping countermeasures
abb8d08 nl80211: Add support for configuring P2P GO CTWindow
0b8bcaa P2P: Allow configuring CTWindow when working as GO
c77ffc6 TDLS: Ignore extra padding in all packets
5ce6ac1 Inteworking: Add support to update the ANQP Capability List into the BSS
185ada4 HS 2.0: Add support to update the HS20 Capability List into the BSS
7fe7a3a wpa_gui: Debug enhancement
2b892d4 Add forgotten network profile parameters to config file writing
563ee18 IBSS: Add support for VHT80 configuration
ada157f Make hostapd_set_freq_params() common
98479dc IBSS: Update operating frequency if joining an existing IBSS
4d9e6fb IBSS: Add fixed_freq network parameter
6f5e1b0 Use priority list instead of global for PNO
97fc2dc Allow libnl-3.0 include path be specified
f92446f P2PS: Add P2PS interface info
59b416c Add optional reassoc-to-same-BSS optimization
c4da67d Fix passive_scan config parameter writing
715d5c4 hs20-osu-client: Ensure NULL checks are done before dereferencing
58d405f Fix OCSP debug messages
710dfb4 OpenSSL: Fix OCSP error path
bd7bb43 HTTP: Fix OCSP error path
946572c Android: Remove commented out non-Android build parameters
15ada7f Android: Remove libxml2 config defines
ebe8d3f Android: Silence unused function parameter warnings
dbd10da Android: Fix hs20-osu-client build on Android 5.0
a926295 HS 2.0R2: Fix permissions for SP/<fqdn> directory on Android
480994d nl80211: Allocate QCA vendor subcmds for DFS radar detected and CAC events
c165cb4 Drop all hostapd STA entries on interface disabled event
106fa1e nl80211: Indicate interface-down event only for the main netdev
eeb1cb2 VLAN: Clean up RTM_NEW/DELLINK processing
47e5fbd hostapd: Avoid sending client probe on removed client
3478273 Re-configure WPA2 group keys on hostapd interface re-enable
f33c860 Re-enable beaconing on interface disable+enable
fc99fab nl80211: Print a debug log entry on NL80211_CMD_PROBE_CLIENT failures
0d2f324 P2P: Fix send_action_in_progress clearing in corner cases
9ff8dda Add hostapd UPDATE_BEACON ctrl_iface command
e0761c5 nl80211: Allocate QCA vendor subcmd for DFS CAC Start event
1db718b nl80211: Test vendor command and event
10263dc Add control interface commands for fetching wpa_config values
f91a512 Add INTERWORKING_ADD_NETWORK command
c612ae9 AP: Do not reply to Probe Request frames with DS Params mismatch
5b74e08 P2P: Document P2P_CONNECT-auto
99650ca Add STOP_AP control interface command
6b00512 P2P: Add event messages for P2P_CONNECT-fallback-to-GO-Neg
b0e669b P2P: Fix P2P_CONNECT-auto fallback to GO Neg with group interface
bf51f4f mesh: Fix remaining BLOCKED state after SAE auth failure
79ddb20 mesh: Add a monitor event on SAE authentication getting blocked
dd2cbaf mesh: Add a monitor event for SAE authentication failure
0cb5f8d mesh: Fix inactivity timer for 32 bit system
11e2ddb mesh: Remove duplicated no_auto_peer update
1e52983 D-Bus: Fix network block type change
4fada12 Fix HT40 co-ex scanning issue on hostapd error path
23ed011 Fix Linux packat socket regression work around
663ae2f Don't write to wpa_supplicant.conf directly
d9a9bc0 IBSS: Do not enable HT with WEP or TKIP
0d7eb43 ACS: Accept channel if any (rather than all) survey results are valid
68fa00c ACS: Allow specific channels to be preferred
6f41a25 ACS: Use weighted average for 2.4 GHz adjacent channel interference
Change-Id: Ie1cabd28dcfdefafa02e81477e34badae6f7e629
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'hs20')
| -rw-r--r-- | hs20/client/Android.mk | 19 | ||||
| -rw-r--r-- | hs20/client/oma_dm_client.c | 17 | ||||
| -rw-r--r-- | hs20/client/osu_client.c | 22 |
3 files changed, 49 insertions, 9 deletions
diff --git a/hs20/client/Android.mk b/hs20/client/Android.mk index 63cbc6f2..212aefe4 100644 --- a/hs20/client/Android.mk +++ b/hs20/client/Android.mk @@ -12,19 +12,21 @@ ifneq ($(wildcard external/icu),) INCLUDES += external/icu/icu4c/source/common else INCLUDES += external/icu4c/common +else +# The LOCAL_EXPORT_C_INCLUDE_DIRS from ICU did not seem to fully resolve the +# build (e.g., "mm -B" failed to build, but following that with "mm" allowed +# the build to complete). For now, add the include directory manually here for +# Android 5.0. +ver = $(filter 5.0%,$(PLATFORM_VERSION)) +ifneq (,$(strip $(ver))) +INCLUDES += external/icu/icu4c/source/common +endif endif -#GTKCFLAGS := $(shell pkg-config --cflags gtk+-2.0 webkit-1.0) -#GTKLIBS := $(shell pkg-config --libs gtk+-2.0 webkit-1.0) -#CFLAGS += $(GTKCFLAGS) -#LIBS += $(GTKLIBS) - L_CFLAGS += -DCONFIG_CTRL_IFACE L_CFLAGS += -DCONFIG_CTRL_IFACE_UNIX L_CFLAGS += -DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/misc/wifi/sockets\" -L_CFLAGS += -DLIBXML_SCHEMAS_ENABLED -L_CFLAGS += -DLIBXML_REGEXP_ENABLED OBJS = spp_client.c OBJS += oma_dm_client.c @@ -53,8 +55,7 @@ OBJS += ../../src/crypto/sha256-internal.c L_CFLAGS += -DEAP_TLS_OPENSSL -#CFLAGS += $(shell xml2-config --cflags) -#LIBS += $(shell xml2-config --libs) +L_CFLAGS += -Wno-unused-parameter ######################## diff --git a/hs20/client/oma_dm_client.c b/hs20/client/oma_dm_client.c index 82e91062..6eaeeb47 100644 --- a/hs20/client/oma_dm_client.c +++ b/hs20/client/oma_dm_client.c @@ -394,6 +394,10 @@ static int oma_dm_exec_browser(struct hs20_osu_client *ctx, xml_node_t *exec) } data = xml_node_get_text(ctx->xml, node); + if (data == NULL) { + wpa_printf(MSG_INFO, "Invalid data"); + return DM_RESP_BAD_REQUEST; + } wpa_printf(MSG_INFO, "Data: %s", data); wpa_printf(MSG_INFO, "Launch browser to URI '%s'", data); write_summary(ctx, "Launch browser to URI '%s'", data); @@ -428,6 +432,10 @@ static int oma_dm_exec_get_cert(struct hs20_osu_client *ctx, xml_node_t *exec) } data = xml_node_get_text(ctx->xml, node); + if (data == NULL) { + wpa_printf(MSG_INFO, "Invalid data"); + return DM_RESP_BAD_REQUEST; + } wpa_printf(MSG_INFO, "Data: %s", data); getcert = xml_node_from_buf(ctx->xml, data); xml_node_get_text_free(ctx->xml, data); @@ -576,6 +584,11 @@ static int oma_dm_run_add(struct hs20_osu_client *ctx, const char *locuri, if (node) { char *type; type = xml_node_get_text(ctx->xml, node); + if (type == NULL) { + wpa_printf(MSG_ERROR, "Could not find type text"); + os_free(uri); + return DM_RESP_BAD_REQUEST; + } use_tnds = node && os_strstr(type, "application/vnd.syncml.dmtnds+xml"); } @@ -648,6 +661,10 @@ static int oma_dm_add(struct hs20_osu_client *ctx, xml_node_t *add, return DM_RESP_BAD_REQUEST; } locuri = xml_node_get_text(ctx->xml, node); + if (locuri == NULL) { + wpa_printf(MSG_ERROR, "No LocURI node text found"); + return DM_RESP_BAD_REQUEST; + } wpa_printf(MSG_INFO, "Target LocURI: %s", locuri); if (os_strncasecmp(locuri, "./Wi-Fi/", 8) != 0) { wpa_printf(MSG_INFO, "Unsupported Add Target LocURI"); diff --git a/hs20/client/osu_client.c b/hs20/client/osu_client.c index e452aa70..de7f351d 100644 --- a/hs20/client/osu_client.c +++ b/hs20/client/osu_client.c @@ -9,6 +9,9 @@ #include "includes.h" #include <time.h> #include <sys/stat.h> +#ifdef ANDROID +#include "private/android_filesystem_config.h" +#endif /* ANDROID */ #include "common.h" #include "utils/browser.h" @@ -571,6 +574,21 @@ int hs20_add_pps_mo(struct hs20_osu_client *ctx, const char *uri, } } +#ifdef ANDROID + /* Allow processes running with Group ID as AID_WIFI, + * to read files from SP/<fqdn> directory */ + if (chown(fname, -1, AID_WIFI)) { + wpa_printf(MSG_INFO, "CTRL: Could not chown directory: %s", + strerror(errno)); + /* Try to continue anyway */ + } + if (chmod(fname, S_IRWXU | S_IRGRP | S_IXGRP) < 0) { + wpa_printf(MSG_INFO, "CTRL: Could not chmod directory: %s", + strerror(errno)); + /* Try to continue anyway */ + } +#endif /* ANDROID */ + snprintf(fname, fname_len, "SP/%s/pps.xml", fqdn); if (os_file_exists(fname)) { @@ -669,6 +687,10 @@ int update_pps_file(struct hs20_osu_client *ctx, const char *pps_fname, wpa_printf(MSG_INFO, "Updating PPS MO %s", pps_fname); str = xml_node_to_str(ctx->xml, pps); + if (str == NULL) { + wpa_printf(MSG_ERROR, "No node found"); + return -1; + } wpa_printf(MSG_MSGDUMP, "[hs20] Updated PPS: '%s'", str); snprintf(backup, sizeof(backup), "%s.bak", pps_fname); |
