1
0
OBS User unknown 2008-03-11 17:11:21 +00:00 committed by Git OBS Bridge
parent 7e322967fa
commit 5b06f6e177
11 changed files with 92 additions and 383 deletions

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2e9c0019227d15087f2808df242fe8f69ab42c1ffacd321945c7f31d74779467
size 566760

View File

@ -1,43 +0,0 @@
diff -up wpa_supplicant-0.5.7/ctrl_iface_dbus.c.signal-leak-fix wpa_supplicant-0.5.7/ctrl_iface_dbus.c
--- wpa_supplicant-0.5.7/ctrl_iface_dbus.c.signal-leak-fix 2007-12-06 18:10:22.000000000 -0500
+++ wpa_supplicant-0.5.7/ctrl_iface_dbus.c 2007-12-06 18:11:38.000000000 -0500
@@ -649,6 +649,7 @@ void wpa_supplicant_dbus_notify_scan_res
return;
}
dbus_connection_send(iface->con, signal, NULL);
+ dbus_message_unref (signal);
}
@@ -666,7 +667,7 @@ void wpa_supplicant_dbus_notify_state_ch
wpa_states old_state)
{
struct ctrl_iface_dbus_priv *iface;
- DBusMessage *signal;
+ DBusMessage *signal = NULL;
const char *path;
const char *new_state_str, *old_state_str;
@@ -711,7 +712,7 @@ void wpa_supplicant_dbus_notify_state_ch
wpa_printf(MSG_ERROR,
"wpa_supplicant_dbus_notify_state_change[dbus]: "
"couldn't convert state strings.");
- return;
+ goto out;
}
if (!dbus_message_append_args(signal,
@@ -724,8 +725,13 @@ void wpa_supplicant_dbus_notify_state_ch
"wpa_supplicant_dbus_notify_state_change[dbus]: "
"not enough memory to construct state change "
"signal.");
+ goto out;
}
+
dbus_connection_send(iface->con, signal, NULL);
+
+out:
+ dbus_message_unref (signal);
}

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3d90603d454c50d20a250825a3be55c663b861531dcd8bf1ba7bb89264841c9f
size 562852

View File

