1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-19 23:17:05 +03:00

35 Commits

Author SHA1 Message Date
Michael Adam
be4f8447cc libsmbconf: remove unnecessary talloc success checks from smbconf.c
talloc_stackframe() panics on NOMEM.

Michael
2008-04-23 01:47:33 +02:00
Michael Adam
17415e2dc4 libsmbconf: rewrite API to use smbconf_service struct
instead of lists of strings and counters directly...

Michael
2008-04-23 01:43:31 +02:00
Michael Adam
aa167de825 libsmbconf: don't complain with WERR_ALREADY_EXISTS for NULL share in smbconf_create_share().
These are values stored inside the base key for registry.
This is not getting deleted.

Michael
2008-04-15 17:40:28 +02:00
Michael Adam
cb23052b20 libsmbconf: allow NULL sharename in smbconf_share_exists().
Michael
2008-04-15 17:40:27 +02:00
Michael Adam
daef50e54d libsmbconf: add delete_includes mehtod to the api (and backend implementations)
Michael
2008-04-10 01:29:01 +02:00
Michael Adam
ce1b2f5508 libsmbconf: add "_global_" wrappers for get/set_includes.
These use the usual global_check like the other global wrappers.

Michael
2008-04-10 01:28:58 +02:00
Michael Adam
ed535b6b30 libsmbconf: add talloc context to the get_includes methods.
Michael
2008-04-10 01:28:57 +02:00
Michael Adam
e86eb375d9 libsmbconf: add get_includes() and set_includes() to the API.
Includes have to get a special treatment, at least for registry.
Includes are not like other smbconf parameters: they are some kind
of metainformation. "include" has two effects when stated twice so
it can not be stored boldly into registry, since there can only be
one value named "include" in registry per key.

I will provide special handling for includes for the registry backend.

This patch provides the necessary methods in the smbconf API.

Michael
2008-04-10 01:28:57 +02:00
Michael Adam
bc1a5bdbd3 libsmbconf: fix a comment
Michael
2008-04-10 01:28:56 +02:00
Michael Adam
e0f6a9d50c libsmbconf: move utility functions from main module to new smbconf_util.c
Michael
2008-04-10 01:28:55 +02:00
Michael Adam
6d72fc4373 smbconf: reformat - fix intentation.
This time this won't make me stumble, since there is no
magic in indented function headers here - no automatic
prototype generation... :-)

Michael
2008-03-26 11:15:04 +01:00
Michael Adam
96434d9dc7 libsmbconf: add a "path" variable to the conf context.
This is passed to the module init routines.
In case of the registry, this is the path of the
basekey in registry, that is to be used, defaulting
to KEY_SMBCONF (HKLM\software\samba\smbconf), when
NULL is given. This is the only case currently used.

In order to support other keys, registry initialization
for smbconf has to be changed to support different keys.

Michael
2008-03-21 18:19:24 +01:00
Michael Adam
e8ed8ad077 libsmbconf: group together functions in smbconf.c more appropriately
Michael
2008-03-21 16:40:20 +01:00
Michael Adam
431b10bfe0 libsmbconf: move registry implementation to a module of its own.
Michael
2008-03-21 16:26:50 +01:00
Michael Adam
b3f6920ccb libsmbconf: add backend specific init function.
Hide generic init function taking smbconf_ops argument
from public api.

Michael
2008-03-21 02:25:56 +01:00
Michael Adam
acbd1f40e0 libsmbconf: add shutdown handler to smbconf_ops.
Michael
2008-03-21 02:25:56 +01:00
Michael Adam
24f32d9bd9 libsmbconf: fix comments
Michael
2008-03-21 02:25:56 +01:00
Michael Adam
797b26ad3f libsmbconf: rename smbconf_close() to smbconf_shutdown().
Michael
2008-03-21 02:25:56 +01:00
Michael Adam
d7bd9bb8aa libsmbconf: rename smbconf_open() to smbconf_init().
That's more appropriate.

Michael
2008-03-21 02:25:56 +01:00
Michael Adam
77dbdf82ef libsmbconf: add open and close operations to the smbconf_ops.
Note: currently, reg_init_smbconf opens the registry, but does
not close it. This has to be changed. so that it is closed.
And then libsmbconf will need these open/close functions

Michael
2008-03-21 02:25:56 +01:00
Michael Adam
a857f643d1 libsmbconf: introduce a smbconf_ops layer to allow interchangeable backends.
Michael
2008-03-21 02:25:56 +01:00
Michael Adam
f2d605006c libsmbconf: move smbconf_reg_initialize() down to the smbconf operations.
Michael
2008-03-21 02:25:56 +01:00
Michael Adam
d44c2ef0b7 libsmbconf: add existence check for service to smbconf_delete_share().
Michael
2008-03-21 02:25:56 +01:00
Michael Adam
26208d3e96 libsmbconf: add existence check for service to smbconf_get_share().
Michael
2008-03-21 02:25:56 +01:00
Michael Adam
5dac66c82a libsmbconf: add check for NULL servicename to smbconf_share_exists().
Michael
2008-03-21 02:25:56 +01:00
Michael Adam
103a37ac8e libsmbconf: fix a comment 2008-03-21 02:25:56 +01:00
Michael Adam
9448a7a298 libsmbconf: refactor out registry implementation of smbconf operations.
This leaves most of the api functions mere wrappers except for some
common initial checks.

Michael
2008-03-21 02:25:55 +01:00
Michael Adam
aeaf66c064 libsmbconf: refactor autocreation of [global] into a helper function.
Michael
2008-03-21 02:25:55 +01:00
Michael Adam
a99ee5e536 libsmbconf: put the smbconf context struct into a private header.
Michael
2008-03-21 02:25:55 +01:00
Michael Adam
304dba6cb2 libsmbconf: change the API to always take the smbconf_ctx parameter first.
..for consistency. Exception: the open/init function, where the smbconf_ctx
is created from the given talloc context.

Michael
2008-03-21 02:25:55 +01:00
Michael Adam
7460697ea4 libsmbconf: fix indentation.
Michael
2008-03-21 02:25:55 +01:00
Michael Adam
5b6b90900a libsmbconf: change smbconf_get_seqnum() to smbconf_changed().
The former seqnum is hidden inside a struct smbconf_csn.
And the get_seqnum is united with a changed function that
stores the seqnum inside the given csn.

Michael
2008-03-21 02:25:55 +01:00
Michael Adam
e6b60f6cad libsmbconf: fix a comment
Michael
2008-03-21 02:25:55 +01:00
Michael Adam
097af0309d libsmbconf: rename all occurrences of libnet_conf_ to smbconf_ .
Michael
2008-03-17 18:03:02 +01:00
Michael Adam
5315ef41f4 Move libnet_conf to a library lib/smbconf/ of its own, fixing the api.
The libnet_conf code to access the registry based configuration has
become more of a library used in several places in samba (e.g. loadparm)
than an abstraction of "net conf". So I move it to a location lib/smbconf/.

In the same breath, the api is fixed (not generated by make proto anymore).

Michael
2008-03-17 18:03:02 +01:00