Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package deepin-polkit-agent for 
openSUSE:Factory checked in at 2022-02-10 23:12:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/deepin-polkit-agent (Old)
 and      /work/SRC/openSUSE:Factory/.deepin-polkit-agent.new.1956 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "deepin-polkit-agent"

Thu Feb 10 23:12:05 2022 rev:3 rq:952942 version:5.4.14

Changes:
--------
--- /work/SRC/openSUSE:Factory/deepin-polkit-agent/deepin-polkit-agent.changes  
2022-01-31 22:57:06.961664750 +0100
+++ 
/work/SRC/openSUSE:Factory/.deepin-polkit-agent.new.1956/deepin-polkit-agent.changes
        2022-02-10 23:12:42.556304526 +0100
@@ -1,0 +2,5 @@
+Wed Feb  9 12:08:49 UTC 2022 - Hillwood Yang <[email protected]>
+
+- Add fix-sudo-issue.patch, fix a sudo issue. 
+
+-------------------------------------------------------------------

New:
----
  fix-sudo-issue.patch

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

Other differences:
------------------
++++++ deepin-polkit-agent.spec ++++++
--- /var/tmp/diff_new_pack.DmYzJZ/_old  2022-02-10 23:12:43.012305681 +0100
+++ /var/tmp/diff_new_pack.DmYzJZ/_new  2022-02-10 23:12:43.016305691 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package deepin-polkit-agent
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -26,6 +26,7 @@
 Group:          System/GUI/Other
 URL:            https://github.com/linuxdeepin/dde-polkit-agent
 Source0:        
https://github.com/linuxdeepin/dde-polkit-agent/archive/%{version}/%{_name}-%{version}.tar.gz
+Patch0:         fix-sudo-issue.patch
 BuildRequires:  dtkcore
 BuildRequires:  libqt5-linguist
 BuildRequires:  pkgconfig(Qt5Concurrent)
@@ -54,7 +55,7 @@
 %lang_package
 
 %prep
-%setup -q -n %{_name}-%{version}
+%autosetup -p1 -n %{_name}-%{version}
 sed -i 's|lrelease|lrelease-qt5|' translate_generation.sh
 sed -i 's/bool is_deepin = true/bool is_deepin = false/' policykitlistener.cpp
 sed -i '/setCancel/d' policykitlistener.cpp

++++++ fix-sudo-issue.patch ++++++
diff -Nur dde-polkit-agent-5.4.14/AuthDialog.cpp 
dde-polkit-agent-5.4.14-new/AuthDialog.cpp
--- dde-polkit-agent-5.4.14/AuthDialog.cpp      2021-10-15 09:37:19.000000000 
+0800
+++ dde-polkit-agent-5.4.14-new/AuthDialog.cpp  2022-02-09 20:20:42.482537932 
+0800
@@ -193,12 +193,20 @@
     } else {
         // ???????????????????????????????????????
         QDBusInterface accounts("com.deepin.daemon.Accounts", 
"/com/deepin/daemon/Accounts", "com.deepin.daemon.Accounts", 
QDBusConnection::systemBus());
-        const QString &path = accounts.call("FindUserById", 
QString::number(identity.toUnixUserIdentity().uid())).arguments().value(0).toString();
+        QString path;
+        QDBusReply<QString> reply = accounts.call("FindUserById", 
QString::number(identity.toUnixUserIdentity().uid()));
+        if (reply.isValid()) {
+            path = reply.value();
+        }
+
         bool passwordIsExpired = false;
 
         if (!path.isEmpty()) {
             QDBusInterface accounts_user("com.deepin.daemon.Accounts", path, 
"com.deepin.daemon.Accounts.User", QDBusConnection::systemBus());
-            passwordIsExpired = 
accounts_user.call("IsPasswordExpired").arguments().value(0).toBool();
+            QDBusReply<bool> reply = accounts_user.call("IsPasswordExpired");
+            if (reply.isValid()) {
+                passwordIsExpired = reply.value();
+            }
         }
 
         // ?????????????????????

Reply via email to