Tiny Change to allow spaces in valid users list

John Trostel jtrostel at connex.com
Mon Mar 5 15:03:34 GMT 2001


On 05-Mar-2001 Simo Sorce wrote:
> On Mon, 5 Mar 2001, David Collier-Brown 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 =
>> [...]
>> > > Since smbpasswd already accepts spaces,
>> > > is there any compelling reason NOT to allow spaces in user
>> > > names here?
>>
>> Gerald Carter wrote:
>> > 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'?
>>
>>      Arguably it will, due to the use of tabs as the
>>      seperators.
>>
>>      I like the idea, but not the implementation.
>>
>>      1) I'd suggest slashes, and require they be the first
>>      and last characters of the string, like
>>              valid users = /tom/jerry/tim smith/
>>      2) during a cut-over period fom 2.2.0 to 2.3.0, strings
>>         without slashes should be interpreted as before, and
>>         a warning message issued at log level 0
>>      3) after the cut-over period, the slashes should be
>>         required, and the erronious line rejected.
>>
>>      This makes the option unambiguous, "except for a short
>>      and bounded period" (the latter quote is from a safety-
>>      critical-systems course I took some years back (;-))
>>
>>      There is already code to parse slash-lists, so using it
>>      would be a smallish change too.
>>
>> --dave
>>
> 
> The current way is just so nice, why changing it?
> Simply allow username be presented between quotes if you need a space in
> the username.
> 
> valid users = tim jack "tic tac toe" me you "a name with a \" (quote) in"
> 
> Space as separator is really clear and intuitive do not chnge it please.
> 

I agree that a space _is_ intuitive! The parseing would just be a bit more
complex with the quoted scheme. In your example above, wouldn't you have to be
looking for quotes, escaped quotes, and all the normal seperators also?

-- 
John M. Trostel
Linux OS Engineer
Connex
jtrostel at connex.com




More information about the samba-technical mailing list