Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kdenetwork-filesharing for 
openSUSE:Factory checked in at 2023-10-23 23:40:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kdenetwork-filesharing (Old)
 and      /work/SRC/openSUSE:Factory/.kdenetwork-filesharing.new.1945 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kdenetwork-filesharing"

Mon Oct 23 23:40:19 2023 rev:51 rq:1119414 version:23.08.2

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/kdenetwork-filesharing/kdenetwork-filesharing.changes
    2023-10-12 23:40:50.626149314 +0200
+++ 
/work/SRC/openSUSE:Factory/.kdenetwork-filesharing.new.1945/kdenetwork-filesharing.changes
  2023-10-23 23:40:29.750507368 +0200
@@ -1,0 +2,7 @@
+Sat Oct 21 23:42:57 UTC 2023 - Stefan Brüns <stefan.bru...@rwth-aachen.de>
+
+- Fix non-working "Share" properties page in dolphin due to
+  incorrect group check (kde#475946, boo#1215374), add
+  0001-Remove-wrong-group-check-from-group-manager.patch
+
+-------------------------------------------------------------------

New:
----
  0001-Remove-wrong-group-check-from-group-manager.patch

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

Other differences:
------------------
++++++ kdenetwork-filesharing.spec ++++++
--- /var/tmp/diff_new_pack.HPCsed/_old  2023-10-23 23:40:30.442532489 +0200
+++ /var/tmp/diff_new_pack.HPCsed/_new  2023-10-23 23:40:30.442532489 +0200
@@ -28,6 +28,7 @@
 Source1:        
https://download.kde.org/stable/release-service/%{version}/src/%{name}-%{version}.tar.xz.sig
 Source2:        applications.keyring
 %endif
+Patch0:         0001-Remove-wrong-group-check-from-group-manager.patch
 BuildRequires:  PackageKit-Qt5-devel
 BuildRequires:  extra-cmake-modules
 %if 0%{?suse_version} < 1550

++++++ 0001-Remove-wrong-group-check-from-group-manager.patch ++++++
>From d1855c84ab5533fb2032dd830cbc7c9494398b19 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bru...@rwth-aachen.de>
Date: Sun, 22 Oct 2023 01:40:09 +0200
Subject: [PATCH] Remove wrong group check from group manager

Samba allows any group name for usershares. As long as the user is part
of the group the group name does not affect the function of usershares
at all.

The "net" man page even spells out "serverops" as example, which is
currently not accepted.

The remaining checks when creating the group is still bogus, but is
quite limited in scope, and has no effect when the group already exists.

BUG: 475946
---
 samba/filepropertiesplugin/authhelper.cpp   |  4 ++--
 samba/filepropertiesplugin/groupmanager.cpp | 13 -------------
 2 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/samba/filepropertiesplugin/authhelper.cpp 
b/samba/filepropertiesplugin/authhelper.cpp
index d6c6873..bbd6533 100644
--- a/samba/filepropertiesplugin/authhelper.cpp
+++ b/samba/filepropertiesplugin/authhelper.cpp
@@ -112,11 +112,11 @@ ActionReply AuthHelper::addtogroup(const QVariantMap 
&args)
     // TODO: add ability to resolve remote UID via KAuth and verify the 
request (or even reduce the arguments down to
     //    only the group and resolve the UID)
     // Keep this condition in sync with the one in groupmanager.cpp
-    if (!group.contains(QLatin1String("samba")) || 
group.contains(QLatin1String("admin")) ||
+    if (group.contains(QLatin1String("admin")) ||
         group.contains(QLatin1String("root"))) {
         auto reply = ActionReply::HelperErrorReply();
         reply.setErrorDescription(xi18nc("@info", "For security reasons, 
cannot make user <resource>%1</resource> a member of group 
<resource>%2</resource>. \
-                                                   The group name is insecure; 
valid group names include the text <resource>samba</resource> and do not \
+                                                   The group name is insecure; 
valid group names do not \
                                                    include the text 
<resource>admin</resource> or <resource>root</resource>."));
         return reply;
     }
diff --git a/samba/filepropertiesplugin/groupmanager.cpp 
b/samba/filepropertiesplugin/groupmanager.cpp
index 0659545..baab0bd 100644
--- a/samba/filepropertiesplugin/groupmanager.cpp
+++ b/samba/filepropertiesplugin/groupmanager.cpp
@@ -53,19 +53,6 @@ GroupManager::GroupManager(QObject *parent)
                 // TODO: define a helpfulAction that creates the folder
             }
 
-            // Now see if the group is set to something valid
-            // Keep this condition in sync with the one in authhelper.cpp
-            else if (!m_targetGroup.contains(QLatin1String("samba"))
-                     || m_targetGroup.contains(QLatin1String("admin"))
-                     || m_targetGroup.contains(QLatin1String("root"))
-                    ) {
-                m_errorText = xi18nc("@info:status", "This folder can't be 
shared because <filename>%1</filename> has its group owner inappropriately set 
to <resource>%2</resource>, which is not allowed.", path, m_targetGroup);
-                Q_EMIT errorTextChanged();
-                m_errorExplanation = xi18nc("@info:status", "This error is 
caused by your distribution not setting up Samba sharing properly. You can fix 
it yourself by changing that folder's group owner to 
<resource>sambashares</resource> and making yourself a member of that group. 
Then restart the system.");
-                Q_EMIT errorExplanationChanged();
-                // TODO: define a helpfulAction that creates the group and 
applies it to the folder
-            }
-
             // Now see if the user is a member of the group
             else if (!groups.contains(m_targetGroup)) {
                 m_errorText = xi18nc("@info:status", "This folder can't be 
shared because your user account isn't a member of the <resource>%1</resource> 
group.", m_targetGroup);
-- 
2.42.0

Reply via email to