[cinnamon] add network applet patch for nm-applet changes
leigh123linux
leigh123linux at fedoraproject.org
Wed Jul 2 11:14:45 UTC 2014
commit 31bd3b4aa88528782d02fbbdec75e706a5140c9e
Author: leigh123linux <leigh123linux at googlemail.com>
Date: Wed Jul 2 12:14:16 2014 +0100
add network applet patch for nm-applet changes
cinnamon.spec | 6 ++-
network-user-connections.patch | 85 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 90 insertions(+), 1 deletions(-)
---
diff --git a/cinnamon.spec b/cinnamon.spec
index 1096118..8f56b65 100644
--- a/cinnamon.spec
+++ b/cinnamon.spec
@@ -2,7 +2,7 @@
Name: cinnamon
Version: 2.2.14
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Window management and application launching for GNOME
License: GPLv2+ and LGPLv2+
URL: http://cinnamon.linuxmint.com
@@ -30,6 +30,7 @@ Patch5: remove_bluetootoh.patch
%endif
Patch6: set_wheel.patch
Patch7: 0001-Touchpad-Added-support-for-2-and-3-finger-clicks.patch
+Patch8: network-user-connections.patch
%global clutter_version 1.12.2
%global cjs_version 2.2.0
@@ -254,6 +255,9 @@ fi
%{_mandir}/man1/*
%changelog
+* Wed Jul 02 2014 Leigh Scott <leigh123linux at googlemail.com> - 2.2.14-2
+- add network applet patch for nm-applet changes
+
* Fri Jun 27 2014 Leigh Scott <leigh123linux at googlemail.com> - 2.2.14-1
- update to 2.2.14
- Touchpad support: Added support for two and three finger clicks
diff --git a/network-user-connections.patch b/network-user-connections.patch
new file mode 100644
index 0000000..44cd2b2
--- /dev/null
+++ b/network-user-connections.patch
@@ -0,0 +1,85 @@
+Description: Set new wireless connections as user-owned
+ Set connections and passwords as user-owned, following matching changes in
+ nm-applet and gnome-control-center. The logic is
+ - Wired connections: always system-owned.
+ - Modem (GSM/UMTS) connections are created by the control center.
+ - Bluetooth PAN connections are now always user-owned.
+ - Wireless connections are system-owned if the user has
+ permissions (in Debian this means group sudo or netdev). Otherwise,
+ it is user-owned, with the password in the keyring only for WPA.
+ - 802.1x (wired or wireless) is always handled by the control center.
+Author: Josselin Mouette <joss at debian.org>
+Origin: vendor
+Forwarded: no
+Last-Update: 2013-05-16
+---
+--- a/files/usr/share/cinnamon/applets/network at cinnamon.org/applet.js
++++ b/files/usr/share/cinnamon/applets/network at cinnamon.org/applet.js
+@@ -100,6 +100,11 @@
+ this._init.apply(this, arguments);
+ }
+
++function default_to_private_connections(client) {
++ let perms = client.get_permission_result (NMClient.ClientPermission.SETTINGS_MODIFY_SYSTEM);
++ return (perms != NMClient.ClientPermissionResult.YES);
++}
++
+ NMNetworkMenuItem.prototype = {
+ __proto__: PopupMenu.PopupBaseMenuItem.prototype,
+
+@@ -899,12 +904,14 @@
+ let connection = new NetworkManager.Connection;
+ connection._uuid = NetworkManager.utils_uuid_generate();
+ connection.add_setting(new NetworkManager.SettingBluetooth);
+- connection.add_setting(new NetworkManager.SettingConnection({
++ let setting_conn = new NetworkManager.SettingConnection({
+ uuid: connection._uuid,
+ id: this._autoConnectionName,
+ type: NetworkManager.SETTING_BLUETOOTH_SETTING_NAME,
+ autoconnect: false
+- }));
++ });
++ setting_conn.add_permission('user', GLib.get_user_name(), null);
++ connection.add_setting(setting_conn);
+ return connection;
+ },
+
+@@ -986,6 +993,8 @@
+ this._overflowItem = null;
+ this._networks = [ ];
+
++ this._client = client;
++
+ // breaking the layers with this, but cannot call
+ // this.connectionValid until I have a device
+ this.device = device;
+@@ -1520,12 +1529,27 @@
+
+ let connection = new NetworkManager.Connection();
+ connection.add_setting(new NetworkManager.SettingWireless());
+- connection.add_setting(new NetworkManager.SettingConnection({
++ let setting_conn = new NetworkManager.SettingConnection({
+ id: name,
+ autoconnect: true, // NetworkManager will know to ignore this if appropriate
+ uuid: NetworkManager.utils_uuid_generate(),
+ type: NetworkManager.SETTING_WIRELESS_SETTING_NAME
+- }));
++ });
++ if (default_to_private_connections(this._client)) {
++ setting_conn.add_permission('user', GLib.get_user_name(), null);
++ if (apObj.security == NMAccessPointSecurity.WPA2_PSK ||
++ apObj.security == NMAccessPointSecurity.WPA_PSK) {
++ connection.add_setting(new NetworkManager.SettingWirelessSecurity({
++ psk_flags: NetworkManager.SettingSecretFlags.AGENT_OWNED
++ }));
++ }
++ if (apObj.security == NMAccessPointSecurity.WEP) {
++ connection.add_setting(new NetworkManager.SettingWirelessSecurity({
++ wep_key_flags: NetworkManager.SettingSecretFlags.AGENT_OWNED
++ }));
++ }
++ }
++ connection.add_setting(setting_conn);
+ return connection;
+ },
+
More information about the scm-commits
mailing list