Tiny Change to allow spaces in valid users list

David Collier-Brown davecb at canada.sun.com
Mon Mar 5 14:31:28 GMT 2001


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
-- 
David Collier-Brown,           | Always do right. This will gratify 
Performance & Engineering Team | some people and astonish the rest.
Americas Customer Engineering  |                      -- Mark Twain
(905) 415-2849                 | davecb at canada.sun.com




More information about the samba-technical mailing list