~ubuntu-branches/ubuntu/oneiric/network-manager/oneiric

« back to all changes in this revision

Viewing changes to debian/patches/git_disconn_secrets_reqs_b613a17.patch

  • Committer: Bazaar Package Importer
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2011-05-06 12:59:53 UTC
  • mfrom: (1.1.45 upstream)
  • Revision ID: james.westby@ubuntu.com-20110506125953-r4ka8fnwirdjd2g8
Tags: 0.8.4-0ubuntu1
* Upstream release 0.8.4.
* debian/source/format: migrate to package format 3.0 (quilt)
* debian/patches/99_printf_formatting_fixes.patch: dropped, applied upstream.
* debian/patches/git_disconn_secrets_reqs_b613a17.patch,
  debian/patches/git_wwan_state_detection_d0a1b23.patch, 
  debian/patches/git_wired_ap_scan_value_a262dc4.patch: dropped,
  applied upstream.
* debian/patches/lp120363_smartcard_pkcs11.patch: refreshed, for reordering
  the new symbols in the symbols list file.
* debian/patches/02-dbus_access_network_manager.patch: dropped, no longer
  required (hal is deprecated).
* debian/control: merge Debian changes and migrate to DH instead of CDBS:
  - bump debhelper Build-Depends to >= 8.
  - add Build-Depends on dh-autoreconf.
  - sync Build-Depends with Debian's; this drops automake1.9, cdbs, quilt,
    gnome-common, libgnome-keyring-dev, libgnomeui-dev, libpanel-applet2-dev,
    libglade2-dev, libgconf2-dev, iproute.
  - add new package network-manager-dbg for debug symbols.
  - bump Standards-Version to 3.9.2.
* debian/control: merge binary packages dependencies with Debian, important
  changes:
  - network-manager: Depends adds udev and isc-dhcp-client (>= 4.1.1-P1-4)
  - network-manager: Recommends: adds policykit-1
  - network-manager: Suggests: adds avahi-autoipd
* debian/compat: bump to compat level 8.
* debian/rules:
  - migrate to use dh instead of CDBS.
  - add override for dh_strip to correctly strip NM to the new
    package network-manager-dbg. 
  - cleanup more extra files left behind by the build.
* debian/libnm-glib-dev.install,
  debian/libnm-glib-vpn-dev.install: clean up and sync with Debian.
* debian/libnm-glib-dev.links: drop links to legacy names for .pc files,
  introduced in Karmic for a transition: they're not required anymore.
* debian/libnm-util-dev.install: sync with Debian.
* debian/network-manager.install:
  - don't ship .a and .la files.
  - explicitly install /usr/bin/nm-online.
  - install dispatchers from upstream in /etc/NetworkManager/dispatcher.d.
  - install extra udev rules from upstream.
* debian/network-manager.dirs: sync with Debian.
* debian/network-manager.docs: define additional upstream files to ship as
  documentation.
  - drop ifblacklist_migrate.sh and /usr/share/NetworkManager/gdb-cmd
* debian/network-manager.postrm: drop old code migrating /etc/dbus-1/event.d.
* debian/network-manager.postinst: drop code migrating /etc/dbus-1/event.d.
* debian/copyright: sync with Debian.
* debian/README.Debian: add information about using System-level settings and
  connections.
* debian/watch: because I can.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From b613a1777b97c646c13edbca277981f788a3462b Mon Sep 17 00:00:00 2001
2
 
From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
3
 
Date: Wed, 13 Apr 2011 20:20:38 +0000
4
 
Subject: core: disconnect signals from VPN connection objects when quitting (lp:737713)
5
 
 
6
 
A copy & paste error in the VPN connection code meant the VPN
7
 
connection was canceling secrets requests for the underlying
8
 
device's activation request, not the VPN connection's requests.
9
 
Fix that, and as an additional measure, ensure that the manager
10
 
removes signal handlers when it gets destroyed that it registered
11
 
earlier, preventing those handlers from getting called by the
12
 
VPN connection after the manager is dead.  That can happen because
13
 
the VPN manager holds references to the VPN connection objects,
14
 
and the VPN manager gets destroyed after the NMManager does.
15
 
 
16
 
This caused a crash when exiting NM when a VPN connection was active.
17
 
 
18
 
(pointed out by dcbw)
19
 
---
20
 
Index: network-manager-0.8.4~git.20110319t175609.d14809b/src/nm-manager.c
21
 
===================================================================
22
 