@ -1,13 +0,0 @@
Index: wpa_supplicant-0.5.8/wpa_supplicant.c
===================================================================
--- wpa_supplicant-0.5.8.orig/wpa_supplicant.c
+++ wpa_supplicant-0.5.8/wpa_supplicant.c
@@ -974,7 +974,7 @@ static void wpa_supplicant_scan(void *el
struct wpa_ssid *ssid;
int enabled, scan_req = 0, ret;
- if (wpa_s->disconnected)
+ if (wpa_s->disconnected && !wpa_s->scan_req)
return;
enabled = 0;

View File

@ -1,186 +0,0 @@
Index: wpa_supplicant-0.5.8/config.c
===================================================================
--- wpa_supplicant-0.5.8.orig/config.c
+++ wpa_supplicant-0.5.8/config.c
@@ -70,13 +70,14 @@ static char * wpa_config_parse_string(co
if (hlen & 1)
return NULL;
*len = hlen / 2;
- str = os_malloc(*len);
+ str = os_malloc(*len + 1);
if (str == NULL)
return NULL;
if (hexstr2bin(value, str, *len)) {
os_free(str);
return NULL;
}
+ str[*len] = '\0';
return (char *) str;
}
}
Index: wpa_supplicant-0.5.8/ctrl_iface_dbus.c
===================================================================
--- wpa_supplicant-0.5.8.orig/ctrl_iface_dbus.c
+++ wpa_supplicant-0.5.8/ctrl_iface_dbus.c
@@ -536,6 +536,10 @@ static DBusHandlerResult wpas_iface_mess
reply = wpas_dbus_iface_set_ap_scan(message, wpa_s);
else if (!strcmp(method, "state"))
reply = wpas_dbus_iface_get_state(message, wpa_s);
+ else if (!strcmp(method, "setBlobs"))
+ reply = wpas_dbus_iface_set_blobs(message, wpa_s);
+ else if (!strcmp(method, "removeBlobs"))
+ reply = wpas_dbus_iface_remove_blobs(message, wpa_s);
}
/* If the message was handled, send back the reply */
Index: wpa_supplicant-0.5.8/ctrl_iface_dbus_handlers.c
===================================================================
--- wpa_supplicant-0.5.8.orig/ctrl_iface_dbus_handlers.c
+++ wpa_supplicant-0.5.8/ctrl_iface_dbus_handlers.c
@@ -1203,3 +1203,129 @@ DBusMessage * wpas_dbus_iface_get_state(
return reply;
}
+
+
+/**
+ * wpas_dbus_iface_set_blobs - Store named binary blobs (ie, for certificates)
+ * @message: Pointer to incoming dbus message
+ * @global: %wpa_supplicant global data structure
+ * Returns: A dbus message containing a UINT32 indicating success (1) or
+ * failure (0)
+ *
+ * Asks wpa_supplicant to internally store a one or more binary blobs.
+ */
+DBusMessage * wpas_dbus_iface_set_blobs(DBusMessage *message,
+ struct wpa_supplicant *wpa_s)
+{
+ DBusMessage *reply = NULL;
+ struct wpa_dbus_dict_entry entry = { .type = DBUS_TYPE_STRING };
+ DBusMessageIter iter, iter_dict;
+
+ dbus_message_iter_init(message, &iter);
+
+ if (!wpa_dbus_dict_open_read(&iter, &iter_dict))
+ return wpas_dbus_new_invalid_opts_error(message, NULL);
+
+ while (wpa_dbus_dict_has_dict_entry(&iter_dict)) {
+ struct wpa_config_blob *blob;
+
+ if (!wpa_dbus_dict_get_entry(&iter_dict, &entry)) {
+ reply = wpas_dbus_new_invalid_opts_error(message, NULL);
+ break;
+ }
+
+ if (entry.type != DBUS_TYPE_ARRAY ||
+ entry.array_type != DBUS_TYPE_BYTE) {
+ reply = wpas_dbus_new_invalid_opts_error(message,
+ "Byte array expected.");
+ break;
+ }
+
+ if ( (entry.array_len <= 0)
+ || (entry.array_len > 65536)
+ || !strlen(entry.key)) {
+ reply = wpas_dbus_new_invalid_opts_error(message,
+ "Invalid array size.");
+ break;
+ }
+
+ blob = os_zalloc(sizeof(*blob));
+ if (blob == NULL) {
+ reply = dbus_message_new_error(message,
+ WPAS_ERROR_ADD_ERROR,
+ "Not enough memory to add blob.");
+ break;
+ }
+ blob->data = os_zalloc(entry.array_len);
+ if (blob->data == NULL) {
+ reply = dbus_message_new_error(message,
+ WPAS_ERROR_ADD_ERROR,
+ "Not enough memory to add blob data.");
+ os_free(blob);
+ break;
+ }
+
+ blob->name = os_strdup(entry.key);
+ blob->len = entry.array_len;
+ os_memcpy(blob->data, (u8 *) entry.bytearray_value,
+ entry.array_len);
+ if (blob->name == NULL || blob->data == NULL) {
+ wpa_config_free_blob(blob);
+ reply = dbus_message_new_error(message,
+ WPAS_ERROR_ADD_ERROR,
+ "Error adding blob.");
+ break;
+ }
+
+ /* Success */
+ wpa_config_remove_blob(wpa_s->conf, blob->name);
+ wpa_config_set_blob(wpa_s->conf, blob);
+ wpa_dbus_dict_entry_clear(&entry);
+ }
+ wpa_dbus_dict_entry_clear(&entry);
+
+ return reply ? reply : wpas_dbus_new_success_reply(message);;
+}
+
+/**
+ * wpas_dbus_iface_remove_blob - Remove named binary blobs
+ * @message: Pointer to incoming dbus message
+ * @global: %wpa_supplicant global data structure
+ * Returns: A dbus message containing a UINT32 indicating success (1) or
+ * failure (0)
+ *
+ * Asks wpa_supplicant to remove one or more previously stored binary blobs.
+ */
+DBusMessage * wpas_dbus_iface_remove_blobs(DBusMessage *message,
+ struct wpa_supplicant *wpa_s)
+{
+ DBusMessageIter iter, array;
+ char *err_msg = NULL;
+
+ dbus_message_iter_init(message, &iter);
+
+ if ((dbus_message_iter_get_arg_type (&iter) != DBUS_TYPE_ARRAY)
+ || (dbus_message_iter_get_element_type (&iter) != DBUS_TYPE_STRING))
+ return wpas_dbus_new_invalid_opts_error(message, NULL);
+
+ dbus_message_iter_recurse(&iter, &array);
+ while (dbus_message_iter_get_arg_type(&array) == DBUS_TYPE_STRING) {
+ const char *name;
+
+ dbus_message_iter_get_basic(&array, &name);
+ if (!strlen(name))
+ err_msg = "Invalid blob name.";
+
+ if (wpa_config_remove_blob(wpa_s->conf, name) != 0)
+ err_msg = "Error removing blob.";
+ dbus_message_iter_next(&array);
+ }
+
+ if (err_msg) {
+ return dbus_message_new_error(message, WPAS_ERROR_REMOVE_ERROR,
+ err_msg);
+ }
+
+ return wpas_dbus_new_success_reply(message);
+}
+
Index: wpa_supplicant-0.5.8/ctrl_iface_dbus_handlers.h
===================================================================
--- wpa_supplicant-0.5.8.orig/ctrl_iface_dbus_handlers.h
+++ wpa_supplicant-0.5.8/ctrl_iface_dbus_handlers.h
@@ -71,6 +71,12 @@ DBusMessage * wpas_dbus_iface_set_ap_sca
DBusMessage * wpas_dbus_iface_get_state(DBusMessage *message,
struct wpa_supplicant *wpa_s);
+DBusMessage * wpas_dbus_iface_set_blobs(DBusMessage *message,
+ struct wpa_supplicant *wpa_s);
+
+DBusMessage * wpas_dbus_iface_remove_blobs(DBusMessage *message,
+ struct wpa_supplicant *wpa_s);
+
#endif /* CONFIG_CTRL_IFACE_DBUS */
#endif /* CTRL_IFACE_DBUS_HANDLERS_H */

