- Fix two leaks when signalling state and scan results (rh #408141)

- Add logrotate config file (rh #404181)
- Add new LSB initscript header to initscript with correct deps (rh
    #244029)
- Move other runtime arguments to /etc/sysconfig/wpa_supplicant
- Start after messagebus service (rh #385191)
- Fix initscript 'condrestart' command (rh #217281)
This commit is contained in:
Daniel Williams 2007-12-06 23:40:35 +00:00
parent 236e5671fb
commit dff5415b9c
5 changed files with 86 additions and 4 deletions

View File

@ -0,0 +1,43 @@
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

@ -2,7 +2,7 @@
#
# wpa_supplicant
#
# chkconfig: - 12 88
# chkconfig: - 23 88
# description: wpa_supplicant is a WPA Supplicant for Linux, BSD and \
# Windows with support for WPA and WPA2 (IEEE 802.11i / RSN). Supplicant \
# is the IEEE 802.1X/WPA component that is used in the client stations. \
@ -11,6 +11,15 @@
# processname: wpa_supplicant
# config: /etc/wpa_supplicant/wpa_supplicant.conf
#
### BEGIN INIT INFO
# Provides: wpa_supplicant
# Required-Start: $local_fs $messagebus
# Required-Stop: $local_fs $messagebus
# Default-Start: 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start and stop wpa_supplicant
# Description: wpa_supplicant is a tool for connecting to wireless networks
### END INIT INFO
# Source function library.
. /etc/rc.d/init.d/functions
@ -27,7 +36,7 @@ lockfile=/var/lock/subsys/$prog
start() {
echo -n $"Starting $prog: $conf, $INTERFACES, $DRIVERS"
daemon $prog -c $conf $INTERFACES $DRIVERS -B -u -f
daemon $prog -c $conf $INTERFACES $DRIVERS -B $OTHER_ARGS
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
@ -72,7 +81,7 @@ case "$1" in
fdr_status
;;
condrestart|try-restart)
[ -f $lockfile ] || restart
[ -f $lockfile ] && restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"

6
wpa_supplicant.logrotate Normal file
View File

@ -0,0 +1,6 @@
/var/log/wpa_supplicant.log {
missingok
notifempty
size 30k
create 0600 root root
}

View File

@ -2,7 +2,7 @@ Summary: WPA/WPA2/IEEE 802.1X Supplicant
Name: wpa_supplicant
Epoch: 1
Version: 0.5.7
Release: 18%{?dist}
Release: 19%{?dist}
License: BSD
Group: System Environment/Base
Source0: http://hostap.epitest.fi/releases/%{name}-%{version}.tar.gz
@ -12,6 +12,7 @@ Source3: %{name}.init.d
Source4: %{name}.sysconfig
Source5: madwifi-headers-r1475.tar.bz2
Source6: fi.epitest.hostap.WPASupplicant.service
Source7: %{name}.logrotate
Patch0: wpa_supplicant-assoc-timeout.patch
Patch1: wpa_supplicant-driver-wext-debug.patch
Patch2: wpa_supplicant-wep-key-fix.patch
@ -28,6 +29,7 @@ Patch11: wpa_supplicant-0.5.7-dbus-permissions-fix.patch
Patch12: wpa_supplicant-0.5.7-ignore-dup-ca-cert-addition.patch
Patch13: wpa_supplicant-0.5.7-fix-dynamic-wep-with-mac80211.patch
Patch14: wpa_supplicant-0.5.7-use-IW_ENCODE_TEMP.patch
Patch15: wpa_supplicant-0.5.7-fix-signal-leaks.patch
URL: http://w1.fi/wpa_supplicant/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -69,6 +71,7 @@ Graphical User Interface for wpa_supplicant written using QT3
%patch12 -p1 -b .ignore-dup-ca-cert-addition
%patch13 -p1 -b .fix-dynamic-wep-with-mac80211
%patch14 -p1 -b .use-IW_ENCODE_TEMP
%patch15 -p1 -b .signal-leak-fixes
%build
cp %{SOURCE1} ./.config
@ -86,6 +89,8 @@ install -d %{buildroot}/%{_sysconfdir}/rc.d/init.d
install -d %{buildroot}/%{_sysconfdir}/sysconfig
install -m 0755 %{SOURCE3} %{buildroot}/%{_sysconfdir}/rc.d/init.d/%{name}
install -m 0644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/sysconfig/%{name}
install -d %{buildroot}/%{_sysconfdir}/logrotate.d
install -m 0644 %{SOURCE7} %{buildroot}/%{_sysconfdir}/logrotate.d/%{name}
# config
install -d %{buildroot}/%{_sysconfdir}/%{name}
@ -138,6 +143,7 @@ fi
%doc COPYING ChangeLog README eap_testing.txt todo.txt wpa_supplicant.conf examples
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%{_sysconfdir}/rc.d/init.d/%{name}
%{_sysconfdir}/dbus-1/system.d/%{name}.conf
%{_datadir}/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service
@ -154,6 +160,14 @@ fi
%{_bindir}/wpa_gui
%changelog
* Thu Dec 6 2007 Dan Williams <dcbw@redhat.com> - 1:0.5.7-19
- Fix two leaks when signalling state and scan results (rh #408141)
- Add logrotate config file (rh #404181)
- Add new LSB initscript header to initscript with correct deps (rh #244029)
- Move other runtime arguments to /etc/sysconfig/wpa_supplicant
- Start after messagebus service (rh #385191)
- Fix initscript 'condrestart' command (rh #217281)
* Tue Dec 4 2007 Matthias Clasen <mclasen@redhat.com> - 1:0.5.7-18
- Rebuild against new openssl

View File

@ -1,2 +1,12 @@
# Use the flag "-i" before each of your interfaces, like so:
# INTERFACES="-ieth1 -iwlan0"
INTERFACES=""
# Use the flag "-D" before each driver, like so:
# DRIVERS="-Dwext"
DRIVERS=""
# Other arguments
# -u Enable the D-Bus interface (required for use with NetworkManager)
# -f Log to /var/log/wpa_supplicant.log
OTHER_ARGS="-u -f"