Volker.Lendecke at SerNet.DE
Wed Jun 21 18:41:23 GMT 2006
On Wed, Jun 21, 2006 at 07:36:18PM +0530, Chetan S wrote:
> A fixed consistent api for managing samba ( performance metrics, smb
> paramenter configuration ) is what my discussion was about.
An API for managing Samba from my point of view depends on
the model we use to store the configuration information.
Yes, we could in theory save and restore the smb.conf as
such, but this really heavily sucks, and it is nothing I
would recommend. Yes, swat does it, but as already stated in
this thread, swat sucks.
Let me summarize a chat I had with Jerry. It does not fully
match what I've written earlier, but we're still discussing
We need to store our config data in something more readily
accessible to programmatic read/write access. From our point
of view this very nicely matches the registry data model.
This then leads to two ways to access this database for
configuration purposes: The usual Win32 API calls like
srvsvc_NetShareAdd and friends. These are certainly limited
in what they can do, but for 99% of our users with a
reasonable [global] section this is sufficient. Look at what
we can set in the usershares: path, security descriptor and
comment. All these are accessible via the srvsvc calls.
For the [global] section and the more advanced stuff like
for example 'force user' accessing the config database via
the registry calls sounds completely reasonable to me.
All the fancy include stuff could be done via the regedit
settings, 'include = ' is just another string config option.
The settings made there could be made available via the same
API that reads in the new binary database, but the stuff
being read in via include would only be available read only
for the API.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20060621/eef4424a/attachment.bin
More information about the samba-technical