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

33 Commits

Author SHA1 Message Date
Volker Lendecke
727127f1dc Increase level of debug msg when a regkey is not found
This is a pretty normal situation if you have "include=registry" set but no
configuration options have been set there yet.
2008-04-23 11:12:25 +02:00
Michael Adam
03fd30eef8 libsmbconf: remove unnecessary talloc success checks from smbconf_reg.c
talloc_stackframe panics on NOMEM.

Michael
2008-04-23 01:48:26 +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
518f4d4e66 libsmbconf: fix segfault in listing share names / config.
Discovered by Günther while giving a talk. - Sorry Günther!

Michael
2008-04-16 22:44:04 +02:00
Michael Adam
6c1181fda2 libmsbconf: add handling of NULL share parameters to registry backend.
Michael
2008-04-15 17:40:28 +02:00
Michael Adam
3fb95ab757 libsmbconf: rename smbconf_init() to smbconf_init_internal().
smbconf_init should be the name of the dispatcher (to be written)

Michael
2008-04-13 20:04:43 +02:00
Michael Adam
7c343c6057 registry: change registry_init_smbconf() to return WERROR instead of bool
Michael
2008-04-13 15:33:48 +02:00
Michael Adam
8fe1a2f567 registry: make registry_init_smbconf() hook the registry ops onto given key.
This still defaults to HKLM\Software\Samba\smbconf, but is interchangeable now.
This allows us to open the libsmbconf registry backend on different registry keys.

Michael
2008-04-13 15:33:47 +02:00
Michael Adam
182433be5b libsmbconf: return success and count 0 from get_includes when no includes present.
Michael
2008-04-10 01:29:01 +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
0dc1fd6859 libsmbconf: let set_includes delete the includes paramter when given an empty list
instead of complaining

Michael
2008-04-10 01:29:01 +02:00
Michael Adam
5a880c6a2f libsmbconf: prevent getting/deleting value "includes".
This has to be handled differently (by using get_includes / set_includes)

Michael
2008-04-10 01:29:01 +02:00
Michael Adam
2c8c65d690 libsmbconf: consider "include" a forbidden parameter in regisry config again.
It is now taken care of by the special includes handling.

Michael
2008-04-10 01:29:00 +02:00
Michael Adam
9bd06d5737 libsmbconf: add includes at the end of parameter list in reg_get_share().
Michael
2008-04-10 01:29:00 +02:00
Michael Adam
01c4bd0730 libsmbconf: add function smbconf_reg_valname_valid() and use it in get_values()
so "includes" doesn't get listed as a parameter

Michael
2008-04-10 01:29:00 +02:00
Michael Adam
072a3228a4 libsmbconf: refactor get_includes on opened key into smbconf_reg_get_includes_internal()
Michael
2008-04-10 01:29:00 +02:00
Michael Adam
23fb33fd33 libsmbconf: rename registry_smbconf_valname_forbidden() to smbconf_reg_valname_forbidden()
Michael
2008-04-10 01:29:00 +02:00
Michael Adam
798808174d libsmbconf: make registry_smbconf_valname_forbidden() static
Michael
2008-04-10 01:29:00 +02:00
Michael Adam
98151fd3e1 libsmbconf: move registry_smbconf_valname_forbidden() to the registry backend
from util_reg.c - no other callers left

Michael
2008-04-10 01:29:00 +02:00
Michael Adam
382c623948 libsmbconf: more sanely print multi_sz values in registry backend
Michael
2008-04-10 01:28:59 +02:00
Michael Adam
3fee0d79cc libsmbconf: implement get_includes() and set_includes() for registry backend.
includes are stored per share in a special registry value "includes"
of type multi_sz.

Michael
2008-04-10 01:28:59 +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
b79a33eb2f libsmbconf: reformat smbconf_format_registry_value() - indentations/tabs
Michael
2008-04-10 01:28:56 +02:00
Michael Adam
4339caff09 libsmbconf: untangle assignment and test in for-loop condition.
Michael
2008-04-10 01:28:56 +02:00
Michael Adam
2a8029985f libsmbconf: move initialization of registry value down after error checks.
Michael
2008-04-03 15:43:04 +02:00
Michael Adam
f4d87fdbf2 registry: fix registry_init_smbconf() to close the registry at the end.
Michael
2008-03-21 23:50:49 +01:00
Michael Adam
03e72e1307 libsmbconf: add internal open/close handling to registry backend.
This internally keeps track of opened registry in the private data
struct. The first call that really accesses data, opens the registry
and it is kept open until the destructor is called.

This behaviour might be changed in the future.

Michael
2008-03-21 23:43:52 +01:00
Michael Adam
513ae78ef7 libsmbconf: add a comment.
Michael
2008-03-21 22:55:20 +01:00
Michael Adam
a02163356b libsmbconf: add private_data section to smbconf_ctx.
This private data should be used by backends.
The token for the registry backend is moved from
the context to the private data section, since
this is registry specific.

Michael
2008-03-21 22:52:27 +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
8974b28368 libsmbconf: add a comment.
Michael
2008-03-21 16:35:52 +01:00
Michael Adam
431b10bfe0 libsmbconf: move registry implementation to a module of its own.
Michael
2008-03-21 16:26:50 +01:00