samba 4: a new configuration system?
Stefan (metze) Metzmacher
metze at samba.org
Thu Jun 23 08:13:35 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).
this is a nice idea,
for comments we could easily use a convention like this:
to add @comment to the attribute name
like this
dn: cn=TestShare,CN=Shares
@comment: do not remove this share, it's used by the ExmpleTest Server to
test file copying
objectClass: fileShare
cn: TestShare
ntvfs_handler: unixuid vscan recycle posix
ntvfs_handler at comment: we do the virus scanning before the recyle, because
...
ntSecurityDescriptor:: SDFRGDFgrgdtz4345Gdfgdfg...
> 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
> idea.
me too, and that was my original idea, and I think that would make think
much easier for the internal logic of samba
>
>> (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
> config file.
ok, but first I'll think about the internal handling in smbd a bit more,
I'll getting to this when I conntinue the spoolss stuff, as I have the
printers also in an ldb...
so for now I think we should leave it as it is for a while...
and come back to it later!
--
metze
Stefan Metzmacher <metze at samba dot org>
More information about the samba-technical
mailing list