samba 4: a new configuration system?
idra at samba.org
Thu Jun 23 07:10:50 GMT 2005
On Thu, 2005-06-23 at 07:45 +0200, Stefan (metze) Metzmacher wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> Tim Potter schrieb:
> > On Wed, 2005-06-22 at 21:55 -0700, Raymond Lillard wrote:
> >>>I don't think that issue has been resolved yet but I am guessing that if
> >>>the configuration file format is changed it will involved ldb somehow.
> >>I hope not. I realize I am "old school", and I fully realize
> >>I am NOT a decision maker here, but dammit what's so bloody
> >>wrong about flat text files that can be modified with "vi" or
> >>*emacs*? We don't need to turn Samba in *)&$^%& windows.
> > Sure - I understand your arguments here. I was just pointing out that
> > last time this topic was discussed I remember that ldb was one of the
> > contenders.
> yep, the latest idea of mine was something like
> having :
> share db = ldb://share.ldb
> but it will also support
> share db = file:///share.conf
I agree with this idea, having written the ldap_config module for samba3
and poked around a bit, I think that the advantages of using an ldb file
are really great compared to current samba3 text files.
But I understand people scared by a database like configuration file.
To Raymond I'd like to say that, even if samba4 moves to ldb for most
stuff, you do not need to worry too mush, if you can cope with an ldif
style config file you can easily use ldbedit to edit the configuration
in the editor of your choice.
I go even further proposing to use ldif syntax in share.conf, so that it
get easy to import it at run time (and regularly when it changes), and
it is also easy to write back changes when we change something in the
configuration from the network (ldap, rpc, whatever).
Keeping comments should be feasible
> and also shares in smb.conf
I would avoid that, I think a separate file for shares is a very good
> (maybe we can just use "include = ldb://share.ldb")
I would avoid this too, it is the approach I used for the ldap_config
module I made and has big limitations.
> the main problem I see with a text based config is that we need to kepp
> an in memory copy of the parameters, need to manually resync this cache when
> the text file has changed. and things like adding delete and mofify shares,
> from smbd itself is not so easy. It's very hard to keep the structure of the file
> and the comments on it when you change any parameter for a share via RPC calls.
See my proposal above to solve this problem, what do you think?
I can write an ldb module that handles the sync with the ldif format
Simo Sorce - idra at samba.org
Samba Team - http://www.samba.org
Italian Site - http://samba.xsec.it
More information about the samba-technical