PLAN: global configuration options from registry

Michael Adam ma at
Mon Apr 2 15:38:28 GMT 2007

Hi Folks,

as posted here earlier, I am working on the samba registry
configuration code of SAMBA_3_0. My work can be looked at at

Up to now, I have been working on a "net conf" utility to
locally edit (and view) the KEY_SMBCONF portion of the
registry. The current set of subcommands is
list, listshares, showshare, addshare, delshare, setparm, 
getparm, delparm, import.
The newest, import allows to import a service or a complete
smb.conf file to the registry.

Despite only the registry shares being functional at this
time, I have designed the net conf utility to work for global
options as well. 

(One open design question here is, whether it is better to 
store the global options in a subkey "global" of KEY_SMBCONF or
as values directly inside KEY_SMBCONF. Currently I store
them directly, but I am not quite decided if I should switch
that as long as it is not too late...)

My next target is to "activate" the global options stored
inside the registry. An _how_ this should be achieved best 
is what I would like to put up for discussion here.

One idea of mine is to introduce a new global smb.conf parameter
like "registry globals" of type P_BOOL, which defaults to "No",
and which, when set to "Yes", treats the global section of
KEY_SMBCONF like an include directive: Parameters would be
processed from registry exactly at the point where the "registry
globals" parameter occurs, i.e. possibly overwriting 
values set previously in smb.conf but possibly being overwritten 
by parameters set further down in the config file. Share 
definitions from registry would not be processed at that point.
(Currently, they get processed from load_registry_shares()).

Of course there are other thinkable approaches, but this
seems a rather flexible starting point to me: It allows a mixed
setup and also, by specifying a minimal smb.conf of type

registry globals = yes

a setup where the whole config is effectively stored inside the
registry. Of course, one could easily make such a setup 
mandatory by adding more options like "registry conf only"
or "registry shares only" or something like that.

I would be glad to hear your opinions about these plans!

Cheers, Michael

Michael Adam <ma at>
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.SerNet.DE, mailto: Info @ SerNet.DE

More information about the samba-technical mailing list