View File

@ -1,15 +0,0 @@
Index: wpa_supplicant-0.5.8/dbus-wpa_supplicant.conf
===================================================================
--- wpa_supplicant-0.5.8.orig/dbus-wpa_supplicant.conf
+++ wpa_supplicant-0.5.8/dbus-wpa_supplicant.conf
@@ -8,10 +8,6 @@
<allow send_destination="fi.epitest.hostap.WPASupplicant"/>
<allow send_interface="fi.epitest.hostap.WPASupplicant"/>
</policy>
- <policy at_console="true">
- <allow send_destination="fi.epitest.hostap.WPASupplicant"/>
- <allow send_interface="fi.epitest.hostap.WPASupplicant"/>
- </policy>
<policy context="default">
<deny own="fi.epitest.hostap.WPASupplicant"/>
<deny send_destination="fi.epitest.hostap.WPASupplicant"/>

View File

@ -1,81 +0,0 @@
Index: wpa_supplicant-0.5.8/Makefile
===================================================================
--- wpa_supplicant-0.5.8.orig/Makefile
+++ wpa_supplicant-0.5.8/Makefile
@@ -744,6 +744,10 @@ ifndef LDO
LDO=$(CC)
endif
+ifdef CONFIG_DEBUG_FILE
+CFLAGS += -DCONFIG_DEBUG_FILE
+endif
+
dynamic_eap_methods: $(EAPDYN)
wpa_supplicant: .config $(OBJS)
Index: wpa_supplicant-0.5.8/common.c
===================================================================
--- wpa_supplicant-0.5.8.orig/common.c
+++ wpa_supplicant-0.5.8/common.c
@@ -354,11 +354,8 @@ int wpa_debug_open_file(void)
#ifdef _WIN32
os_snprintf(fname, sizeof(fname), "\\Temp\\wpa_supplicant-log-%d.txt",
count++);
-#else /* _WIN32 */
- os_snprintf(fname, sizeof(fname), "/tmp/wpa_supplicant-log-%d.txt",
- count++);
#endif /* _WIN32 */
- out_file = fopen(fname, "w");
+ out_file = fopen("/var/log/wpa_supplicant.log", "a");
return out_file == NULL ? -1 : 0;
#else /* CONFIG_DEBUG_FILE */
return 0;
Index: wpa_supplicant-0.5.8/main.c
===================================================================
--- wpa_supplicant-0.5.8.orig/main.c
+++ wpa_supplicant-0.5.8/main.c
@@ -45,7 +45,12 @@ static void usage(void)
"[-p<driver_param>] \\\n"
" [-b<br_ifname> [-N -i<ifname> -c<conf> [-C<ctrl>] "
"[-D<driver>] \\\n"
- " [-p<driver_param>] [-b<br_ifname>] ...]\n"
+ " [-p<driver_param>] [-b<br_ifname>] ...] "
+#ifdef CONFIG_DEBUG_FILE
+ "[-f] \\\n"
+#else
+ "\n"
+#endif
"\n"
"drivers:\n",
wpa_supplicant_version, wpa_supplicant_license);
@@ -65,6 +70,9 @@ static void usage(void)
" -i = interface name\n"
" -d = increase debugging verbosity (-dd even more)\n"
" -D = driver name\n"
+#ifdef CONFIG_DEBUG_FILE
+ " -f = Log output to /var/log/wpa_supplicant.log\n"
+#endif
" -g = global ctrl_interface\n"
" -K = include keys (passwords, etc.) in debug output\n"
" -t = include timestamp in debug messages\n"
@@ -143,7 +151,7 @@ int main(int argc, char *argv[])
wpa_supplicant_fd_workaround();
for (;;) {
- c = getopt(argc, argv, "b:Bc:C:D:dg:hi:KLNp:P:qtuvwW");
+ c = getopt(argc, argv, "b:Bc:C:D:dfg:hi:KLNp:P:qtuvwW");
if (c < 0)
break;
switch (c) {
@@ -172,6 +180,11 @@ int main(int argc, char *argv[])
params.wpa_debug_level--;
break;
#endif /* CONFIG_NO_STDOUT_DEBUG */
+#ifdef CONFIG_DEBUG_FILE
+ case 'f':
+ params.wpa_debug_use_file = 1;
+ break;
+#endif
case 'g':
params.ctrl_interface = optarg;
break;

View File

@ -1,12 +0,0 @@
Index: wpa_supplicant-0.5.8/driver_wext.c
===================================================================
--- wpa_supplicant-0.5.8.orig/driver_wext.c
+++ wpa_supplicant-0.5.8/driver_wext.c
@@ -1733,6 +1733,7 @@ static int wpa_driver_wext_keymgmt2wext(
{
switch (keymgmt) {
case KEY_MGMT_802_1X:
+ case KEY_MGMT_802_1X_NO_WPA:
return IW_AUTH_KEY_MGMT_802_1X;
case KEY_MGMT_PSK:
return IW_AUTH_KEY_MGMT_PSK;

View File

@ -1,13 +0,0 @@
Index: wpa_supplicant-0.5.8/driver_wext.c
===================================================================
--- wpa_supplicant-0.5.8.orig/driver_wext.c
+++ wpa_supplicant-0.5.8/driver_wext.c
@@ -1610,7 +1610,7 @@ int wpa_driver_wext_set_key(void *priv,
os_memset(&iwr, 0, sizeof(iwr));
os_strncpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
iwr.u.encoding.flags = key_idx + 1;
- iwr.u.encoding.pointer = (caddr_t) key;
+ iwr.u.encoding.pointer = (caddr_t) NULL;
iwr.u.encoding.length = 0;
if (ioctl(drv->ioctl_sock, SIOCSIWENCODE, &iwr) < 0) {
perror("ioctl[SIOCSIWENCODE] (set_tx)");

View File

@ -1,3 +1,47 @@
-------------------------------------------------------------------
Tue Mar 11 15:09:29 CET 2008 - hschaa@suse.de
- Remove patches that are upstream already
- Update to version 0.5.10, changes:
* added support for Makefile builds to include debug-log-to-a-file
functionality (CONFIG_DEBUG_FILE=y and -f<path> on command line)
* added network configuration parameter 'frequency' for setting
initial channel for IBSS (adhoc) networks
* fixed EAP-SIM and EAP-AKA message parser to validate attribute
lengths properly to avoid potential crash caused by invalid messages
* added driver_wext workaround for race condition between scanning and
association with drivers that take very long time to scan all
channels (e.g., madwifi with dual-band cards); wpa_supplicant is now
using a longer hardcoded timeout for the scan if the driver supports
notifications for scan completion (SIOCGIWSCAN event); this helps,
e.g., in cases where wpa_supplicant and madwifi driver ended up in
loop where the driver did not even try to associate
* fixed EAP-SIM not to include AT_NONCE_MT and AT_SELECTED_VERSION
attributes in EAP-SIM Start/Response when using fast reauthentication
* fixed problems in getting NDIS events from WMI on Windows 2000
- Changes in 0.5.9:
* fixed an integer overflow issue in the ASN.1 parser used by the
(experimental) internal TLS implementation to avoid a potential
buffer read overflow
* fixed a race condition with -W option (wait for a control interface
monitor before starting) that could have caused the first messages to
be lost
* updated EAP Generalized Pre-Shared Key (EAP-GPSK) to use the latest
draft (draft-ietf-emu-eap-gpsk-07.txt)
* added ctrl_iface RECONNECT (wpa_cli reconnect) command
(like reassociate, but only takes effect if already associated)
* fixed a possible race condition between wpa_cli reassociate and
wpa_cli disconnect
* return a non-zero exit code from non-interactive wpa_cli if the
command is not recognized or fails
* fixed 0.5.8 regressions in BSS selection that prevented wildcard SSID
from being used with non-WPA networks and disabled workaround for
ignoring bogus WPA/RSN IE in non-WPA configuration
* fixed OpenSSL TLS wrapper to clear trusted CA list to allow
network blocks to use different trusted CA configurations
* fixed a potential EAP state machine loop when mloving from PSK to EAP
configuration without restarting wpa_supplicant
-------------------------------------------------------------------
Thu Jan 31 13:10:43 CET 2008 - hschaa@suse.de

View File

@ -1,5 +1,5 @@
#
# spec file for package wpa_supplicant (Version 0.5.8)
# spec file for package wpa_supplicant (Version 0.5.10)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@ -10,14 +10,15 @@
# norootforbuild
Name: wpa_supplicant
BuildRequires: dbus-1-devel libqt4 libqt4-devel openssl-devel pkg-config readline-devel
%ifarch %ix86 x86_64
BuildRequires: madwifi-devel
%endif
Url: http://hostap.epitest.fi/wpa_supplicant/
Version: 0.5.8
Release: 79
Version: 0.5.10
Release: 1
License: BSD 3-Clause; GPL v2 or later
Group: Productivity/Networking/Other
Summary: WPA supplicant implementation
@ -27,17 +28,10 @@ Source2: %{name}.conf
Source3: fi.epitest.hostap.WPASupplicant.service
Patch0: wpa_supplicant-assoc-timeout.patch
Patch1: wpa_supplicant-driver-wext-debug.patch
Patch2: wpa_supplicant-wep-key-fix.patch
Patch3: wpa_supplicant-fix-deprecated-dbus-function.patch
Patch4: wpa_supplicant-debug-file.patch
Patch5: wpa_supplicant-flush-debug-output.patch
Patch6: wpa_supplicant-sigusr1-changes-debuglevel.patch
Patch7: wpa_supplicant-always-scan.patch
Patch8: wpa_supplicant-dbus-iface-segfault-fix.patch
Patch9: wpa_supplicant-dbus-blobs.patch
Patch10: wpa_supplicant-dbus-permissions-fix.patch
Patch11: wpa_supplicant-fix-dynamic-wep-with-mac80211.patch
Patch12: wpa_supplicant-0.5.7-fix-signal-leaks.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@ -72,17 +66,10 @@ Authors:
cp %{SOURCE1} .config
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%build
%ifarch %ix86 x86_64
@ -130,6 +117,47 @@ install -m 755 wpa_gui-qt4/wpa_gui %{buildroot}%{_sbindir}
/usr/sbin/wpa_gui
%changelog
* Tue Mar 11 2008 hschaa@suse.de
- Remove patches that are upstream already
- Update to version 0.5.10, changes:
* added support for Makefile builds to include debug-log-to-a-file
functionality (CONFIG_DEBUG_FILE=y and -f<path> on command line)
* added network configuration parameter 'frequency' for setting
initial channel for IBSS (adhoc) networks
* fixed EAP-SIM and EAP-AKA message parser to validate attribute
lengths properly to avoid potential crash caused by invalid messages
* added driver_wext workaround for race condition between scanning and
association with drivers that take very long time to scan all
channels (e.g., madwifi with dual-band cards); wpa_supplicant is now
using a longer hardcoded timeout for the scan if the driver supports
notifications for scan completion (SIOCGIWSCAN event); this helps,
e.g., in cases where wpa_supplicant and madwifi driver ended up in
loop where the driver did not even try to associate
* fixed EAP-SIM not to include AT_NONCE_MT and AT_SELECTED_VERSION
attributes in EAP-SIM Start/Response when using fast reauthentication
* fixed problems in getting NDIS events from WMI on Windows 2000
- Changes in 0.5.9:
* fixed an integer overflow issue in the ASN.1 parser used by the
(experimental) internal TLS implementation to avoid a potential
buffer read overflow
* fixed a race condition with -W option (wait for a control interface
monitor before starting) that could have caused the first messages to
be lost
* updated EAP Generalized Pre-Shared Key (EAP-GPSK) to use the latest
draft (draft-ietf-emu-eap-gpsk-07.txt)
* added ctrl_iface RECONNECT (wpa_cli reconnect) command
(like reassociate, but only takes effect if already associated)
* fixed a possible race condition between wpa_cli reassociate and
wpa_cli disconnect
* return a non-zero exit code from non-interactive wpa_cli if the
command is not recognized or fails
* fixed 0.5.8 regressions in BSS selection that prevented wildcard SSID
from being used with non-WPA networks and disabled workaround for
ignoring bogus WPA/RSN IE in non-WPA configuration
* fixed OpenSSL TLS wrapper to clear trusted CA list to allow
network blocks to use different trusted CA configurations
* fixed a potential EAP state machine loop when mloving from PSK to EAP
configuration without restarting wpa_supplicant
* Thu Jan 31 2008 hschaa@suse.de
- Fix madwifi support (b.n.c #342670)
* Tue Dec 18 2007 jg@suse.de