Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 568778 - samba-swat does not properly store group names with spaces in them
samba-swat does not properly store group names with spaces in them
Status: CLOSED WORKSFORME
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: samba3x (Show other bugs)
5.6
All Linux
low Severity high
: rc
: ---
Assigned To: Guenther Deschner
qe-baseos-daemons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-26 10:47 EST by Jim Roland, RHCE
Modified: 2010-11-09 08:15 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-08-30 05:38:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0054 normal SHIPPED_LIVE samba3x bug fix and enhancement update 2011-01-12 12:15:21 EST

  None (edit)
Description Jim Roland, RHCE 2010-02-26 10:47:01 EST
Description of problem:
When editing with swat, group or user listings (such as global or share-based configuration items like "admin users" or "write list") do not get stored properly.  When typing in the admin interface (even with double quotes), I get a comma in place of the space, thus making the config file split the entry into two groups (DOMAIN\\Domain Admins turns into 2 groups: DOMAIN\\Domain and another called Admins: DOMAIN\\Domain, Admins instead of the intended DOMAIN\\Domain Admins or "DOMAIN\\Domain Admins" or DOMAIN\\Domain\ Admins)

Version-Release number of selected component (if applicable):
3.0.33, release 3.15.el5_4.1:
Installed Packages
Name       : samba-swat
Arch       : i386
Version    : 3.0.33
Release    : 3.15.el5_4.1
Size       : 16 M


How reproducible:
Every time, just add a group such as "DOMAIN\\Domain Admins" and you will get in the result list after saving:  DOMAIN\\Domain, Admins instead of the correct string.

Steps to Reproduce:
1. Edit any entry in swat requiring a user or group name
2. Include a space in the name, surround with double quotes, or even backslash-escape a space in the string (eg: @DOMAIN\\Domain Admins or @DOMAIN\\Domain\ Admins will result in an entry @DOMAIN\\Domain, Admins or @DOMAIN\\Domain\, Admins), does not matter if quotes are used or not, no difference.

Resulting entries in the file (for reference, used "\ " to escape the space, however it still places a comma as if I never inserted the space):
[Share]
        comment = Administrative Share for Admins
        path = /samba-shares
        valid users = @DOMAIN\\Domain\, Admins
        admin users = @DOMAIN\\Domain\, Admins
        read only = No
Comment 1 Jim Roland, RHCE 2010-02-26 10:52:24 EST
Additional comments on workaround:
Workarounds: None known, even using typical shell-style or POSIX-style escape techniques to escape the space.
Comment 2 Jim Roland, RHCE 2010-02-26 11:01:07 EST
Sorry (don't mean to self post), more additional info:  Reported on Samba as well, their bugzilla #7187.

This is also a problem in smb.conf, unless the group name with a space has quotation marks in it, it is interpreted as 2 groups as well, even if trailed by a comma in the correct place.  To make the group (with a space in the name) work, the smb.conf file must be manually edited and quoted (with double quotes), then smbd/nmbd sees the group properly, even though not correctly created/edited by swat.  Only double-quotes work (backslash shell-escaping the space does not work)
Comment 4 Guenther Deschner 2010-06-30 09:43:42 EDT
Can you please just try setting the strings like this in samba3x swat ?

"@Domain Admins" or
"@MYDOMAIN\Domain Admins"

(including the quotes)

That just worked fine here.
Comment 5 Guenther Deschner 2010-08-05 08:18:12 EDT
Did you had a chance to try this ? Does it work for you ?
Comment 6 Guenther Deschner 2010-08-30 05:38:34 EDT
No feedback in two months, closing as worksforme

Note You need to log in before you can comment on or make changes to this bug.