Bug 455959 - ksambashare.cpp -- parse() fails on output of "net usershare info"
Summary: ksambashare.cpp -- parse() fails on output of "net usershare info"
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 5.95.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-26 17:12 UTC by Claus-Justus Heine
Modified: 2025-08-21 03:47 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Patch to remove trailing comma of "net usershare info" output (862 bytes, patch)
2022-06-26 17:12 UTC, Claus-Justus Heine
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Claus-Justus Heine 2022-06-26 17:12:30 UTC
Created attachment 150167 [details]
Patch to remove trailing comma of "net usershare info" output

SUMMARY

At least Samba version >=4.14.12 and <=4.16.2 generate a trailing comma with "net usershare info" like so:

claus@anaxagoras /usr/local/storage/a/samba/public $ net usershare info
[scanbox]
usershare_acl=ANAXAGORAS\claus:R,Everyone:R,ANAXAGORAS\scanner-upload:F,

OTOH, "net usershare add" does not accept a trailing comma as input and generates an error message:

  net usershare add: malformed acl  (missing ':').

STEPS TO REPRODUCE
1. Use the sharing dialog for some local file with an existing share
2. Do something which triggers an error (e.g. use an unsupported user-name like "foo-bar", see #455956 )
3. Try to apply the changes. The error messages of e.g. Dolphin will show something like 
"malformed acl  (missing ':')." and the ACLs are also not updated.

OBSERVED RESULT

Saving ACLs fails.

EXPECTED RESULT

Saving ACLs  works.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo / X11
KDE Plasma Version:  5.25.1
KDE Frameworks Version:  5.95.0
Qt Version:  5.18.6

ADDITIONAL INFORMATION
The bug is  still present in the master branch.
Comment 1 Andreas Sturmlechner 2022-06-27 08:03:07 UTC
I'm not sure this isn't something only to be fixed in samba then...

...but, if you want your patch to get looked at, create an MR over at https://invent.kde.org/frameworks/kio instead.
Comment 3 Christoph Cullmann 2025-07-22 17:36:22 UTC
Could one check if that still happens with recent samba versions or if that was just a temporary regression?
Comment 4 Bug Janitor Service 2025-08-06 03:46:32 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2025-08-21 03:47:06 UTC
๐Ÿ›๐Ÿงน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.