How to put quoted parameters into parameter strings!

John Trostel jtrostel at connex.com
Mon Mar 5 20:28:18 GMT 2001


I think the behavior of trim_string in load_param is so people can say

netbios name = "My Big Bad NT-like Machine"

and samba will use 

My Big Bad NT-like Machine

for the parameter.

Or even so you can say
 username map = /usr/local/samba/private/usermap.txt

usermap.txt:

user_one = "User One"
user_two = "User Two"

Inside the resulting lists, the tokenizer does do dequoting without a problem. 
It's just the interaction between the two routines and their (somewhat
conflicting) purposes that make for the less than comfortable syntax of
quote-space string space-quote.

On 05-Mar-2001 Kevin Colby wrote:
> John Trostel wrote:
>> 
>> The problem came because the load_param function, called to parse the
>> smb.conf file, calls 'trim_string', which chops leading and trailing
>> quotes from a parameter string. (And that needs to stay.)
> 
> Shouldn't dequoting always be done by the tokenizer, not per-parameter?
> 
>       - Kevin Colby
>         kevinc at grainsystems.com

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




More information about the samba-technical mailing list