Merge lp:~phablet-team/network-manager/rm-scofono-plugin-dbus-vivid into lp:~phablet-team/network-manager/vivid-phone-overlay

Proposed by Tony Espy
Status: Merged
Approved by: Alfonso Sanchez-Beato
Approved revision: 972
Merged at revision: 971
Proposed branch: lp:~phablet-team/network-manager/rm-scofono-plugin-dbus-vivid
Merge into: lp:~phablet-team/network-manager/vivid-phone-overlay
Prerequisite: lp:~phablet-team/network-manager/fix-ofono-plugin-mem-leaks-vivid
Diff against target: 253 lines (+204/-4)
4 files modified
debian/changelog (+5/-2)
debian/network-manager.install (+0/-1)
debian/patches/rm-scofono-plugin-dbus.patch (+198/-0)
debian/patches/series (+1/-1)
To merge this branch: bzr merge lp:~phablet-team/network-manager/rm-scofono-plugin-dbus-vivid
Reviewer Review Type Date Requested Status
Mathieu Trudel-Lapierre Approve
Simon Fels Pending
Review via email: mp+273143@code.launchpad.net

Description of the change

This change drops the DBus code from the ofono settings plugin.

The only DBus method in the plugin, ReadImsiContexts, hasn't been used ever since the following vivid patch ( which has since been merged into the current add_ofono_settings.patch for wily ):

lp1361864-add-ofono-preferred-contexts.patch

To post a comment you must log in.
971. By Tony Espy

* d/p/rm-scofono-plugin-dbus.patch: Remove unused plugin DBus code.
* d/p/CVE-2015-1322.patch: Drop CVE which applied to removed DBus code
  in ofono settings plugin.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) :
review: Approve
972. By Tony Espy

