Hello community,
here is the log from the commit of package cinnamon for openSUSE:Factory checked in at 2018-07-03 23:34:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cinnamon (Old)
and /work/SRC/openSUSE:Factory/.cinnamon.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cinnamon"
Tue Jul 3 23:34:11 2018 rev:30 rq:620274 version:3.8.6
Changes:
--------
--- /work/SRC/openSUSE:Factory/cinnamon/cinnamon.changes 2018-06-25 11:42:56.540283078 +0200
+++ /work/SRC/openSUSE:Factory/.cinnamon.new/cinnamon.changes 2018-07-03 23:34:13.420419755 +0200
@@ -1,0 +2,11 @@
+Mon Jul 2 13:55:49 UTC 2018 - sor.alexei@meowr.ru
+
+- Add cinnamon-settings-fix-symlink-vuln.patch by Matthias Gerstner
+ to fix a symlink attack vulnerability (VE-2018-13054,
+ bsc#1083067, https://github.com/linuxmint/Cinnamon/pull/7683).
+- Replace cinnamon-no-polkit-policy.patch with
+ cinnamon-3.8.6-drop-global-gschema.patch: Remove support for
+ installing/removing system-wide gschemas (commit 34043b7).
+- Slightly improve cinnamon-use-libnm.patch.
+
+-------------------------------------------------------------------
Old:
----
cinnamon-no-polkit-policy.patch
New:
----
cinnamon-3.8.6-drop-global-gschema.patch
cinnamon-settings-fix-symlink-vuln.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cinnamon.spec ++++++
--- /var/tmp/diff_new_pack.Bbp9Qx/_old 2018-07-03 23:34:14.244418574 +0200
+++ /var/tmp/diff_new_pack.Bbp9Qx/_new 2018-07-03 23:34:14.244418574 +0200
@@ -46,10 +46,12 @@
Patch6: %{name}-fix-cogl.patch
# PATCH-FEATURE-OPENSUSE cinnamon-fallback-icewm.patch sor.alexei@meowr.ru -- Use IceWM as fallback.
Patch7: %{name}-fallback-icewm.patch
+# PATCH-FIX-UPSTREAM cinnamon-settings-fix-symlink-vuln.patch CVE-2018-13054 bsc#1083067 matthias.gerstner@suse.com -- Fix symlink attack vulnerability (https://github.com/linuxmint/Cinnamon/pull/7683).
+Patch8: %{name}-settings-fix-symlink-vuln.patch
# PATCH-FIX-OPENSUSE cinnamon-use-libnm.patch sor.alexei@meowr.ru -- Use libnm, libnma instead of libnm-glib, libnm-gtk.
-Patch8: %{name}-use-libnm.patch
-# PATCH-FIX-OPENSUSE cinnamon-no-polkit-policy.patch boo#1091701 -- Use xdg-su instead of a polkit policy due to bsc#1090963 being unresolved.
-Patch9: %{name}-no-polkit-policy.patch
+Patch9: %{name}-use-libnm.patch
+# PATCH-FIX-UPSTREAM cinnamon-3.8.6-drop-global-gschema.patch boo#1091701 -- Remove support for installing/removing system-wide gschemas (commit 34043b7).
+Patch10: %{name}-3.8.6-drop-global-gschema.patch
BuildRequires: autoconf
BuildRequires: autoconf-archive
BuildRequires: automake
@@ -73,7 +75,6 @@
BuildRequires: pkgconfig(libcinnamon-menu-3.0)
BuildRequires: pkgconfig(libcroco-0.6)
BuildRequires: pkgconfig(libmuffin) >= %{_version}
-BuildRequires: pkgconfig(libnm)
BuildRequires: pkgconfig(libsoup-2.4)
BuildRequires: pkgconfig(libstartup-notification-1.0)
BuildRequires: pkgconfig(polkit-agent-1)
@@ -85,8 +86,6 @@
Requires: cinnamon-settings-daemon >= %{_version}
Requires: cjs >= %{_version}
Requires: cups-pk-helper
-Requires: dbus-1-python
-Requires: dbus-1-python3
Requires: gettext-runtime
Requires: glib2-tools
Requires: iso-country-flags-png
@@ -130,9 +129,13 @@
Provides: typelib-1_0-Cinnamon-0_1 = %{version}
Obsoletes: typelib-1_0-Cinnamon-0_1 < %{version}
%if 0%{?suse_version} >= 1500
+BuildRequires: pkgconfig(libnm)
Requires: NetworkManager-applet
+Requires: python3-dbus-python
%else
+BuildRequires: pkgconfig(libnm-glib)
Requires: NetworkManager-gnome
+Requires: dbus-1-python3
%endif
%description
@@ -182,10 +185,11 @@
%patch5 -p1
%patch6 -p1
%patch7 -p1
-%if 0%{?suse_version} >= 1500
%patch8 -p1
-%endif
+%if 0%{?suse_version} >= 1500
%patch9 -p1
+%endif
+%patch10 -p1
cp -a %{SOURCE1} .
%build
++++++ cinnamon-3.8.6-drop-global-gschema.patch ++++++
--- a/files/usr/bin/cinnamon-schema-install
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/python3
-
-import os
-import sys
-
-os.system("cp %s /usr/share/glib-2.0/schemas/" % (sys.argv[1]))
-os.system("glib-compile-schemas /usr/share/glib-2.0/schemas/")
--- a/files/usr/bin/cinnamon-schema-remove
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/python3
-
-import os
-import sys
-
-os.system("rm /usr/share/glib-2.0/schemas/%s" % (sys.argv[1]))
-os.system("glib-compile-schemas /usr/share/glib-2.0/schemas/")
--- a/files/usr/share/cinnamon/cinnamon-settings/bin/Spices.py
+++ b/files/usr/share/cinnamon/cinnamon-settings/bin/Spices.py
@@ -643,12 +643,6 @@ def install_from_folder(self, folder, uuid, from_spices=False):
os.makedirs(locale_dir, mode=0o755, exist_ok=True)
subprocess.call(['msgfmt', '-c', os.path.join(po_dir, file), '-o', os.path.join(locale_dir, '%s.mo' % uuid)])
- # Install spice schema file, if any
- schema = [filename for filename in contents if 'gschema.xml' in filename]
- for filename in schema:
- path = os.path.join(folder, filename)
- subprocess.call(['pkexec', 'cinnamon-schema-install', path])
-
dest = os.path.join(self.install_folder, uuid)
if os.path.exists(dest):
shutil.rmtree(dest)
@@ -663,8 +657,6 @@ def install_from_folder(self, folder, uuid, from_spices=False):
file.close()
md = json.loads(raw_meta)
- if not self.themes and len(schema) > 0:
- md['schema-file'] = ','.join(schema)
if from_spices and uuid in self.index_cache:
md['last-edited'] = self.index_cache[uuid]['last_edited']
else:
@@ -690,11 +682,6 @@ def _uninstall(self, job):
try:
uuid = job['uuid']
if not self.themes:
- # Uninstall spice schema files, if any
- if 'schema-file' in self.meta_map[uuid]:
- for path in self.meta_map[uuid]['schema-file'].split(','):
- subprocess.call(['pkexec', 'cinnamon-schema-remove', path])
-
# Uninstall spice localization files, if any
if (os.path.exists(locale_inst)):
i19_folders = os.listdir(locale_inst)
--- a/files/usr/share/polkit-1/actions/org.cinnamon.schema-install.policy
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE policyconfig PUBLIC
- "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
- "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
-<policyconfig>
-
- <vendor>Cinnamon</vendor>
- https://github.com/linuxmint/cinnamon
-
- <action id="org.cinnamon.schema-install">
- system-run
- <defaults>
- no
- no
- auth_admin_keep
- </defaults>
- <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/cinnamon-schema-install</annotate>
- </action>
-
-</policyconfig>
--- a/files/usr/share/polkit-1/actions/org.cinnamon.schema-remove.policy
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE policyconfig PUBLIC
- "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
- "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
-<policyconfig>
-
- <vendor>Cinnamon</vendor>
- https://github.com/linuxmint/cinnamon
-
- <action id="org.cinnamon.schema-remove">
- system-run
- <defaults>
- no
- no
- auth_admin_keep
- </defaults>
- <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/cinnamon-schema-remove</annotate>
- </action>
-
-</policyconfig>
++++++ cinnamon-settings-fix-symlink-vuln.patch ++++++
--- a/files/usr/share/cinnamon/cinnamon-settings-users/cinnamon-settings-users.py
+++ b/files/usr/share/cinnamon/cinnamon-settings-users/cinnamon-settings-users.py
@@ -19,6 +19,35 @@ from gi.repository import Gtk, GObject,
gettext.install("cinnamon", "/usr/share/locale")
+class PrivHelper(object):
+ """A helper for performing temporary privilege drops. Necessary for
+ security when accessing user controlled files as root."""
+
+ def __init__(self):
+
+ self.orig_uid = os.getuid()
+ self.orig_gid = os.getgid()
+ self.orig_groups = os.getgroups()
+
+ def drop_privs(self, user):
+
+ uid = user.get_uid()
+ # the user's main group id
+ gid = pwd.getpwuid(uid).pw_gid
+
+ # initialize the user's supplemental groups and main group
+ os.initgroups(user.get_user_name(), gid)
+ os.setegid(gid)
+ os.seteuid(uid)
+
+ def restore_privs(self):
+
+ os.seteuid(self.orig_uid)
+ os.setegid(self.orig_gid)
+ os.setgroups(self.orig_groups)
+
+priv_helper = PrivHelper()
+
(INDEX_USER_OBJECT, INDEX_USER_PICTURE, INDEX_USER_DESCRIPTION) = range(3)
(INDEX_GID, INDEX_GROUPNAME) = range(2)
@@ -634,7 +663,11 @@ class Module:
image = PIL.Image.open(path)
image.thumbnail((96, 96), Image.ANTIALIAS)
face_path = os.path.join(user.get_home_dir(), ".face")
- image.save(face_path, "png")
+ try:
+ priv_helper.drop_privs(user)
+ image.save(face_path, "png")
+ finally:
+ priv_helper.restore_privs()
user.set_icon_file(face_path)
self.face_image.set_from_file(face_path)
model.set_value(treeiter, INDEX_USER_PICTURE, GdkPixbuf.Pixbuf.new_from_file_at_size(face_path, 48, 48))
@@ -667,7 +700,11 @@ class Module:
user = model[treeiter][INDEX_USER_OBJECT]
user.set_icon_file(path)
self.face_image.set_from_file(path)
- shutil.copy(path, os.path.join(user.get_home_dir(), ".face"))
+ try:
+ priv_helper.drop_privs(user)
+ shutil.copy(path, os.path.join(user.get_home_dir(), ".face"))
+ finally:
+ priv_helper.restore_privs()
model.set_value(treeiter, INDEX_USER_PICTURE, GdkPixbuf.Pixbuf.new_from_file_at_size(path, 48, 48))
model.row_changed(model.get_path(treeiter), treeiter)
++++++ cinnamon-use-libnm.patch ++++++
--- /var/tmp/diff_new_pack.Bbp9Qx/_old 2018-07-03 23:34:14.320418465 +0200
+++ /var/tmp/diff_new_pack.Bbp9Qx/_new 2018-07-03 23:34:14.320418465 +0200
@@ -1,11 +1,19 @@
--- a/configure.ac
+++ b/configure.ac
-@@ -77,7 +77,7 @@ PKG_CHECK_MODULES(CINNAMON, gio-2.0 >= $
+@@ -64,6 +64,7 @@ GTK_MIN_VERSION=3.12.0
+ GIO_MIN_VERSION=2.35.0
+ POLKIT_MIN_VERSION=0.100
+ STARTUP_NOTIFICATION_MIN_VERSION=0.11
++NM_MIN_VERSION=1.6
+
+ # Collect more than 20 libraries for a prize!
+ PKG_CHECK_MODULES(CINNAMON, gio-2.0 >= $GIO_MIN_VERSION
+@@ -77,7 +78,7 @@ PKG_CHECK_MODULES(CINNAMON, gio-2.0 >= $
libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_MIN_VERSION
gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_MIN_VERSION
polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes
- libnm-glib libnm-util atk-bridge-2.0)
-+ libnm atk-bridge-2.0)
++ libnm >= $NM_MIN_VERSION atk-bridge-2.0)
PKG_CHECK_MODULES(CINNAMON_PERF_HELPER, gtk+-3.0 gio-2.0)
@@ -21,7 +29,7 @@
const Signals = imports.signals;
const St = imports.gi.St;
const Mainloop = imports.mainloop;
-@@ -35,9 +34,9 @@ const NMAccessPointSecurity = {
+@@ -35,26 +34,14 @@ const NMAccessPointSecurity = {
};
// small optimization, to avoid using [] all the time
@@ -34,7 +42,24 @@
// number of wireless networks that should be visible
// (the remaining are placed into More...)
-@@ -76,7 +75,7 @@ function sortAccessPoints(accessPoints)
+ const NUM_VISIBLE_NETWORKS = 5;
+
+-function ssidCompare(one, two) {
+- if (!one || !two)
+- return false;
+- if (one.length != two.length)
+- return false;
+- for (let i = 0; i < one.length; i++) {
+- if (one[i] != two[i])
+- return false;
+- }
+- return true;
+-}
+-
+ // shared between NMNetworkMenuItem and NMDeviceWWAN
+ function signalToIcon(value) {
+ if (value > 80)
+@@ -76,7 +63,7 @@ function sortAccessPoints(accessPoints)
}
function ssidToLabel(ssid) {
@@ -43,7 +68,7 @@
if (!label)
label = _("<unknown>");
return label;
-@@ -87,8 +86,8 @@ function NMNetworkMenuItem() {
+@@ -87,8 +74,8 @@ function NMNetworkMenuItem() {
}
function default_to_private_connections(client) {
@@ -54,7 +79,7 @@
}
NMNetworkMenuItem.prototype = {
-@@ -101,7 +100,7 @@ NMNetworkMenuItem.prototype = {
+@@ -101,7 +88,7 @@ NMNetworkMenuItem.prototype = {
this.bestAP = accessPoints[0];
if (!title) {
@@ -63,7 +88,16 @@
title = ssidToLabel(ssid);
}
-@@ -391,7 +390,7 @@ NMDevice.prototype = {
+@@ -221,7 +208,7 @@ NMWiredSectionTitleMenuItem.prototype =
+
+ // Immediately reset the switch to false, it will be updated appropriately
+ // by state-changed signals in devices (but fixes the VPN not being in sync
+- // if the ActiveConnection object is never seen by libnm-glib)
++ // if the ActiveConnection object is never seen by libnm)
+ this._switch.setToggleState(false);
+
+ if (newState)
+@@ -391,7 +378,7 @@ NMDevice.prototype = {
},
deactivate: function() {
@@ -72,7 +106,7 @@
},
activate: function() {
-@@ -402,16 +401,17 @@ NMDevice.prototype = {
+@@ -402,16 +389,17 @@ NMDevice.prototype = {
// pick the most recently used connection and connect to that
// or if no connections ever set, create an automatic one
if (this._connections.length > 0) {
@@ -94,7 +128,7 @@
},
setActiveConnection: function(activeConnection) {
-@@ -498,25 +498,25 @@ NMDevice.prototype = {
+@@ -498,25 +486,25 @@ NMDevice.prototype = {
get statusLabel(){
switch(this.device.state) {
@@ -131,7 +165,7 @@
// This state is actually a compound of various states (generically unavailable,
// firmware missing, carrier not available), that are exposed by different properties
// (whose state may or may not updated when we receive state-changed).
-@@ -527,7 +527,7 @@ NMDevice.prototype = {
+@@ -527,7 +515,7 @@ NMDevice.prototype = {
module, which is missing */
return _("firmware missing");
}
@@ -140,7 +174,7 @@
if (!this._carrierChangedId)
this._carrierChangedId = this.device.connect('notify::carrier', Lang.bind(this, this._substateChanged));
if (!this.carrier) {
-@@ -538,7 +538,7 @@ NMDevice.prototype = {
+@@ -538,7 +526,7 @@ NMDevice.prototype = {
/* Translators: this is for a network device that cannot be activated (for example it
is disabled by rfkill, or it has no coverage */
return _("unavailable");
@@ -149,7 +183,7 @@
return _("connection failed");
default:
log('Device state invalid, is %d'.format(this.device.state));
-@@ -548,7 +548,7 @@ NMDevice.prototype = {
+@@ -548,7 +536,7 @@ NMDevice.prototype = {
get controllable(){
// controllable for every state except unavailable or unmanaged
@@ -158,7 +192,7 @@
return false;
return true;
-@@ -580,7 +580,7 @@ NMDevice.prototype = {
+@@ -580,7 +568,7 @@ NMDevice.prototype = {
},
_shouldShowConnectionList: function() {
@@ -167,7 +201,7 @@
},
_createSection: function() {
-@@ -615,7 +615,7 @@ NMDevice.prototype = {
+@@ -615,7 +603,7 @@ NMDevice.prototype = {
this._autoConnectionItem.connect('activate', Lang.bind(this, function() {
let connection = this._createAutomaticConnection();
if (connection)
@@ -176,7 +210,7 @@
}));
this.section.addMenuItem(this._autoConnectionItem);
}
-@@ -626,7 +626,7 @@ NMDevice.prototype = {
+@@ -626,7 +614,7 @@ NMDevice.prototype = {
let item = new PopupMenu.PopupMenuItem(obj.name);
item.connect('activate', Lang.bind(this, function() {
@@ -185,7 +219,7 @@
}));
return item;
},
-@@ -651,11 +651,11 @@ NMDevice.prototype = {
+@@ -651,11 +639,11 @@ NMDevice.prototype = {
return;
}
@@ -199,7 +233,7 @@
this.emit('activation-failed', reason);
}
-@@ -699,10 +699,10 @@ NMDevice.prototype = {
+@@ -699,10 +687,10 @@ NMDevice.prototype = {
}
else {
switch (this.device.get_device_type()) {
@@ -214,7 +248,7 @@
default: return "";
}
}
-@@ -753,13 +753,13 @@ NMDeviceWired.prototype = {
+@@ -753,13 +741,13 @@ NMDeviceWired.prototype = {
},
_createAutomaticConnection: function() {
@@ -233,7 +267,7 @@
autoconnect: true
}));
return connection;
-@@ -786,26 +786,26 @@ NMDeviceModem.prototype = {
+@@ -786,26 +774,26 @@ NMDeviceModem.prototype = {
try {
is_wwan = true;
this.mobileDevice = new ModemManager.BroadbandModem(device.udi, device.current_capabilities);
@@ -271,7 +305,7 @@
is_wwan = true;
// FIXME: support signal quality
}
-@@ -853,7 +853,7 @@ NMDeviceModem.prototype = {
+@@ -853,7 +841,7 @@ NMDeviceModem.prototype = {
},
get connected() {
@@ -280,7 +314,7 @@
},
destroy: function() {
-@@ -922,13 +922,13 @@ NMDeviceBluetooth.prototype = {
+@@ -922,13 +910,13 @@ NMDeviceBluetooth.prototype = {
},
_createAutomaticConnection: function() {
@@ -299,7 +333,7 @@
autoconnect: false
});
setting_conn.add_permission('user', GLib.get_user_name(), null);
-@@ -970,7 +970,7 @@ NMDeviceVPN.prototype = {
+@@ -970,7 +958,7 @@ NMDeviceVPN.prototype = {
},
connectionValid: function(connection) {
@@ -308,7 +342,7 @@
},
get empty() {
-@@ -993,7 +993,7 @@ NMDeviceVPN.prototype = {
+@@ -993,7 +981,7 @@ NMDeviceVPN.prototype = {
deactivate: function() {
if (this._activeConnection)
@@ -317,7 +351,7 @@
},
statusLabel: null,
-@@ -1042,7 +1042,7 @@ NMDeviceWireless.prototype = {
+@@ -1042,7 +1030,7 @@ NMDeviceWireless.prototype = {
obj = this._networks[pos];
obj.accessPoints.push(ap);
} else {
@@ -326,7 +360,7 @@
mode: ap.mode,
security: this._getApSecurityType(ap),
connections: [ ],
-@@ -1137,7 +1137,7 @@ NMDeviceWireless.prototype = {
+@@ -1137,7 +1125,7 @@ NMDeviceWireless.prototype = {
for (let i = 0; i < bestApObj.accessPoints.length; i++) {
let ap = bestApObj.accessPoints[i];
if (ap.connection_valid(best)) {
@@ -335,7 +369,7 @@
break;
}
}
-@@ -1151,7 +1151,7 @@ NMDeviceWireless.prototype = {
+@@ -1151,7 +1139,7 @@ NMDeviceWireless.prototype = {
if (this._networks.length > 0) {
let connection = this._createAutomaticConnection(this._networks[0]);
let accessPoints = sortAccessPoints(this._networks[0].accessPoints);
@@ -344,16 +378,16 @@
}
},
-@@ -1238,7 +1238,7 @@ NMDeviceWireless.prototype = {
+@@ -1238,7 +1226,7 @@ NMDeviceWireless.prototype = {
},
_networkCompare: function(network, accessPoint) {
- if (!ssidCompare(network.ssid, accessPoint.get_ssid()))
-+ if (!ssidCompare(network.ssid, accessPoint.get_ssid().get_data()))
++ if (!network.ssid.equal(accessPoint.get_ssid()))
return false;
if (network.mode != accessPoint.mode)
return false;
-@@ -1294,7 +1294,7 @@ NMDeviceWireless.prototype = {
+@@ -1294,7 +1282,7 @@ NMDeviceWireless.prototype = {
if (apObj.item)
apObj.item.updateAccessPoints(apObj.accessPoints);
} else {
@@ -362,7 +396,7 @@
mode: accessPoint.mode,
security: this._getApSecurityType(accessPoint),
connections: [ ],
-@@ -1405,7 +1405,7 @@ NMDeviceWireless.prototype = {
+@@ -1405,7 +1393,7 @@ NMDeviceWireless.prototype = {
let accessPoints = sortAccessPoints(accessPointObj.accessPoints);
for (let i = 0; i < accessPoints.length; i++) {
if (accessPoints[i].connection_valid(connection)) {
@@ -371,12 +405,12 @@
break;
}
}
-@@ -1545,32 +1545,32 @@ NMDeviceWireless.prototype = {
+@@ -1545,32 +1533,32 @@ NMDeviceWireless.prototype = {
_createAutomaticConnection: function(apObj) {
let name;
- let ssid = NetworkManager.utils_ssid_to_utf8(apObj.ssid);
-+ let ssid = NM.utils_ssid_to_utf8(apObj.ssid);
++ let ssid = NM.utils_ssid_to_utf8(apObj.ssid.get_data());
if (ssid) {
/* TRANSLATORS: this the automatic wireless connection name (including the network name) */
name = _("Auto %s").format(ssid);
@@ -414,7 +448,7 @@
}));
}
}
-@@ -1602,10 +1602,10 @@ NMDeviceWireless.prototype = {
+@@ -1602,10 +1590,10 @@ NMDeviceWireless.prototype = {
// 802.1x-enabled APs require further configuration, so they're
// handled in cinnamon-settings
Util.spawn(['cinnamon-settings', 'network', 'connect-8021x-wifi',
@@ -427,16 +461,25 @@
}
}));
}
-@@ -1708,7 +1708,7 @@ CinnamonNetworkApplet.prototype = {
+@@ -1708,7 +1696,16 @@ CinnamonNetworkApplet.prototype = {
this._currentIconName = undefined;
this._setIcon('network-offline');
- this._client = NMClient.Client.new();
-+ this._client = NM.Client.new(null);
++ NM.Client.new_async(null, Lang.bind(this, this._clientGot));
++ }
++ catch (e) {
++ global.logError(e);
++ }
++ },
++
++ _clientGot: function(obj, result) {
++ try {
++ this._client = NM.Client.new_finish(result);
this._statusSection = new PopupMenu.PopupMenuSection();
this._statusItem = new PopupMenu.PopupMenuItem('', { style_class: 'popup-inactive-menu-item', reactive: false });
-@@ -1773,8 +1773,8 @@ CinnamonNetworkApplet.prototype = {
+@@ -1773,8 +1770,8 @@ CinnamonNetworkApplet.prototype = {
this.rescan_item.connect("activate", Lang.bind(this, function() {
let devices = this._devices.wireless.devices;
@@ -447,7 +490,7 @@
}
}));
-@@ -1797,42 +1797,35 @@ CinnamonNetworkApplet.prototype = {
+@@ -1797,42 +1794,35 @@ CinnamonNetworkApplet.prototype = {
// Device types
this._dtypes = { };
@@ -515,7 +558,7 @@
this._periodicUpdateIcon();
-@@ -1914,8 +1907,8 @@ CinnamonNetworkApplet.prototype = {
+@@ -1914,8 +1904,8 @@ CinnamonNetworkApplet.prototype = {
_readDevices: function() {
let devices = this._client.get_devices() || [ ];
@@ -526,7 +569,16 @@
}
},
-@@ -2034,7 +2027,7 @@ CinnamonNetworkApplet.prototype = {
+@@ -1975,7 +1965,7 @@ CinnamonNetworkApplet.prototype = {
+
+ this._syncSectionTitle(wrapper.category);
+ } else
+- log('Invalid network device type, is ' + device.get_device_type());
++ log('Unknown network device type, is ' + device.get_device_type());
+ },
+
+ _deviceRemoved: function(client, device) {
+@@ -2034,7 +2024,7 @@ CinnamonNetworkApplet.prototype = {
}
if (!a._connection) {
@@ -535,7 +587,7 @@
if (a._connection) {
a._type = a._connection._type;
-@@ -2060,7 +2053,7 @@ CinnamonNetworkApplet.prototype = {
+@@ -2060,7 +2050,7 @@ CinnamonNetworkApplet.prototype = {
continue;
}
@@ -544,7 +596,7 @@
if (!default_ip4) {
// We didn't find the default IPV4 device yet..
if (!default_ip6) {
-@@ -2075,7 +2068,7 @@ CinnamonNetworkApplet.prototype = {
+@@ -2075,7 +2065,7 @@ CinnamonNetworkApplet.prototype = {
}
}
}
@@ -553,7 +605,7 @@
activating = a;
}
-@@ -2087,7 +2080,7 @@ CinnamonNetworkApplet.prototype = {
+@@ -2087,7 +2077,7 @@ CinnamonNetworkApplet.prototype = {
}
if (!a._primaryDevice) {
@@ -562,7 +614,7 @@
// find a good device to be considered primary
a._primaryDevice = null;
let devices = a.get_devices() || [ ];
-@@ -2104,7 +2097,7 @@ CinnamonNetworkApplet.prototype = {
+@@ -2104,7 +2094,7 @@ CinnamonNetworkApplet.prototype = {
if (a._primaryDevice)
a._primaryDevice.setActiveConnection(a);
@@ -571,7 +623,7 @@
a._primaryDevice && a._primaryDevice._notification) {
a._primaryDevice._notification.destroy();
a._primaryDevice._notification = null;
-@@ -2116,7 +2109,7 @@ CinnamonNetworkApplet.prototype = {
+@@ -2116,7 +2106,7 @@ CinnamonNetworkApplet.prototype = {
},
_notifyActivated: function(activeConnection) {
@@ -580,7 +632,7 @@
activeConnection._primaryDevice && activeConnection._primaryDevice._notification) {
activeConnection._primaryDevice._notification.destroy();
activeConnection._primaryDevice._notification = null;
-@@ -2126,37 +2119,33 @@ CinnamonNetworkApplet.prototype = {
+@@ -2126,37 +2116,33 @@ CinnamonNetworkApplet.prototype = {
},
_readConnections: function() {
@@ -626,7 +678,7 @@
let pos = this._connections.indexOf(connection);
if (pos != -1)
this._connections.splice(pos);
-@@ -2169,35 +2158,35 @@ CinnamonNetworkApplet.prototype = {
+@@ -2169,35 +2155,35 @@ CinnamonNetworkApplet.prototype = {
this._devices.vpn.section.actor.hide();
} else if (section != NMConnectionCategory.INVALID) {
let devices = this._devices[section].devices;
@@ -676,7 +728,7 @@
}
}
},
-@@ -2225,7 +2214,7 @@ CinnamonNetworkApplet.prototype = {
+@@ -2225,7 +2211,7 @@ CinnamonNetworkApplet.prototype = {
},
_syncNMState: function() {
@@ -685,7 +737,7 @@
log('NetworkManager is not running, hiding...');
this.menu.close();
this.actor.hide();
-@@ -2255,7 +2244,7 @@ CinnamonNetworkApplet.prototype = {
+@@ -2255,7 +2241,7 @@ CinnamonNetworkApplet.prototype = {
if (!mc) {
this._setIcon('network-offline');
this.set_applet_tooltip(_("No connection"));
@@ -694,7 +746,7 @@
new_delay = FAST_PERIODIC_UPDATE_FREQUENCY_SECONDS;
switch (mc._section) {
case NMConnectionCategory.WWAN:
-@@ -2297,7 +2286,7 @@ CinnamonNetworkApplet.prototype = {
+@@ -2297,7 +2283,7 @@ CinnamonNetworkApplet.prototype = {
this.set_applet_tooltip(_("Connected to the wireless network"));
} else {
this._setIcon('network-wireless-signal-' + signalToIcon(ap.strength));
@@ -725,7 +777,7 @@
log(e.message);
--- a/src/Makefile.am
+++ b/src/Makefile.am
-@@ -222,7 +222,7 @@ libcinnamon_la_LIBADD = \
+@@ -223,7 +223,7 @@ libcinnamon_la_LIBADD = \
libcinnamon_la_CPPFLAGS = $(cinnamon_cflags)
Cinnamon-0.1.gir: libcinnamon.la St-1.0.gir