Bug 2137 - SWAT mangles names with containing spaces
Summary: SWAT mangles names with containing spaces
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: SWAT (show other bugs)
Version: 3.0.0
Hardware: x86 Linux
: P3 major
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
: 1908 2084 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-12-09 00:27 UTC by christophe mainguet
Modified: 2005-08-24 10:16 UTC (History)
3 users (show)

See Also:


Attachments
Patch to swat to have it use the correct quote characters. (853 bytes, patch)
2005-03-02 08:35 UTC, Jay Fenlason - please log in and update your mail address here and let us enable Bugmails to you again, Jay
no flags Details
Better patch (5.19 KB, patch)
2005-03-03 20:55 UTC, Jay Fenlason - please log in and update your mail address here and let us enable Bugmails to you again, Jay
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description christophe mainguet 2004-12-09 00:27:32 UTC
when using space in group name and using those groups for entry like "admin
users" or "printer admin users", swat change the string like that :

so I enter my configuration like this :
admin users = @"Admins du domaine"
 
after a change with swat, it changes it like this :
admin users = '@Admins du domaine'
 
after another modification with swat, it changes it again like this :
admin users = '@Admins, du, domaine'

after the last modification, configuration file is false. So samba does not
recognize "admin users", and i can't no more administrate my domain !

I use space, because I import groups and users from an existing domain.
Comment 1 Gerald (Jerry) Carter (dead mail address) 2004-12-09 06:10:52 UTC
This was fixed a couple of release ago.  Should be fine in 3.0.9.
Stick with double quotes.
Comment 2 christophe mainguet 2004-12-09 09:42:51 UTC
(In reply to comment #1)
> This was fixed a couple of release ago.  Should be fine in 3.0.9.
> Stick with double quotes.

Sorry I don't agree with you !
I just test 3.0.9 on redhat 3 update 3, and the problem is ever present !
Comment 3 Tomasz Bartusiak 2005-01-03 06:01:41 UTC
The problem is present in release 3.0.10 too.
Comment 4 Gerald (Jerry) Carter (dead mail address) 2005-02-17 09:29:09 UTC
*** Bug 2084 has been marked as a duplicate of this bug. ***
Comment 5 Gerald (Jerry) Carter (dead mail address) 2005-02-17 10:27:32 UTC
*** Bug 1908 has been marked as a duplicate of this bug. ***
Comment 6 Jay Fenlason - please log in and update your mail address here and let us enable Bugmails to you again, Jay 2005-03-02 08:35:54 UTC
Created attachment 1004 [details]
Patch to swat to have it use the correct quote characters.

I whipped this up last night.  Unfortunatly, looking at the code convinces me
that SWAT has a few more quoting issues.  Fixing them will take a longer patch.
Comment 7 Jay Fenlason - please log in and update your mail address here and let us enable Bugmails to you again, Jay 2005-03-03 20:55:40 UTC
Created attachment 1007 [details]
Better patch

This patch includes the terminating ';' characters on &quot, and correctly
quotes other HTML metacharacters when they appear in paramaters.
Comment 8 Deryck Hodge 2005-04-19 14:46:11 UTC
I applied the first patch from Jay Fenlason to correct the quoting problems. 
This works fine now.  I didn't apply the second patch as it was larger and not
really necessary for this problem.
Comment 9 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:16:35 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.