releasing network-manager 0.9.10.0-4ubuntu15.1.8

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2015-10-02 14:56:36 +0000
3+++ debian/changelog 2015-10-02 14:56:36 +0000
4@@ -1,12 +1,15 @@
5-network-manager (0.9.10.0-4ubuntu15.1.8) UNRELEASED; urgency=medium
6+network-manager (0.9.10.0-4ubuntu15.1.8) vivid; urgency=medium
7
8 * d/p/0002-wifi-cull-the-scan-list-before-signalling-ScanDone-b.patch:
9 Fix duplicate 'LastSeen' PropertiesChanged signals being emitted
10 after scanning (LP: #1480877).
11 * d/p/fix-ofono-plugin-leaks.patch: fix memory leaks in the ofono
12 settings plugin.
13+ * d/p/rm-scofono-plugin-dbus.patch: Remove unused plugin DBus code.
14+ * d/p/CVE-2015-1322.patch: Drop CVE which applied to removed DBus code
15+ in ofono settings plugin.
16
17- -- Tony Espy <espy@canonical.com> Thu, 01 Oct 2015 16:30:19 -0400
18+ -- Tony Espy <espy@canonical.com> Fri, 02 Oct 2015 10:54:24 -0400
19
20 network-manager (0.9.10.0-4ubuntu15.1.7) vivid; urgency=medium
21
22
23=== modified file 'debian/network-manager.install'
24--- debian/network-manager.install 2014-11-11 04:33:16 +0000
25+++ debian/network-manager.install 2015-10-02 14:56:36 +0000
26@@ -18,7 +18,6 @@
27 etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf
28 etc/dbus-1/system.d/nm-dispatcher.conf
29 etc/dbus-1/system.d/nm-avahi-autoipd.conf
30-etc/dbus-1/system.d/nm-ofono.conf
31 etc/NetworkManager/dispatcher.d/
32 lib/udev/rules.d/*.rules
33 lib/systemd/system/NetworkManager.service
34
35=== added file 'debian/patches/rm-scofono-plugin-dbus.patch'
36--- debian/patches/rm-scofono-plugin-dbus.patch 1970-01-01 00:00:00 +0000
37+++ debian/patches/rm-scofono-plugin-dbus.patch 2015-10-02 14:56:36 +0000
38@@ -0,0 +1,198 @@
39+Index: b/src/settings/plugins/ofono/Makefile.am
40+===================================================================
41+--- a/src/settings/plugins/ofono/Makefile.am
42++++ b/src/settings/plugins/ofono/Makefile.am
43+@@ -2,12 +2,6 @@ SUBDIRS = .
44+
45+ @GNOME_CODE_COVERAGE_RULES@
46+
47+-nm-ofono-glue.h: nm-ofono.xml
48+- $(AM_V_GEN) dbus-binding-tool --prefix=nm_ofono --mode=glib-server --output=$@ $<
49+-
50+-BUILT_SOURCES = \
51+- nm-ofono-glue.h
52+-
53+ INCLUDES = \
54+ -I$(top_srcdir)/src \
55+ -I$(top_srcdir)/src/logging \
56+@@ -58,11 +52,4 @@ libnm_settings_plugin_ofono_la_LIBADD =
57+ $(GLIB_LIBS) \
58+ $(GUDEV_LIBS)
59+
60+-dbusservicedir = $(DBUS_SYS_DIR)
61+-dbusservice_DATA = nm-ofono.conf
62+-
63+-EXTRA_DIST = \
64+- $(dbusservice_DATA) \
65+- nm-ofono.xml
66+-
67+ CLEANFILES = $(BUILT_SOURCES)
68+Index: b/src/settings/plugins/ofono/nm-ofono.conf
69+===================================================================
70+--- a/src/settings/plugins/ofono/nm-ofono.conf
71++++ /dev/null
72+@@ -1,18 +0,0 @@
73+-<!DOCTYPE busconfig PUBLIC
74+- "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
75+- "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
76+-<busconfig>
77+- <policy user="root">
78+- <allow own="com.canonical.NMOfono"/>
79+- <allow send_destination="com.canonical.NMOfono"/>
80+- </policy>
81+- <policy at_console="true">
82+- <deny own="com.canonical.NMOfono"/>
83+- <allow send_destination="com.canonical.NMOfono"/>
84+- </policy>
85+- <policy context="default">
86+- <deny own="com.canonical.NMOfono"/>
87+- <allow send_destination="com.canonical.NMOfono"/>
88+- </policy>
89+-</busconfig>
90+-
91+Index: b/src/settings/plugins/ofono/nm-ofono.xml
92+===================================================================
93+--- a/src/settings/plugins/ofono/nm-ofono.xml
94++++ /dev/null
95+@@ -1,16 +0,0 @@
96+-<?xml version="1.0" encoding="UTF-8"?>
97+-<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
98+- <interface name="com.canonical.NMOfono">
99+- <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="nm_ofono"/>
100+- <method name="ReadImsiContexts">
101+- <tp:docstring>
102+- Read new context for a modem device.
103+- </tp:docstring>
104+- <arg name="imsi" type="s" direction="in">
105+- <tp:docstring>
106+- IMSI of the active modem for new context.
107+- </tp:docstring>
108+- </arg>
109+- </method>
110+- </interface>
111+-</node>
112+Index: b/src/settings/plugins/ofono/plugin.c
113+===================================================================
114+--- a/src/settings/plugins/ofono/plugin.c
115++++ b/src/settings/plugins/ofono/plugin.c
116+@@ -33,10 +33,6 @@
117+ #include <gio/gio.h>
118+ #include <nm-setting-connection.h>
119+
120+-#include <dbus/dbus.h>
121+-#include <dbus/dbus-glib.h>
122+-#include <dbus/dbus-glib-lowlevel.h>
123+-
124+ #include "NetworkManager.h"
125+ #include "nm-system-config-interface.h"
126+ #include "nm-setting-ip4-config.h"
127+@@ -63,11 +59,7 @@
128+
129+ #define OFONO_KEY_FILE_GROUP "settings"
130+
131+-#define DBUS_SERVICE_NAME "com.canonical.NMOfono"
132+-#define DBUS_OBJECT_PATH "/com/canonical/NMOfono"
133+-
134+ typedef struct {
135+- DBusGConnection *bus;
136+ GHashTable *connections; /* NMOfonoConnection */
137+
138+ GFileMonitor *ofono_dir_monitor;
139+@@ -82,8 +74,6 @@ static gboolean nm_ofono_read_imsi_conte
140+ const char *imsi,
141+ GError **error);
142+
143+-#include "nm-ofono-glue.h"
144+-
145+ static void
146+ system_config_interface_init (NMSystemConfigInterface *system_config_interface_class);
147+
148+@@ -664,9 +654,6 @@ sc_plugin_ofono_class_init (SCPluginOfon
149+ object_class->get_property = GObject__get_property;
150+ object_class->set_property = GObject__set_property;
151+
152+- dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (req_class),
153+- &dbus_glib_nm_ofono_object_info);
154+-
155+ g_object_class_override_property (object_class,
156+ NM_SYSTEM_CONFIG_INTERFACE_PROP_NAME,
157+ NM_SYSTEM_CONFIG_INTERFACE_NAME);
158+@@ -699,53 +686,6 @@ SCPluginOfono_init (NMSystemConfigInterf
159+ if (!priv->ofono_imsi_monitor_ids)
160+ priv->ofono_imsi_monitor_ids = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
161+
162+- /* DBus connection for the new context notifications from the ofono modem plugin */
163+- priv->bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
164+- if (!priv->bus) {
165+- nm_log_warn (LOGD_SETTINGS, "SCPlugin-Ofono: Couldn't connect to D-Bus: %s",
166+- error->message);
167+- g_clear_error (&error);
168+- } else {
169+- DBusConnection *tmp;
170+- DBusGProxy *proxy;
171+- int result;
172+-
173+- dbus_g_connection_register_g_object (priv->bus,
174+- DBUS_OBJECT_PATH,
175+- G_OBJECT (self));
176+-
177+- tmp = dbus_g_connection_get_connection (priv->bus);
178+- dbus_connection_set_exit_on_disconnect (tmp, FALSE);
179+-
180+- proxy = dbus_g_proxy_new_for_name (priv->bus,
181+- "org.freedesktop.DBus",
182+- "/org/freedesktop/DBus",
183+- "org.freedesktop.DBus");
184+-
185+- if (!dbus_g_proxy_call (proxy, "RequestName", &error,
186+- G_TYPE_STRING, DBUS_SERVICE_NAME,
187+- G_TYPE_UINT, DBUS_NAME_FLAG_DO_NOT_QUEUE,
188+- G_TYPE_INVALID,
189+- G_TYPE_UINT, &result,
190+- G_TYPE_INVALID)) {
191+- nm_log_warn (LOGD_SETTINGS, "SCPlugin-Ofono: Couldn't acquire D-Bus service: %s",
192+- error->message);
193+- g_clear_error (&error);
194+- } else if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
195+- nm_log_warn (LOGD_SETTINGS, "SCPlugin-Ofono: Couldn't acquire " DBUS_SERVICE_NAME " D-Bus service (already taken)");
196+- } else {
197+- nm_log_info (LOGD_SETTINGS, "SCPlugin-Ofono: Acquired D-Bus service %s", DBUS_SERVICE_NAME);
198+- success = TRUE;
199+- }
200+- }
201+-
202+- if (!success) {
203+- if (priv->bus) {
204+- dbus_g_connection_unref (priv->bus);
205+- priv->bus = NULL;
206+- }
207+- }
208+-
209+ if(!priv->connections)
210+ priv->connections = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
211+
212+@@ -826,11 +766,6 @@ dispose (GObject *object)
213+ SCPluginOfono *plugin = SC_PLUGIN_OFONO (object);
214+ SCPluginOfonoPrivate *priv = SC_PLUGIN_OFONO_GET_PRIVATE (plugin);
215+
216+- if (priv->bus) {
217+- dbus_g_connection_unref (priv->bus);
218+- priv->bus = NULL;
219+- }
220+-
221+ if (priv->ofono_dir_monitor) {
222+ if (priv->ofono_dir_monitor_id)
223+ g_signal_handler_disconnect (priv->ofono_dir_monitor,
224+Index: b/configure.ac
225+===================================================================
226+--- a/configure.ac
227++++ b/configure.ac
228+@@ -97,7 +97,7 @@ AC_ARG_ENABLE(ifcfg-rh, AS_HELP_STRING([
229+ AC_ARG_ENABLE(ifcfg-suse, AS_HELP_STRING([--enable-ifcfg-suse], [enable ifcfg-suse configuration plugin (SUSE)]))
230+ AC_ARG_ENABLE(ifupdown, AS_HELP_STRING([--enable-ifupdown], [enable ifupdown configuration plugin (Debian/Ubuntu)]))
231+ AC_ARG_ENABLE(ifnet, AS_HELP_STRING([--enable-ifnet], [enable ifnet configuration plugin (Gentoo)]))
232+-AC_ARG_ENABLE(ofono, AS_HELP_STRING([--enable-ofono], [enable ifnet configuration plugin (Gentoo)]))
233++AC_ARG_ENABLE(ofono, AS_HELP_STRING([--enable-ofono], [enable ofono configuration plugin (Ubuntu)]))
234+ # Default alternative plugins by distribution
235+ AS_IF([test -z "$enable_ifcfg_rh"], AC_CHECK_FILE(/etc/redhat-release, enable_ifcfg_rh=yes))
236+ AS_IF([test -z "$enable_ifcfg_rh"], AC_CHECK_FILE(/etc/fedora-release, enable_ifcfg_rh=yes))
237
238=== modified file 'debian/patches/series'
239--- debian/patches/series 2015-10-02 14:56:36 +0000
240+++ debian/patches/series 2015-10-02 14:56:36 +0000
241@@ -67,7 +67,6 @@
242
243 # killswitch
244 ignore_rfkill_if_urfkill_is_present.patch
245-CVE-2015-1322.patch
246 lp1435776_rm_ofono_secret_settings.patch
247 lp1461593-add-modem-reconnect-delay.patch
248
249@@ -76,3 +75,4 @@
250 lp1425172-fix-wifi-scanlist-cull.patch
251 lp1444162-add-ip6-config-to-nm-ofono-connections.patch
252 fix-ofono-plugin-leaks.patch
253+rm-scofono-plugin-dbus.patch

Subscribers

People subscribed via source and target branches

to all changes: