Compare commits

...
This repository has been archived on 2026-09-10. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.

8 commits

Author SHA1 Message Date
David Cantrell
900c3f9cce Rebuild (#820166) 2012-10-23 10:00:09 -04:00
David Cantrell
caca815bef Fix CVE-2012-2095 property handling (#820166) 2012-08-02 13:28:24 -04:00
David Cantrell
dfc4dcf76b Fix CVE-2012-2095 (#811763) 2012-04-13 10:22:05 -04:00
David Cantrell
899bc6393b dhclient.conf.template is now in /etc/wicd, correct %files (#754412) 2012-03-26 15:49:10 -04:00
David Cantrell
84969edea6 Ensure wpath.etc is set to /etc/wicd, not /etc/dhcp (#754412)
- Initialize child_pid to None in wicd-daemon.py (#798692)
- Make wicd-gtk subpackage require notify-python (#748258)
- Work around no-op problem in DaemonClosing calls (#740317)
2012-03-26 15:32:19 -04:00
David Cantrell
f360949779 Fix usage of is_mouse_event() in wicd-curses (#800617)
- Make wicd-common require pygobject2 (#799537)
2012-03-21 14:30:06 -04:00
David Cantrell
f79afab29f Fix CVS-2012-0813 (#785147) 2012-01-27 14:47:47 -05:00
David Cantrell
47be389a33 Initialize appGui._wired_showing in __init__ (#723553)
Make sure check and message in wicd-cli are a lambda (#712435)
Correct systemd unit file for wicd, add D-Bus service file (#699116)
Move docs to the wicd-common subpackage
Correct /etc/dbus-1/system.d/wicd.conf (#699116)
2011-08-19 16:22:20 -04:00
13 changed files with 354 additions and 7 deletions

11
org.wicd.daemon.service Normal file
View file

@ -0,0 +1,11 @@
# This D-Bus service activation file is only for systemd support since
# an auto-activated wicd would be quite surprising for those people
# who have wicd installed but turned off. Thus the Exec path available to
# D-Bus is /bin/false, but systemd knows the real Exec path due to the
# wicd systemd .service file.
[D-BUS Service]
Name=org.wicd.daemon
Exec=/bin/false
User=root
SystemdService=dbus-org.wicd.daemon.service

View file

@ -0,0 +1,19 @@
diff -up wicd-1.7.0/wicd/configmanager.py.CVE-2012-0813 wicd-1.7.0/wicd/configmanager.py
--- wicd-1.7.0/wicd/configmanager.py.CVE-2012-0813 2012-01-27 14:34:12.779219466 -0500
+++ wicd-1.7.0/wicd/configmanager.py 2012-01-27 14:34:33.534091679 -0500
@@ -97,8 +97,13 @@ class ConfigManager(RawConfigParser):
ret = ret[3:-3]
if default:
if self.debug:
- print ''.join(['found ', option, ' in configuration ',
- str(ret)])
+ # mask out sensitive information
+ if option in ['apsk', 'password', 'identity', 'private_key', \
+ 'private_key_passwd', 'key', 'passphrase']:
+ print ''.join(['found ', option, ' in configuration *****'])
+ else:
+ print ''.join(['found ', option, ' in configuration ',
+ str(ret)])
else:
if default != "__None__":
print 'did not find %s in configuration, setting default %s' % (option, str(default))

View file

@ -0,0 +1,36 @@
diff -up wicd-1.7.0/wicd/wicd-daemon.py.CVE-2012-2095 wicd-1.7.0/wicd/wicd-daemon.py
--- wicd-1.7.0/wicd/wicd-daemon.py.CVE-2012-2095 2012-08-02 13:23:50.350929278 -0400
+++ wicd-1.7.0/wicd/wicd-daemon.py 2012-08-02 13:25:45.757947487 -0400
@@ -1086,9 +1086,9 @@ class WirelessDaemon(dbus.service.Object
def SetWirelessProperty(self, netid, prop, value):
""" Sets property to value in network specified. """
# We don't write script settings here.
- if (prop.strip()).endswith("script"):
- print "Setting script properties through the daemon is not" \
- + " permitted."
+ if misc.sanitize_config(prop).endswith('script'):
+ print 'Setting script properties through the daemon' \
+ + ' is not permitted.'
return False
self.LastScan[netid][prop] = misc.to_unicode(misc.Noneify(value))
@@ -1405,14 +1405,14 @@ class WiredDaemon(dbus.service.Object):
return str(iface)
@dbus.service.method('org.wicd.daemon.wired')
- def SetWiredProperty(self, property, value):
+ def SetWiredProperty(self, prop, value):
""" Sets the given property to the given value. """
if self.WiredNetwork:
- if (property.strip()).endswith("script"):
- print "Setting script properties through the daemon" \
- + " is not permitted."
+ if misc.sanitize_config(prop).endswith('script'):
+ print 'Setting script properties through the daemon' \
+ + ' is not permitted.'
return False
- self.WiredNetwork[property] = misc.to_unicode(misc.Noneify(value))
+ self.WiredNetwork[prop] = misc.to_unicode(misc.Noneify(value))
return True
else:
print 'SetWiredProperty: WiredNetwork does not exist'

View file

@ -0,0 +1,12 @@
diff -up wicd-1.7.0/wicd/wicd-daemon.py.orig wicd-1.7.0/wicd/wicd-daemon.py
--- wicd-1.7.0/wicd/wicd-daemon.py.orig 2012-03-26 15:26:26.917169045 -0400
+++ wicd-1.7.0/wicd/wicd-daemon.py 2012-03-26 15:27:03.948188499 -0400
@@ -846,7 +846,7 @@ class WicdDaemon(dbus.service.Object):
pass
@dbus.service.signal(dbus_interface='org.wicd.daemon', signature='')
- def DaemonClosing(self):
+ def DaemonClosing(self, arg1=None, arg2=None):
""" Emits a signal indicating the daemon will be closing. """
pass

View file

@ -0,0 +1,11 @@
diff -up wicd-1.7.0/wicd/wicd-daemon.py.orig wicd-1.7.0/wicd/wicd-daemon.py
--- wicd-1.7.0/wicd/wicd-daemon.py.orig 2010-01-14 23:49:11.000000000 -0500
+++ wicd-1.7.0/wicd/wicd-daemon.py 2012-03-26 15:24:27.863044957 -0400
@@ -1801,6 +1801,7 @@ def main(argv):
bus = dbus.SystemBus()
wicd_bus = dbus.service.BusName('org.wicd.daemon', bus=bus)
daemon = WicdDaemon(wicd_bus, auto_connect=auto_connect)
+ child_pid = None
if not no_poll:
child_pid = Popen([misc.find_path("python"), "-O",
os.path.join(wpath.daemon, "monitor.py")],

View file

@ -0,0 +1,50 @@
diff -up wicd-1.7.0/cli/wicd-cli.py.orig wicd-1.7.0/cli/wicd-cli.py
--- wicd-1.7.0/cli/wicd-cli.py.orig 2010-01-14 23:49:11.000000000 -0500
+++ wicd-1.7.0/cli/wicd-cli.py 2011-08-05 11:09:57.561058338 -0400
@@ -43,6 +43,10 @@ except dbus.DBusException:
print 'Error: Could not connect to the daemon. Please make sure it is running.'
sys.exit(3)
+if daemon is None:
+ print 'Error connecting to wicd via D-Bus. Please make sure the wicd service is running.'
+ sys.exit(3)
+
parser = optparse.OptionParser()
parser.add_option('--network', '-n', type='int', default=-1)
diff -up wicd-1.7.0/curses/wicd-curses.py.orig wicd-1.7.0/curses/wicd-curses.py
--- wicd-1.7.0/curses/wicd-curses.py.orig 2010-01-14 23:49:11.000000000 -0500
+++ wicd-1.7.0/curses/wicd-curses.py 2011-08-05 11:09:00.248056606 -0400
@@ -1016,6 +1016,10 @@ def setup_dbus(force=True):
wireless = dbus_ifaces['wireless']
wired = dbus_ifaces['wired']
+ if daemon is None:
+ print 'Error connecting to wicd via D-Bus. Please make sure the wicd service is running.'
+ sys.exit(3)
+
netentry_curses.dbus_init(dbus_ifaces)
return True
diff -up wicd-1.7.0/gtk/gui.py.orig wicd-1.7.0/gtk/gui.py
--- wicd-1.7.0/gtk/gui.py.orig 2010-01-14 23:49:11.000000000 -0500
+++ wicd-1.7.0/gtk/gui.py 2011-08-05 10:49:08.392177338 -0400
@@ -146,6 +146,17 @@ class appGui(object):
""" Initializes everything needed for the GUI. """
setup_dbus()
+ if daemon is None:
+ errmsg = "Error connecting to wicd service via D-Bus." + \
+ "Please ensure the wicd service is running."
+ d = gtk.MessageDialog(parent=None,
+ flags=gtk.DIALOG_MODAL,
+ type=gtk.MESSAGE_ERROR,
+ buttons=gtk.BUTTONS_OK,
+ message_format=errmsg)
+ d.run()
+ sys.exit(1)
+
self.tray = tray
gladefile = os.path.join(wpath.gtk, "wicd.glade")
diff -up wicd-1.7.0/gtk/wicd-client.py.orig wicd-1.7.0/gtk/wicd-client.py

View file

@ -0,0 +1,54 @@
diff -up wicd-1.7.0/in/other=wicd.conf.in.orig wicd-1.7.0/in/other=wicd.conf.in
--- wicd-1.7.0/in/other=wicd.conf.in.orig 2010-01-14 23:49:11.000000000 -0500
+++ wicd-1.7.0/in/other=wicd.conf.in 2011-08-11 16:57:20.818332542 -0400
@@ -7,41 +7,24 @@
<allow own="org.wicd.daemon"/>
<allow send_destination="org.wicd.daemon"/>
<allow send_interface="org.wicd.daemon"/>
- <allow send_destination="org.wicd.daemon.wireless"/>
- <allow send_interface="org.wicd.daemon.wireless"/>
- <allow send_destination="org.wicd.daemon.wired"/>
- <allow send_interface="org.wicd.daemon.wired"/>
+ <allow send_destination="org.wicd.daemon.wireless"/>
+ <allow send_interface="org.wicd.daemon.wireless"/>
+ <allow send_destination="org.wicd.daemon.wired"/>
+ <allow send_interface="org.wicd.daemon.wired"/>
</policy>
<policy context="default">
<deny own="org.wicd.daemon"/>
</policy>
- <!-- This Unix group will have permission to use Wicd's gui -->
- <policy group="%WICDGROUP%">
- <allow send_destination="org.wicd.daemon"/>
- <allow send_interface="org.wicd.daemon"/>
- <allow send_interface="org.freedesktop.DBus.Introspectable"/>
- <!-- The Introspectable allow shouldn't be needed here, but
- it seems that a few distributions aren't yet allowing
- it in their hal configs, and we need it here, so... -->
- </policy>
-
- <!-- Comment the block below if you do not want all users logged in
- locally to have permission to use wicd-client. This ignores the
- group based permission model defined above for the "%WICDGROUP%"
- group. Note that this only applies if you are using ConsoleKit -
- if you do not have ConsoleKit installed and in use, then this
- block makes no difference either way. -->
-
<policy at_console="true">
<allow send_destination="org.wicd.daemon"/>
<allow send_interface="org.wicd.daemon"/>
- <allow send_destination="org.wicd.daemon.wireless"/>
- <allow send_interface="org.wicd.daemon.wireless"/>
- <allow send_destination="org.wicd.daemon.wired"/>
- <allow send_interface="org.wicd.daemon.wired"/>
- <allow send_interface="org.freedesktop.DBus.Introspectable"/>
+ <allow send_destination="org.wicd.daemon.wireless"/>
+ <allow send_interface="org.wicd.daemon.wireless"/>
+ <allow send_destination="org.wicd.daemon.wired"/>
+ <allow send_interface="org.wicd.daemon.wired"/>
+ <allow send_interface="org.freedesktop.DBus.Introspectable"/>
</policy>
</busconfig>

View file

@ -0,0 +1,27 @@
diff -up wicd-1.7.0/curses/wicd-curses.py.orig wicd-1.7.0/curses/wicd-curses.py
--- wicd-1.7.0/curses/wicd-curses.py.orig 2011-08-11 17:01:29.969340068 -0400
+++ wicd-1.7.0/curses/wicd-curses.py 2011-08-11 17:01:30.159340092 -0400
@@ -1033,7 +1033,7 @@ if __name__ == '__main__':
parser = OptionParser(version="wicd-curses-%s (using wicd %s)" % (CURSES_REV,daemon.Hello()))
except Exception, e:
if "DBus.Error.AccessDenied" in e.get_dbus_name():
- print language['access_denied_wc'].replace('$A','\033[1;34m'+wpath.wicd_group+'\033[0m')
+ print language['access_denied_wc']
sys.exit(1)
else:
raise
diff -up wicd-1.7.0/wicd/translations.py.orig wicd-1.7.0/wicd/translations.py
--- wicd-1.7.0/wicd/translations.py.orig 2010-01-14 23:49:23.000000000 -0500
+++ wicd-1.7.0/wicd/translations.py 2011-08-11 17:01:30.179340042 -0400
@@ -214,9 +214,9 @@ language['connection_established'] = _('
language['disconnected'] = _('''Disconnected''')
language['establishing_connection'] = _('''Establishing connection...''')
language['association_failed'] = _('''Connection failed: Could not contact the wireless access point.''')
-language['access_denied'] = _('''Unable to contact the Wicd daemon due to an access denied error from DBus. Please check that your user is in the $A group.''')
+language['access_denied'] = _('''Unable to contact the Wicd daemon due to an access denied error from DBus. Please check your D-Bus policy configuration.''')
language['disconnecting_active'] = _('''Disconnecting active connections...''')
-language['access_denied_wc'] = _('''ERROR: wicd-curses was denied access to the wicd daemon: please check that your user is in the "$A" group.''')
+language['access_denied_wc'] = _('''ERROR: wicd-curses was denied access to the wicd daemon: please check your D-Bus policy configuration.''')
language['post_disconnect_script'] = _('''Run post-disconnect script''')
language['resume_script'] = _('''Resume script''')
language['suspend_script'] = _('''Suspend script''')

View file

@ -0,0 +1,13 @@
diff -up wicd-1.7.0/cli/wicd-cli.py.orig wicd-1.7.0/cli/wicd-cli.py
--- wicd-1.7.0/cli/wicd-cli.py.orig 2011-08-19 15:24:57.413159478 -0400
+++ wicd-1.7.0/cli/wicd-cli.py 2011-08-19 15:31:49.790055545 -0400
@@ -195,6 +195,9 @@ if options.connect:
check = lambda: wired.CheckIfWiredConnecting()
message = lambda: wired.CheckWiredConnectingMessage()
+ else:
+ check = lambda: False
+ message = lambda: False
# update user on what the daemon is doing
last = None

View file

@ -0,0 +1,16 @@
diff -up wicd-1.7.0/curses/wicd-curses.py.orig wicd-1.7.0/curses/wicd-curses.py
--- wicd-1.7.0/curses/wicd-curses.py.orig 2012-03-21 14:20:39.808063903 -0400
+++ wicd-1.7.0/curses/wicd-curses.py 2012-03-21 14:21:04.392066581 -0400
@@ -881,7 +881,11 @@ class appGUI():
data[4], False)
for k in keys:
- if urwid.is_mouse_event(k):
+ if urwid.VERSION < (1, 0, 0):
+ check_mouse_event = urwid.is_mouse_event
+ else:
+ check_mouse_event = urwid.util.is_mouse_event
+ if check_mouse_event(k):
event, button, col, row = k
self.frame.mouse_event( self.size,
event, button, col, row,

View file

@ -0,0 +1,11 @@
diff -up wicd-1.7.0/gtk/gui.py.orig wicd-1.7.0/gtk/gui.py
--- wicd-1.7.0/gtk/gui.py.orig 2011-08-19 14:53:37.667180427 -0400
+++ wicd-1.7.0/gtk/gui.py 2011-08-19 14:55:43.657056952 -0400
@@ -220,6 +220,7 @@ class appGui(object):
self.refreshing = False
self.prev_state = None
self.update_cb = None
+ self._wired_showing = False
self.network_list.set_sensitive(False)
label = gtk.Label("%s..." % language['scanning'])
self.network_list.pack_start(label)

View file

@ -1,11 +1,15 @@
[Unit]
Description=Wicd a wireless and wired network manager for Linux
After=syslog.target
Wants=network.target
Before=network.target
Conflicts=NetworkManager.service
[Service]
Type=forking
ExecStart=/usr/sbin/wicd
ExecStop=/usr/sbin/wicd -k
Type=dbus
BusName=org.wicd.daemon
ExecStart=/usr/sbin/wicd --no-daemon
[Install]
WantedBy=multi-user.target
Alias=dbus-org.wicd.daemon.service

View file

@ -9,7 +9,7 @@
Name: wicd
Version: 1.7.0
Release: 8%{?dist}
Release: 15%{?dist}
Summary: Wireless and wired network connection manager
Group: System Environment/Base
@ -18,8 +18,20 @@ URL: http://wicd.sourceforge.net/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
Source1: wicd.logrotate
Source2: wicd.service
Source3: org.wicd.daemon.service
Patch0: wicd-1.7.0-remove-WHEREAREMYFILES.patch
Patch1: wicd-1.7.0-deepcopy.patch
Patch2: wicd-1.7.0-dbus-failure.patch
Patch3: wicd-1.7.0-error-messages.patch
Patch4: wicd-1.7.0-dbus-policy.patch
Patch5: wicd-1.7.0-wired_showing.patch
Patch6: wicd-1.7.0-initialize-check-and-message.patch
Patch7: wicd-1.7.0-CVE-2012-0813.patch
Patch8: wicd-1.7.0-is_mouse_event.patch
Patch9: wicd-1.7.0-child_pid.patch
Patch10: wicd-1.7.0-DaemonClosing.patch
Patch11: wicd-1.7.0-CVE-2012-2095.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
BuildRequires: python2-devel
@ -50,6 +62,7 @@ Requires: ethtool
Requires: iproute
Requires: logrotate
Requires: net-tools
Requires: pygobject2
Requires: wireless-tools
Requires: wpa_supplicant
Requires(post): systemd-units
@ -74,6 +87,7 @@ Summary: GTK+ client for wicd
Group: Applications/Internet
BuildArch: noarch
Requires: %{name}-common = %{version}-%{release}
Requires: notify-python
Requires: pygtk2-libglade >= 2.10
%description gtk
@ -90,13 +104,48 @@ Client program for wicd that uses a GTK+ interface.
# Use cPickle instead of deepcopy in configmanager.py
%patch1 -p1
# Handle D-Bus connection failures a little better
%patch2 -p1
# Direct users to D-Bus policy configuration on connection failure
%patch3 -p1
# Allow users at the console to control wicd
%patch4 -p1
# Initialize appGui._wired_showing in __init__
%patch5 -p1
# Make sure check and message are always a lambda
%patch6 -p1
# Fix CVE-2012-0813
# Patch based on upstream:
# http://bazaar.launchpad.net/~wicd-devel/wicd/experimental/revision/682
%patch7 -p1
# Fix usage of is_mouse_event() in wicd-curses
%patch8 -p1
# Initialize child_pid to None in wicd-daemon.py
%patch9 -p1
# Work around bug in DaemonClosing() calls
%patch10 -p1
# Fix CVE-2012-2095
# Patch based on upstream:
# http://bazaar.launchpad.net/~wicd-devel/wicd/experimental/revision/751
# http://bazaar.launchpad.net/~wicd-devel/wicd/experimental/revision/758/wicd/wicd-daemon.py
%patch11 -p1
%build
# NOTE: --etc is where dhclient.conf.template goes
%{__python} setup.py configure \
--distro redhat \
--lib %{_libdir} \
--share %{_datadir}/wicd \
--etc %{_sysconfdir}/dhcp \
--etc %{_sysconfdir}/wicd \
--bin %{_bindir} \
--pmutils %{_libdir}/pm-utils/sleep.d \
--log %{_localstatedir}/log \
@ -136,6 +185,9 @@ install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/wicd
mkdir -p %{buildroot}%{_systemd_unitdir}
install -m 0644 %{SOURCE2} %{buildroot}%{_systemd_unitdir}/wicd.service
mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services
install -m 0644 %{SOURCE3} %{buildroot}%{_datadir}/dbus-1/system-services/org.wicd.daemon.service
desktop-file-install \
--remove-category="Application" \
--delete-original \
@ -190,11 +242,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files
%defattr(-,root,root,-)
%doc AUTHORS CHANGES LICENSE NEWS README other/WHEREAREMYFILES
%{_libdir}/pm-utils/sleep.d/91wicd
%files common -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS CHANGES LICENSE NEWS README other/WHEREAREMYFILES
%dir %{python_sitelib}/wicd
%dir %{_sysconfdir}/wicd
%dir %{_sysconfdir}/wicd/encryption
@ -207,7 +259,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_sysconfdir}/acpi/resume.d/80-wicd-connect.sh
%{_sysconfdir}/acpi/suspend.d/50-wicd-suspend.sh
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/wicd.conf
%config(noreplace) %{_sysconfdir}/dhcp/dhclient.conf.template.default
%config(noreplace) %{_sysconfdir}/wicd/dhclient.conf.template.default
%config(noreplace) %{_sysconfdir}/logrotate.d/wicd
%config(noreplace) %{_sysconfdir}/wicd/encryption/templates/active
%config(noreplace) %{_sysconfdir}/wicd/encryption/templates/eap
@ -228,6 +280,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_bindir}/wicd-client
%{_sbindir}/wicd
%{_datadir}/applications/wicd.desktop
%{_datadir}/dbus-1/system-services/org.wicd.daemon.service
%{_datadir}/man/man1/wicd-client.1*
%{_datadir}/man/man5/wicd-manager-settings.conf.5*
%{_datadir}/man/man5/wicd-wired-settings.conf.5*
@ -270,6 +323,36 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_datadir}/icons/hicolor/scalable/apps/wicd-gtk.svg
%changelog
* Tue Oct 23 2012 David Cantrell <dcantrell@redhat.com> - 1.7.0-15
- Rebuild (#820166)
* Thu Aug 02 2012 David Cantrell <dcantrell@redhat.com> - 1.7.0-14
- Fix CVE-2012-2095 property handling (#820166)
* Fri Apr 13 2012 David Cantrell <dcantrell@redhat.com> - 1.7.0-13
- Fix CVE-2012-2095 (#811763)
* Mon Mar 26 2012 David Cantrell <dcantrell@redhat.com> - 1.7.0-12
- Ensure wpath.etc is set to /etc/wicd, not /etc/dhcp (#754412)
- Initialize child_pid to None in wicd-daemon.py (#798692)
- Make wicd-gtk subpackage require notify-python (#748258)
- Work around no-op problem in DaemonClosing calls (#740317)
- dhclient.conf.template is now in /etc/wicd, correct %%files (#754412)
* Wed Mar 21 2012 David Cantrell <dcantrell@redhat.com> - 1.7.0-11
- Fix usage of is_mouse_event() in wicd-curses (#800617)
- Make wicd-common require pygobject2 (#799537)
* Fri Jan 27 2012 David Cantrell <dcantrell@redhat.com> - 1.7.0-10
- Fix CVS-2012-0813 (#785147)
* Fri Aug 19 2011 David Cantrell <dcantrell@redhat.com> - 1.7.0-9
- Initialize appGui._wired_showing in __init__ (#723553)
- Make sure check and message in wicd-cli are a lambda (#712435)
- Correct systemd unit file for wicd, add D-Bus service file (#699116)
- Move docs to the wicd-common subpackage
- Correct /etc/dbus-1/system.d/wicd.conf (#699116)
* Mon May 09 2011 Bill Nottingham <notting@redhat.com> - 1.7.0-8
- fix systemd scriptlets for upgrade