r36573 - in /desktop/unstable/gnome-shell/debian: changelog patches/28_network_user_connections.patch patches/series

joss at users.alioth.debian.org joss at users.alioth.debian.org
Mon Jan 14 15:27:17 UTC 2013


Author: joss
Date: Mon Jan 14 15:27:16 2013
New Revision: 36573

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=36573
Log:
* 28_network_user_connections.patch: new patch. 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.

Added:
    desktop/unstable/gnome-shell/debian/patches/28_network_user_connections.patch
Modified:
    desktop/unstable/gnome-shell/debian/changelog
    desktop/unstable/gnome-shell/debian/patches/series

Modified: desktop/unstable/gnome-shell/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-shell/debian/changelog?rev=36573&op=diff
==============================================================================
--- desktop/unstable/gnome-shell/debian/changelog [utf-8] (original)
+++ desktop/unstable/gnome-shell/debian/changelog [utf-8] Mon Jan 14 15:27:16 2013
@@ -1,3 +1,19 @@
+gnome-shell (3.4.2-6) UNRELEASED; urgency=low
+
+  * 28_network_user_connections.patch: new patch. 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.
+
+ -- Josselin Mouette <joss at debian.org>  Mon, 14 Jan 2013 16:22:43 +0100
+
 gnome-shell (3.4.2-5) unstable; urgency=low
 
   * 30_lockup_gc.patch: update patch. Instead of completely dropping 

Added: desktop/unstable/gnome-shell/debian/patches/28_network_user_connections.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-shell/debian/patches/28_network_user_connections.patch?rev=36573&op=file
==============================================================================
--- desktop/unstable/gnome-shell/debian/patches/28_network_user_connections.patch (added)
+++ desktop/unstable/gnome-shell/debian/patches/28_network_user_connections.patch [utf-8] Mon Jan 14 15:27:16 2013
@@ -1,0 +1,67 @@
+Index: gnome-shell-3.4.2/js/ui/status/network.js
+===================================================================
+--- gnome-shell-3.4.2.orig/js/ui/status/network.js	2012-07-20 19:38:25.000000000 +0200
++++ gnome-shell-3.4.2/js/ui/status/network.js	2013-01-14 16:16:07.806637098 +0100
+@@ -97,6 +97,11 @@ function ssidToLabel(ssid) {
+     return label;
+ }
+ 
++function default_to_private_connections(client) {
++    let perms = client.get_permission_result (NMClient.ClientPermission.SETTINGS_MODIFY_SYSTEM);
++    return (perms != NMClient.ClientPermissionResult.YES);
++}
++
+ const NMNetworkMenuItem = new Lang.Class({
+     Name: 'NMNetworkMenuItem',
+     Extends: PopupMenu.PopupBaseMenuItem,
+@@ -864,12 +869,14 @@ const NMDeviceBluetooth = new Lang.Class
+         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;
+     },
+ 
+@@ -950,6 +957,8 @@ const NMDeviceWireless = new Lang.Class(
+         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;
+@@ -1455,12 +1464,22 @@ const NMDeviceWireless = new Lang.Class(
+ 
+         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
++                }));
++            }
++        }
++        connection.add_setting(setting_conn);
+         return connection;
+     },
+ 

Modified: desktop/unstable/gnome-shell/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-shell/debian/patches/series?rev=36573&op=diff
==============================================================================
--- desktop/unstable/gnome-shell/debian/patches/series [utf-8] (original)
+++ desktop/unstable/gnome-shell/debian/patches/series [utf-8] Mon Jan 14 15:27:16 2013
@@ -9,6 +9,7 @@
 25-close-the-recorder-instead-of-pausing-it.patch
 26-networkAgent-use-absolute-path-if-configured.patch
 27-nm-libexec-path.patch
+28_network_user_connections.patch
 30_lockup_gc.patch
 32-enable-the-screen-reader-menu-item.patch
 33-screen-reader-l10n.patch




More information about the pkg-gnome-commits mailing list