Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package gnome-shell for openSUSE:Factory 
checked in at 2023-04-08 17:38:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gnome-shell (Old)
 and      /work/SRC/openSUSE:Factory/.gnome-shell.new.19717 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gnome-shell"

Sat Apr  8 17:38:54 2023 rev:234 rq:1077757 version:44.0+42

Changes:
--------
--- /work/SRC/openSUSE:Factory/gnome-shell/gnome-shell.changes  2023-04-01 
23:27:22.751457007 +0200
+++ /work/SRC/openSUSE:Factory/.gnome-shell.new.19717/gnome-shell.changes       
2023-04-08 17:39:00.782028457 +0200
@@ -1,0 +2,5 @@
+Thu Apr  6 01:13:10 UTC 2023 - Xiaoguang Wang <xiaoguang.w...@suse.com>
+
+- Update gnome-shell-private-connection.patch: (bsc#1209373)
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gnome-shell.spec ++++++
--- /var/tmp/diff_new_pack.nu9HO9/_old  2023-04-08 17:39:01.934035070 +0200
+++ /var/tmp/diff_new_pack.nu9HO9/_new  2023-04-08 17:39:01.938035093 +0200
@@ -182,7 +182,7 @@
 
 %prep
 %setup -q
-#patch1 -p1
+%patch1 -p1
 %patch7 -p1
 #patch8 -p1
 

++++++ gnome-shell-private-connection.patch ++++++
--- /var/tmp/diff_new_pack.nu9HO9/_old  2023-04-08 17:39:02.030035622 +0200
+++ /var/tmp/diff_new_pack.nu9HO9/_new  2023-04-08 17:39:02.034035644 +0200
@@ -1,98 +1,25 @@
-From 342795440012a216d4abb9cfb04d2c3bd0fe8f4d Mon Sep 17 00:00:00 2001
-From: Giovanni Campagna <gcampa...@src.gnome.org>
-Date: Thu, 31 Mar 2011 15:56:13 +0200
-Subject: [PATCH] NetworkMenu: create private connections if the user is not 
authorized
-
-Check polkit setting at startup and add, if needed, the "permissions"
-setting to the connections we create, so that polkit authentication is
-never needed. The connection is thus only available to other users
-if the system administrator decides so.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=646187
----
-Index: gnome-shell-42.rc/js/ui/status/network.js
-===================================================================
---- gnome-shell-42.rc.orig/js/ui/status/network.js
-+++ gnome-shell-42.rc/js/ui/status/network.js
-@@ -350,6 +350,11 @@ var NMConnectionDevice = class NMConnect
- 
-     _autoConnect() {
-         let connection = new NM.SimpleConnection();
-+        if (this._privateConnections) {
-+            let connectionSetting = new NM.SettingConnection();
-+            connectionSetting.add_permission('user', GLib.get_user_name(), 
null);
-+            connection.add_setting(connectionSetting);
-+        }
-         this._client.add_and_activate_connection_async(connection, 
this._device, null, null, null);
-     }
- 
-@@ -478,10 +483,11 @@ var NMConnectionDevice = class NMConnect
- };
- 
- var NMDeviceWired = class extends NMConnectionDevice {
--    constructor(client, device) {
-+    constructor(client, device, privateConnections) {
-         super(client, device);
- 
-         this.item.menu.addSettingsAction(_("Wired Settings"), 
'gnome-network-panel.desktop');
-+        this._privateConnections = privateConnections;
-     }
- 
-     get category() {
-@@ -738,11 +744,12 @@ var NMWirelessDialogItem = GObject.regis
- 
- var NMWirelessDialog = GObject.registerClass(
- class NMWirelessDialog extends ModalDialog.ModalDialog {
--    _init(client, device) {
-+    _init(client, device, privateConnections) {
-         super._init({ styleClass: 'nm-dialog' });
- 
-         this._client = client;
-         this._device = device;
-+        this._privateConnections = privateConnections;
- 
-         this._client.connectObject('notify::wireless-enabled',
-             this._syncView.bind(this), this);
-@@ -978,6 +985,11 @@ class NMWirelessDialog extends ModalDial
-                     this._getDeviceDBusPath(), accessPoints[0].get_path());
-             } else {
-                 let connection = new NM.SimpleConnection();
-+                if (this._privateConnections) {
-+                    let connectionSetting = new NM.SettingConnection();
-+                    connectionSetting.add_permission('user', 
GLib.get_user_name(), null);
-+                    connection.add_setting(connectionSetting);
-+                }
-                 this._client.add_and_activate_connection_async(connection, 
this._device, accessPoints[0].get_path(), null, null);
-             }
+diff --git a/js/ui/status/network.js b/js/ui/status/network.js
+index e3b9a5d..3296e1d 100644
+--- a/js/ui/status/network.js
++++ b/js/ui/status/network.js
+@@ -940,6 +940,11 @@ const WirelessNetwork = GObject.registerClass({
+                 this._getDeviceDBusPath(), ap.get_path());
+         } else {
+             conn = new NM.SimpleConnection();
++            if (this._IsPrivateConnections()) {
++                let connectionSetting = new NM.SettingConnection();
++                connectionSetting.add_permission('user', 
GLib.get_user_name(), null);
++                conn.add_setting(connectionSetting);
++            }
+             this._device.client.add_and_activate_connection_async(
+                 conn, this._device, ap.get_path(), null, null);
          }
-@@ -1243,9 +1255,10 @@ class NMWirelessDialog extends ModalDial
- });
- 
- var NMDeviceWireless = class {
--    constructor(client, device) {
-+    constructor(client, device, privateConnections) {
-         this._client = client;
-         this._device = device;
-+        this._privateConnections = privateConnections;
- 
-         this._description = '';
- 
-@@ -1313,7 +1326,7 @@ var NMDeviceWireless = class {
-     }
- 
-     _showDialog() {
--        this._dialog = new NMWirelessDialog(this._client, this._device);
-+        this._dialog = new NMWirelessDialog(this._client, this._device, 
this._privateConnections);
-         this._dialog.connect('closed', this._dialogClosed.bind(this));
-         this._dialog.open();
+@@ -949,6 +954,22 @@ const WirelessNetwork = GObject.registerClass({
+         this.emit('destroy');
      }
-@@ -1683,6 +1696,20 @@ class Indicator extends PanelMenu.System
-     async _getClient() {
-         this._client = await NM.Client.new_async(null);
  
-+
-+        // Check if newly created connections should be private or not
-+        this._privateConnections = true;
++    _IsPrivateConnections() {
++        let privateConnections = true;
 +        let authority = Polkit.Authority.get_sync(null);
 +        let credential = new Gio.Credentials();
 +        let subject = new Polkit.UnixProcess({ pid: 
credential.get_unix_pid(), uid: credential.get_unix_user() });
@@ -102,18 +29,12 @@
 +                                                            
Polkit.CheckAuthorizationFlags.NONE,
 +                                                            null /* 
cancellable */);
 +        if (authResult)
-+            this._privateConnections = !authResult.get_is_authorized();
++            privateConnections = !authResult.get_is_authorized();
 +
-         this._activeConnections = [];
-         this._connections = [];
-         this._connectivityQueue = [];
-@@ -1812,7 +1839,7 @@ class Indicator extends PanelMenu.System
- 
-         let wrapperClass = this._dtypes[device.get_device_type()];
-         if (wrapperClass) {
--            let wrapper = new wrapperClass(this._client, device);
-+            let wrapper = new wrapperClass(this._client, device, 
this._privateConnections);
-             device._delegate = wrapper;
-             this._addDeviceWrapper(wrapper);
- 
++        return privateConnections;
++    }
++
+     _getDeviceDBusPath() {
+         // nm_object_get_path() is shadowed by nm_device_get_path()
+         return NM.Object.prototype.get_path.call(this._device);
 

Reply via email to