--- network-manager-0.8.4~git.20110319t175609.d14809b.orig/src/nm-manager.c     2011-04-14 14:52:36.371306536 -0400
23
 
+++ network-manager-0.8.4~git.20110319t175609.d14809b/src/nm-manager.c  2011-04-14 14:53:26.671306515 -0400
24
 
@@ -4349,7 +4349,7 @@
25
 
 {
26
 
        NMManager *manager = NM_MANAGER (object);
27
 
        NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (manager);
28
 
-       GSList *iter;
29
 
+       GSList *iter, *list;
30
 
        DBusGConnection *bus;
31
 
        DBusConnection *dbus_connection;
32
 
 
33
 
@@ -4395,6 +4395,22 @@
34
 
                priv->sys_settings = NULL;
35
 
        }
36
 
 
37
 
+       /* Make sure we disconnect signal handlers from VPN connections that
38
 
+        * might still be alive when the manager dies.
39
 
+        */
40
 
+       list = nm_vpn_manager_get_active_connections (priv->vpn_manager);
41
 
+       for (iter = list; iter; iter = g_slist_next (iter)) {
42
 
+               NMActRequest *req = nm_vpn_connection_get_act_request (NM_VPN_CONNECTION (iter->data));
43
 
+               g_signal_handlers_disconnect_by_func (G_OBJECT (req),
44
 
+                                                     G_CALLBACK (provider_get_secrets),
45
 
+                                                     manager);
46
 
+               g_signal_handlers_disconnect_by_func (G_OBJECT (req),
47
 
+                                                     G_CALLBACK (provider_cancel_secrets),
48
 
+                                                     manager);
49
 
+               nm_log_warn (LOGD_CORE, "disposing of VPN connection '%s'", nm_vpn_connection_get_name (NM_VPN_CONNECTION (iter->data)));
50
 
+               /* unref to balance returned objects from the VPN manager */
51
 
+               g_object_unref (iter->data);
52
 
+       }
53
 
        if (priv->vpn_manager_id) {
54
 
                g_source_remove (priv->vpn_manager_id);
55
 
                priv->vpn_manager_id = 0;
56
 
Index: network-manager-0.8.4~git.20110319t175609.d14809b/src/vpn-manager/nm-vpn-connection.c
57
 
===================================================================
58
 
--- network-manager-0.8.4~git.20110319t175609.d14809b.orig/src/vpn-manager/nm-vpn-connection.c  2011-03-21 22:15:39.000000000 -0400
59
 
+++ network-manager-0.8.4~git.20110319t175609.d14809b/src/vpn-manager/nm-vpn-connection.c       2011-04-14 14:52:36.441306536 -0400
60
 
@@ -687,6 +687,14 @@
61
 
        return NM_VPN_CONNECTION_GET_PRIVATE (connection)->connection;
62
 
 }
63
 
 
64
 
+NMActRequest *
65
 
+nm_vpn_connection_get_act_request (NMVPNConnection *connection)
66
 
+{
67
 
+       g_return_val_if_fail (NM_IS_VPN_CONNECTION (connection), NULL);
68
 
+
69
 
+       return NM_VPN_CONNECTION_GET_PRIVATE (connection)->act_request;
70
 
+}
71
 
+
72
 
 NMVPNConnectionState
73
 
 nm_vpn_connection_get_vpn_state (NMVPNConnection *connection)
74
 
 {
75
 
Index: network-manager-0.8.4~git.20110319t175609.d14809b/src/vpn-manager/nm-vpn-connection.h
76
 
===================================================================
77
 
--- network-manager-0.8.4~git.20110319t175609.d14809b.orig/src/vpn-manager/nm-vpn-connection.h  2011-03-21 22:15:39.000000000 -0400
78
 
+++ network-manager-0.8.4~git.20110319t175609.d14809b/src/vpn-manager/nm-vpn-connection.h       2011-04-14 14:52:36.441306536 -0400
79
 
@@ -63,6 +63,7 @@
80
 
 
81
 
 void                 nm_vpn_connection_activate        (NMVPNConnection *connection);
82
 
 NMConnection *       nm_vpn_connection_get_connection  (NMVPNConnection *connection);
83
 
+NMActRequest *       nm_vpn_connection_get_act_request (NMVPNConnection *connection);
84
 
 const char *         nm_vpn_connection_get_active_connection_path (NMVPNConnection *connection);
85
 
 const char *         nm_vpn_connection_get_name        (NMVPNConnection *connection);
86
 
 NMVPNConnectionState nm_vpn_connection_get_vpn_state   (NMVPNConnection *connection);