Bug 475946 - Share properties page shows incorrect, bogus error message
Summary: Share properties page shows incorrect, bogus error message
Status: RESOLVED FIXED
Alias: None
Product: kdenetwork-filesharing
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-21 23:31 UTC by Stefan Brüns
Modified: 2023-11-14 16:55 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Wrong error message (63.30 KB, image/png)
2023-10-21 23:31 UTC, Stefan Brüns
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Brüns 2023-10-21 23:31:16 UTC
Created attachment 162487 [details]
Wrong error message

The group manager now checks for a "valid" group name for the usershares, but gets this awfully wrong.

From the `net` man page
***
 USERSHARE
...
       To set this up, first set up your /etc/samba/smb.conf by adding to the [global] section: usershare path = /var/lib/samba/usershares Next create the directory /var/lib/samba/usershares, change the owner to root and set the group owner to the UNIX group who should have the ability to create usershares, for example a group called "serverops". Set the permissions on /var/lib/samba/usershares to 01770.

Note the example "serverops", which is not accepted, as it does not contain "samba".

*Any* group should be accepted for the properties page. Notably, there is nothing which disallows "users" for the usershares group. 

STEPS TO REPRODUCE
Open the properties dialog, share page
 
OBSERVED RESULT
False error message is shown.

EXPECTED RESULT
Valid configuration is accepted.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:
KDE Plasma Version: 23.08.02
KDE Frameworks Version: 5.110
Qt Version: 5.15.11

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2023-10-21 23:52:35 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/kdenetwork-filesharing/-/merge_requests/43
Comment 2 Stefan Brüns 2023-11-14 16:55:11 UTC
Git commit 456c127ee95b8be252c28046f444091230b47b24 by Stefan Brüns.
Committed on 11/11/2023 at 00:25.
Pushed by bruns into branch 'master'.

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.

M  +2    -2    samba/filepropertiesplugin/authhelper.cpp
M  +0    -13   samba/filepropertiesplugin/groupmanager.cpp

https://invent.kde.org/network/kdenetwork-filesharing/-/commit/456c127ee95b8be252c28046f444091230b47b24