Tiny Change to allow spaces in valid users list
John Trostel
jtrostel at connex.com
Mon Mar 5 14:56:07 GMT 2001
On 05-Mar-2001 Gerald Carter wrote:
> On Fri, 02 Mar 2001 13:11:57 John Trostel wrote:
>>
>> With a tiny change, samba 2.2 can be made to accept
>> user names with spaces in them in the
>>
>> valid users =
>>
>> line of a smb.conf file.
>>
>> If I change the LIST_SEP in the user_in_list function of
>> sources/lib/username.c
>> from its default value " \t,;:\n\r" (as #defined in local.h)
>> to merely "\t,;:\n\r", samba happily (it seems so far) accepts
>> users with spaces. Since smbpasswd already accepts spaces,
>> is there any compelling reason NOT to allow spaces in user
>> names here?
>>
>> P.S. I'm testing the change out here locally in the meantime.
>
> This seems like an qacceptable change to me. How do you have
> people who use ' ' as a field delimiter instead of ','?
> Usernames must be in quotes I guess.
>
> Suppose a system has an existing share defined as so
>
> [foo]
> path = /tmp
> valid users = tom jerry
>
> By inserting your change, will it break this and interpret
> the account in the valid users line as 'tom jerry'?
Yes... the change _would_ break this and make that entry be interpreted as 'tom
jerry'. It also means that you can't put spaces after the commas (or tabs, or
semicolons, etc.) in the list. To make the user_in_list function more
intelligent in it's parsing of the valid users string would reguire a bit more
intelligence to allow space-delimiter or delimiter-space, i.e. (' ,' or ', '),
in the string.
--
John M. Trostel
Linux OS Engineer
Connex
jtrostel at connex.com
More information about the samba-technical
mailing list