CVS update: samba/source/param
abartlet at samba.org
abartlet at samba.org
Sat Apr 13 20:52:32 EST 2002
Date: Sat Apr 13 03:52:31 2002
Author: abartlet
Update of /data/cvs/samba/source/param
In directory va:/tmp/cvs-serv32370/param
Modified Files:
loadparm.c
Log Message:
Patch for arbitary smb.conf paramaters (to make the life of plugin maintainers
sane) from ab.
Attached is his e-mail to the samba-technical list, as it describes it rather
well:
Andrew Bartlett
Subject:
[PATCH] Parametrical options support for Samba 3.0
Date:
Fri, 12 Apr 2002 19:13:13 +0300
From:
Alexander Bokovoy <a.bokovoy at sam-solutions.net>
To:
samba-technical at samba.org
CC:
tridge at samba.org
Greetings!
Attached patch makes possible arbitrary options to be specified in
smb.conf and later queried from VFS modules (and other places)
without problems. Below such options are called 'parametrical options'.
Patch introduces new notation to smb.conf option's language, as discussed
today with Tridgell on @samba-technical:
TYPE: OPTION = VALUE
Colon sign is important here, it is what distinguishes parametrical
options from ones hardcoded in param/loadparm.c.
TYPE is 'option domain', OPTION is option name itself.
In order to access values of parametrical options, lp_parm_string()
function was implemented:
char *lp_parm_string(const char *servicename, const char *type, const char
*option);
This function accepts service name, type and option name, and returns
value of option or NULL if this option is underfined. Service name can be
NULL, resulting in search in 'global' section only.
If option does not exist in specified service, 'global' section is
scanned. This allows propagation of globally specified options to all
services and later overloading of the option in some services.
Caution: 'TYPE: OPTION' combination is case sensitive.
So far, testparm is able to handle parametrical options, while SWAT
can't. Thus, everyone familiar with SWAT internals is welcomed to add
parametrical options support.
Revisions:
loadparm.c 1.399 => 1.400
http://www.samba.org/cgi-bin/cvsweb/samba/source/param/loadparm.c?r1=1.399&r2=1.400
More information about the samba-cvs
mailing list