summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-wireless/wpa_supplicant/files')
-rw-r--r--net-wireless/wpa_supplicant/files/fix-ssid-combo.patch121
-rw-r--r--net-wireless/wpa_supplicant/files/wpa_cli.sh9
-rw-r--r--net-wireless/wpa_supplicant/files/wpa_supplicant-0.7.2-dbus_path_fix.patch8
-rw-r--r--net-wireless/wpa_supplicant/files/wpa_supplicant-0.7.2-no-crash.patch22
-rw-r--r--net-wireless/wpa_supplicant/files/wpa_supplicant-0.7.3-dbus-WPAIE-fix.patch115
5 files changed, 120 insertions, 155 deletions
diff --git a/net-wireless/wpa_supplicant/files/fix-ssid-combo.patch b/net-wireless/wpa_supplicant/files/fix-ssid-combo.patch
deleted file mode 100644
index b5d7a0280d56..000000000000
--- a/net-wireless/wpa_supplicant/files/fix-ssid-combo.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-From: Kel Modderman <kel@otaku42.de>
-Date: Sun, 2 May 2010 08:17:13 +0000 (+0300)
-Subject: wpa_gui-qt4: Fix network selection
-X-Git-Url: http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap.git;a=commitdiff_plain;h=1491f8a78516a5c773583125bd9691323249a6dc;hp=adc8d4a791ca7ef5245d2030d7096cf8675a3720
-
-wpa_gui-qt4: Fix network selection
-
-Use regular expression matches to see if input is not the (now translated?)
-string "Select any network" and is a "<network id>: <ssid>" string or the
-"all" keyword where that is applicable.
-
-Signed-off-by: Kel Modderman <kel@otaku42.de>
----
-
-diff --git a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
-index 94220f4..e15d751 100644
---- a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
-+++ b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
-@@ -971,17 +971,10 @@ void WpaGui::selectNetwork( const QString &sel )
- char reply[10];
- size_t reply_len = sizeof(reply);
-
-- if (cmd.compare(tr("Select any network"))) {
-+ if (cmd.contains(QRegExp("^\\d+:")))
-+ cmd.truncate(cmd.indexOf(':'));
-+ else
- cmd = "any";
-- } else {
-- int pos = cmd.indexOf(':');
-- if (pos < 0) {
-- printf("Invalid selectNetwork '%s'\n",
-- cmd.toAscii().constData());
-- return;
-- }
-- cmd.truncate(pos);
-- }
- cmd.prepend("SELECT_NETWORK ");
- ctrlRequest(cmd.toAscii().constData(), reply, &reply_len);
- triggerUpdate();
-@@ -995,14 +988,12 @@ void WpaGui::enableNetwork(const QString &sel)
- char reply[10];
- size_t reply_len = sizeof(reply);
-
-- if (!cmd.startsWith("all")) {
-- int pos = cmd.indexOf(':');
-- if (pos < 0) {
-- printf("Invalid enableNetwork '%s'\n",
-- cmd.toAscii().constData());
-- return;
-- }
-- cmd.truncate(pos);
-+ if (cmd.contains(QRegExp("^\\d+:")))
-+ cmd.truncate(cmd.indexOf(':'));
-+ else if (!cmd.startsWith("all")) {
-+ printf("Invalid editNetwork '%s'\n",
-+ cmd.toAscii().constData());
-+ return;
- }
- cmd.prepend("ENABLE_NETWORK ");
- ctrlRequest(cmd.toAscii().constData(), reply, &reply_len);
-@@ -1016,14 +1007,12 @@ void WpaGui::disableNetwork(const QString &sel)
- char reply[10];
- size_t reply_len = sizeof(reply);
-
-- if (!cmd.startsWith("all")) {
-- int pos = cmd.indexOf(':');
-- if (pos < 0) {
-- printf("Invalid disableNetwork '%s'\n",
-- cmd.toAscii().constData());
-- return;
-- }
-- cmd.truncate(pos);
-+ if (cmd.contains(QRegExp("^\\d+:")))
-+ cmd.truncate(cmd.indexOf(':'));
-+ else if (!cmd.startsWith("all")) {
-+ printf("Invalid editNetwork '%s'\n",
-+ cmd.toAscii().constData());
-+ return;
- }
- cmd.prepend("DISABLE_NETWORK ");
- ctrlRequest(cmd.toAscii().constData(), reply, &reply_len);
-@@ -1036,14 +1025,8 @@ void WpaGui::editNetwork(const QString &sel)
- QString cmd(sel);
- int id = -1;
-
-- if (!cmd.compare(tr("Select any network"))) {
-- int pos = sel.indexOf(':');
-- if (pos < 0) {
-- printf("Invalid editNetwork '%s'\n",
-- cmd.toAscii().constData());
-- return;
-- }
-- cmd.truncate(pos);
-+ if (cmd.contains(QRegExp("^\\d+:"))) {
-+ cmd.truncate(cmd.indexOf(':'));
- id = cmd.toInt();
- }
-
-@@ -1114,17 +1097,12 @@ void WpaGui::removeNetwork(const QString &sel)
- char reply[10];
- size_t reply_len = sizeof(reply);
-
-- if (cmd.compare(tr("Select any network")))
-+ if (cmd.contains(QRegExp("^\\d+:")))
-+ cmd.truncate(cmd.indexOf(':'));
-+ else if (!cmd.startsWith("all")) {
-+ printf("Invalid editNetwork '%s'\n",
-+ cmd.toAscii().constData());
- return;
--
-- if (!cmd.startsWith("all")) {
-- int pos = cmd.indexOf(':');
-- if (pos < 0) {
-- printf("Invalid removeNetwork '%s'\n",
-- cmd.toAscii().constData());
-- return;
-- }
-- cmd.truncate(pos);
- }
- cmd.prepend("REMOVE_NETWORK ");
- ctrlRequest(cmd.toAscii().constData(), reply, &reply_len);
diff --git a/net-wireless/wpa_supplicant/files/wpa_cli.sh b/net-wireless/wpa_supplicant/files/wpa_cli.sh
index d7d340b90bb6..4b1da4307ca5 100644
--- a/net-wireless/wpa_supplicant/files/wpa_cli.sh
+++ b/net-wireless/wpa_supplicant/files/wpa_cli.sh
@@ -1,9 +1,9 @@
#!/bin/sh
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Written by Roy Marples <uberlord@gentoo.org>
# Distributed under the terms of the GNU General Public License v2
# Alternatively, this file may be distributed under the terms of the BSD License
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/files/wpa_cli.sh,v 1.1 2006/07/11 15:07:16 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/files/wpa_cli.sh,v 1.2 2011/07/07 07:54:55 gurligebis Exp $
if [ -z "$1" -o -z "$2" ]; then
logger -t wpa_cli "Insufficient parameters"
@@ -41,5 +41,6 @@ esac
# stopping the interface and a background process - like wpa_cli - is.
export IN_BACKGROUND=true
-logger -t wpa_cli "interface ${INTERFACE} ${ACTION}"
-${EXEC} || logger -t wpa_cli "executing '${EXEC}' failed"
+# Removed, since stopping /etc/init.d/net.wlanX stops the network completly.
+#logger -t wpa_cli "interface ${INTERFACE} ${ACTION}"
+#${EXEC} || logger -t wpa_cli "executing '${EXEC}' failed"
diff --git a/net-wireless/wpa_supplicant/files/wpa_supplicant-0.7.2-dbus_path_fix.patch b/net-wireless/wpa_supplicant/files/wpa_supplicant-0.7.2-dbus_path_fix.patch
deleted file mode 100644
index eb4a1c01a5e0..000000000000
--- a/net-wireless/wpa_supplicant/files/wpa_supplicant-0.7.2-dbus_path_fix.patch
+++ /dev/null
@@ -1,8 +0,0 @@
---- dbus/fi.epitest.hostap.WPASupplicant.service 2009-04-15 23:16:19.000000000 +0000
-+++ dbus/fi.epitest.hostap.WPASupplicant.service 2009-04-15 23:16:29.000000000 +0000
-@@ -1,4 +1,4 @@
- [D-BUS Service]
- Name=fi.epitest.hostap.WPASupplicant
--Exec=/sbin/wpa_supplicant -u
-+Exec=/usr/sbin/wpa_supplicant -u
- User=root
diff --git a/net-wireless/wpa_supplicant/files/wpa_supplicant-0.7.2-no-crash.patch b/net-wireless/wpa_supplicant/files/wpa_supplicant-0.7.2-no-crash.patch
deleted file mode 100644
index 2d3ba1a28188..000000000000
--- a/net-wireless/wpa_supplicant/files/wpa_supplicant-0.7.2-no-crash.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- ../src/rsn_supp/preauth.c 2010-01-16 12:04:38.000000000 -0500
-+++ ../src/rsn_supp/preauth.c 2010-02-01 10:08:48.862052876 -0500
-@@ -49,8 +49,10 @@ void pmksa_candidate_free(struct wpa_sm
- return;
-
- dl_list_for_each_safe(entry, n, &sm->pmksa_candidates,
-- struct rsn_pmksa_candidate, list)
-+ struct rsn_pmksa_candidate, list) {
-+ dl_list_del(&entry->list);
- os_free(entry);
-+ }
- }
-
-
-@@ -378,6 +380,7 @@ void pmksa_candidate_add(struct wpa_sm *
- }
-
- if (cand) {
-+ dl_list_del(&cand->list);
- if (prio < PMKID_CANDIDATE_PRIO_SCAN)
- cand->priority = prio;
- } else {
diff --git a/net-wireless/wpa_supplicant/files/wpa_supplicant-0.7.3-dbus-WPAIE-fix.patch b/net-wireless/wpa_supplicant/files/wpa_supplicant-0.7.3-dbus-WPAIE-fix.patch
new file mode 100644
index 000000000000..3920da63f383
--- /dev/null
+++ b/net-wireless/wpa_supplicant/files/wpa_supplicant-0.7.3-dbus-WPAIE-fix.patch
@@ -0,0 +1,115 @@
+diff -up wpa_supplicant-0.7.3/wpa_supplicant/dbus/dbus_new_handlers.c.prop-failure wpa_supplicant-0.7.3/wpa_supplicant/dbus/dbus_new_handlers.c
+--- wpa_supplicant-0.7.3/wpa_supplicant/dbus/dbus_new_handlers.c.prop-failure 2011-04-09 14:04:43.108343777 -0400
++++ wpa_supplicant-0.7.3/wpa_supplicant/dbus/dbus_new_handlers.c 2011-04-09 14:44:09.808372285 -0400
+@@ -33,6 +33,14 @@
+ #include "dbus_new_handlers.h"
+ #include "dbus_dict_helpers.h"
+
++/* The getters in this file can also be invoked when building a signal
++ * message to send out spontaneously. In this case, no message is passed
++ * in and if we try to call dbus_message_new_error(), we'll get an
++ * assertion failure. So, #define dbus_message_new_error() to a more
++ * tolerant cut-and-paste version
++ */
++#define dbus_message_new_error wpa_dbus_message_new_error
++
+ extern int wpa_debug_level;
+ extern int wpa_debug_show_keys;
+ extern int wpa_debug_timestamp;
+diff -up wpa_supplicant-0.7.3/wpa_supplicant/dbus/dbus_new_handlers.h.prop-failure wpa_supplicant-0.7.3/wpa_supplicant/dbus/dbus_new_handlers.h
+diff -up wpa_supplicant-0.7.3/wpa_supplicant/dbus/dbus_new_helpers.c.prop-failure wpa_supplicant-0.7.3/wpa_supplicant/dbus/dbus_new_helpers.c
+--- wpa_supplicant-0.7.3/wpa_supplicant/dbus/dbus_new_helpers.c.prop-failure 2011-04-09 14:04:18.293117234 -0400
++++ wpa_supplicant-0.7.3/wpa_supplicant/dbus/dbus_new_helpers.c 2011-04-09 14:51:48.464204876 -0400
+@@ -22,6 +22,42 @@
+ #include "dbus_new.h"
+ #include "dbus_new_helpers.h"
+
++/* This is exactly like dbus_message_new_error, but returns a
++ * (partially filled in) error message in the case reply_to is
++ * NULL rather than failing with an assertion message. This is
++ * useful for getters that we recycle when sending out signals.
++ *
++ * Contains code cut-and-pasted from dbus_message_new_error()
++ * Copyright (C) 2002, 2003, 2004, 2005 Red Hat Inc.
++ * Copyright (C) 2002, 2003 CodeFactory AB
++ */
++DBusMessage*
++wpa_dbus_message_new_error (DBusMessage *reply_to,
++ const char *error_name,
++ const char *error_message)
++{
++ if (reply_to) {
++ return dbus_message_new_error(reply_to, error_name, error_message);
++ } else {
++ DBusMessage *message = dbus_message_new(DBUS_MESSAGE_TYPE_ERROR);
++ DBusMessageIter iter;
++
++ dbus_message_set_error_name(message, error_name);
++ dbus_message_set_no_reply(message, TRUE);
++
++ if (error_message != NULL) {
++ dbus_message_iter_init_append(message, &iter);
++ if (!dbus_message_iter_append_basic(&iter,
++ DBUS_TYPE_STRING,
++ &error_message)) {
++ dbus_message_unref(message);
++ return NULL;
++ }
++ }
++
++ return message;
++ }
++}
+
+ /**
+ * recursive_iter_copy - Reads arguments from one iterator and
+@@ -86,6 +122,7 @@ static void recursive_iter_copy(DBusMess
+
+
+ static unsigned int fill_dict_with_properties(
++ DBusMessage *message,
+ DBusMessageIter *dict_iter, const struct wpa_dbus_property_desc *props,
+ const char *interface, const void *user_data)
+ {
+@@ -98,7 +135,7 @@ static unsigned int fill_dict_with_prope
+ if (!os_strncmp(dsc->dbus_interface, interface,
+ WPAS_DBUS_INTERFACE_MAX) &&
+ dsc->access != W && dsc->getter) {
+- reply = dsc->getter(NULL, user_data);
++ reply = dsc->getter(message, user_data);
+ if (!reply)
+ continue;
+
+@@ -160,7 +197,8 @@ static DBusMessage * get_all_properties(
+ DBUS_DICT_ENTRY_END_CHAR_AS_STRING,
+ &dict_iter);
+
+- props_num = fill_dict_with_properties(&dict_iter, obj_dsc->properties,
++ props_num = fill_dict_with_properties(message,
++ &dict_iter, obj_dsc->properties,
+ interface, obj_dsc->user_data);
+
+ dbus_message_iter_close_container(&iter, &dict_iter);
+@@ -870,6 +908,7 @@ void wpa_dbus_get_object_properties(stru
+ return;
+ }
+
+- fill_dict_with_properties(dict_iter, obj_desc->properties,
++ fill_dict_with_properties(NULL,
++ dict_iter, obj_desc->properties,
+ interface, obj_desc->user_data);
+ }
+diff -up wpa_supplicant-0.7.3/wpa_supplicant/dbus/dbus_new_helpers.h.prop-failure wpa_supplicant-0.7.3/wpa_supplicant/dbus/dbus_new_helpers.h
+--- wpa_supplicant-0.7.3/wpa_supplicant/dbus/dbus_new_helpers.h.prop-failure 2011-04-09 14:04:25.130180461 -0400
++++ wpa_supplicant-0.7.3/wpa_supplicant/dbus/dbus_new_helpers.h 2011-04-09 14:38:53.092075181 -0400
+@@ -112,6 +112,10 @@ struct wpa_dbus_property_desc {
+ #define WPA_DBUS_PROPERTIES_SET "Set"
+ #define WPA_DBUS_PROPERTIES_GETALL "GetAll"
+
++DBusMessage* wpa_dbus_message_new_error (DBusMessage *reply_to,
++ const char *error_name,
++ const char *error_message);
++
+ void free_dbus_object_desc(struct wpa_dbus_object_desc *obj_dsc);
+
+ int wpa_dbus_ctrl_iface_init(struct wpas_dbus_priv *iface, char *dbus_path,