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

107 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
dee57ad025 libsmbconf: remove unnecessary talloc success check from smbconf_txt.c
talloc_stackframe() panics on NOMEM.

Michael
2008-04-23 01:49:11 +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
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
8118a8348f libsmbconf: add a struct smbconf_service to hold the parameter names + values.
Michael
2008-04-22 23:46:13 +02:00
Michael Adam
54c0461679 libsmbconf: fix comment headers in smbconf.h
Michael
2008-04-22 16:32:31 +02:00
Michael Adam
640b8ae7ad libsmbconf: text backend remove comment references to "simple".
Michael
2008-04-22 16:11:38 +02:00
Michael Adam
3d1da73f66 libsmbconf: rename smbconf_init_txt_simple() to smbconf_init_txt().
...for consistency.

Michael
2008-04-22 16:11:37 +02:00
Michael Adam
dd9fe5aec4 libsmbconf: rename text backend smbconf_txt_simple to smbconf_txt.
Michael
2008-04-22 16:11:37 +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
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
b50fdf321d libsmbconf: make sure to always list the NULL section first in text backend.
Michael
2008-04-15 17:40:27 +02:00
Michael Adam
e1b98f1cbc libsmbconf: default to the NULL section when a parameter is encountered w/o section
Michael
2008-04-15 17:40:27 +02:00
Michael Adam
cb23052b20 libsmbconf: allow NULL sharename in smbconf_share_exists().
Michael
2008-04-15 17:40:27 +02:00
Michael Adam
a5923bafe9 libsmbconf: add handling of NULL strings to smbconf_find_in_array().
Michael
2008-04-15 17:40:27 +02:00
Michael Adam
aba261a914 libsmbconf: add handling of "NULL" strings to smbconf_add_string_to_array()
Michael
2008-04-15 17:40:27 +02:00
Michael Adam
cc613a60eb libsmbconf: add a smbconf init dispatcher smbconf_init().
The dispatcher takes a config source argument in the form
of "backend:path" where backend can (currently) be one of
"txt" (aka "file") or "reg" (aka "registry").

When the path is omitted, it is up to the backend to provide
a default path.

When there is no separator ":" and the string is not a recognized
backend, then file backend is assumed and the string is passed
in as the path argument.

Michael
2008-04-13 20:04:44 +02:00
Michael Adam
9efd7b5151 libsmbconf: move setting of verbatim variable into a more internal function.
Michael
2008-04-13 20:04:44 +02:00
Michael Adam
f76ec7d87e libsmbconf: add a check for talloc failure to smbconf_txt_init().
Michael
2008-04-13 20:04:44 +02:00
Michael Adam
e8bafcfbf4 libsmbconf: remove the bool verbatim parameter from txt backend init function.
Always be verbatim for now. Backend config options may be added later
via some private data pointer.

Michael
2008-04-13 20:04:43 +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
c4e1439ede libsmbconf: don't mark the API as "subject to change" any longer.
At least I hope it won't need many changes anymore...

Michael
2008-04-11 15:40:02 +02:00
Michael Adam
757601ec83 libsmbconf: testsuite: add test for delete_includes
Michael
2008-04-10 01:29:01 +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
dd543cd30c libsmbconf: fix crashbug - correctly check for existence of file.
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
c2d3d56d62 libsmbconf: testsuite: fix handling of error message/overall status
Michael
2008-04-10 01:28:59 +02:00
Michael Adam
1f64a1b2b4 libsmbconf: testsuite: add test_set_get_includes() and use it in registry test
Michael
2008-04-10 01:28:59 +02:00
Michael Adam
828c729724 libsmbconf: testsuite: refactor printing of string lists out.
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
31e68cbe5b libsmbconf: testsuite: test get_includes for registry backend
Michael
2008-04-10 01:28:59 +02:00
Michael Adam
2a4b71b105 libsmbconf: testsuite: use the get_global_includes in get_includes test.
Michael
2008-04-10 01:28:58 +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
1ca5afe58c libsmbconf: testsuite: add test for "get_includes" and use it in the text backend test.
Michael
2008-04-10 01:28:58 +02:00
Michael Adam
5e253e10b7 libsmbconf: fill get_includes() in text backed to retrieve includes from cache.
Michael
2008-04-10 01:28:58 +02:00
Michael Adam
7cfec55ed4 libsmbconf: testsuite: set the debufg fd to stderr.
...so that we see some debug output

Michael
2008-04-10 01:28:58 +02:00