1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-17 02:05:21 +03:00

55 Commits

Author SHA1 Message Date
Michael Adam
0f7e503d21 s3:registry: move higher level function reg_open_path to new module reg_api_util
The reg_api.c code should just export functions that direclty relate to winreg
api calls.
2010-09-20 19:58:01 +02:00
Andrew Bartlett
4bfc8d3b1a s3-auth Change struct nt_user_token -> struct security_token
This common structure is defined in security.idl

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:05 +10:00
Günther Deschner
b381fba089 s3-registry: avoid using registry_value union.
Just pull and push data as is.

Guenther
2010-07-02 10:50:21 +02:00
Michael Adam
f3053739b7 s3:registry: move prototype registry_create_admin_token() to new header reg_util_token.h
and use it only where necessary.
2010-05-25 10:35:26 +02:00
Michael Adam
d335f292ce s3:registry: extract the reg_backend_db prototypes into their own header.
And use them only where needed.
2010-05-25 10:35:25 +02:00
Günther Deschner
e9f5bdf6b5 smbconf: only include smbconf headers where needed.
Guenther
2010-05-18 10:36:33 +02:00
Günther Deschner
fe31b67d5e s3-registry: only include registry headers when really needed.
Guenther
2010-05-18 01:15:38 +02:00
Michael Adam
65527216f1 s3:libsmbconf: fix a comment typo
Michael
2009-04-27 13:25:07 +02:00
Günther Deschner
38264bb3b8 s3-secdesc: move all winreg access bits to IDL.
Guenther
2009-04-21 12:42:51 +02:00
Karolin Seeger
6343cab308 s3/smbconf_reg: Fix typo.
Karolin
2009-04-07 20:05:21 +02:00
Michael Adam
9d798494a9 s3:smbconf: move smbconf_share_exists checks into backend
Michael
2009-03-04 22:49:24 +01:00
Michael Adam
bd121b532c s3:libsmbconf: add transactions to the libsmbconf api
This is useful for wrapping higher level aggregate operations
in transactions. The text backend implementations just return
WERR_OK, the registry backend implementatoins use the
regdb_transaction_start|commit|cancel routines just added.

Michael
2009-02-26 11:05:23 +01:00
Volker Lendecke
16f61a6f90 Speed up "net conf list"
For 1000 shares this speeds up net conf list from .6 to .25 seconds on my box

Signed-off-by: Michael Adam <obnox@samba.org>
2009-02-26 11:05:21 +01:00
Volker Lendecke
26f238466c Speed up "net conf list"
With 1000 shares in the registry, this changed the time of "net conf list" from
1.1 seconds to .6 seconds.

Signed-off-by: Michael Adam <obnox@samba.org>
2009-02-26 11:05:21 +01:00
Michael Adam
85447ac747 s3:libsmbconf: include smbconf headers with lib/smbconf prefix
Michael
2009-01-21 18:40:57 +01:00
Michael Adam
7ac06f1609 s3:libsmbconf: use talloc_free instead of TALLOC_FREE in reg backend
Michael
2009-01-21 18:40:57 +01:00
Jelmer Vernooij
ddcab787c4 Rename dos_errstr() to win_errstr() for consistency with Samba 4. 2008-11-01 17:19:26 +01:00
Michael Adam
3a06201086 [s3]libsmbconf: add method is_writeable() and wrapper smbconf_is_writeable()
This allows for per-config-source checking of write support.

Michael
2008-10-27 13:02:40 +01:00
Michael Adam
9299d53ef9 [s3]libsmbconf: add backend_requires_messaging() method to libsmbconf.
In a clustered environment, the registry backend needs messaging
to be set up since ctdb requires this.

Michael
2008-10-27 13:02:38 +01:00
Jelmer Vernooij
f9fb9436ae Use WERR_FILE_EXISTS which is the equivalent of WERR_ALREADY_EXISTS
previously present in Samba 3.
2008-10-23 15:37:39 +02:00
Michael Adam
1ef07a6686 libsmbconf: add "includes" to the forbidden_valnames[].
This removes the warning messages 'Unknown parameter encountered: "includes"'.

Michael
(This used to be commit b20019ceaaf4a8964792f6ba37f50f91b6847e7f)
2008-06-23 11:11:59 +02:00
Michael Adam
cb5f5eac38 libsmbconf: fastpaths first in smbconf_reg_valname_valid().
Before dropping into lp_parameter_is_valid().

Michael
(This used to be commit 59beb7acd777a4c224dce90fbbff7a137d2b89c1)
2008-06-23 11:11:59 +02:00
Volker Lendecke
82e36e083d 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.
(This used to be commit 727127f1dcd49b31b5a48cc3f9314aa2380d60e1)
2008-04-23 11:12:25 +02:00
Michael Adam
21e82d7afc libsmbconf: remove unnecessary talloc success checks from smbconf_reg.c
talloc_stackframe panics on NOMEM.

Michael
(This used to be commit 03fd30eef803ff2718e7af618d38944d56ccd329)
2008-04-23 01:48:26 +02:00
Michael Adam
fb9232c0a9 libsmbconf: rewrite API to use smbconf_service struct
instead of lists of strings and counters directly...

Michael
(This used to be commit 17415e2dc457ce41793a7e28e71f72c538c19c61)
2008-04-23 01:43:31 +02:00
Michael Adam
4a9e0e6034 libsmbconf: fix segfault in listing share names / config.
Discovered by Günther while giving a talk. - Sorry Günther!

Michael
(This used to be commit 518f4d4e6662138a2e71acc2296acedefc7c739a)
2008-04-16 22:44:04 +02:00
Michael Adam
bcaac7fa36 libmsbconf: add handling of NULL share parameters to registry backend.
Michael
(This used to be commit 6c1181fda2f040d9555917b10a65bc0dfc1f0593)
2008-04-15 17:40:28 +02:00
Michael Adam
611b6bfa3b libsmbconf: rename smbconf_init() to smbconf_init_internal().
smbconf_init should be the name of the dispatcher (to be written)

Michael
(This used to be commit 3fb95ab757650712716472ebaccb7119feb27596)
2008-04-13 20:04:43 +02:00
Michael Adam
6c66d5d019 registry: change registry_init_smbconf() to return WERROR instead of bool
Michael
(This used to be commit 7c343c60574cda091f59861fbcb2893aefb564e9)
2008-04-13 15:33:48 +02:00
Michael Adam
bcb19766d6 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
(This used to be commit 8fe1a2f567afbecbe487f08825cb43b038065e99)
2008-04-13 15:33:47 +02:00
Michael Adam
30fedf2855 libsmbconf: return success and count 0 from get_includes when no includes present.
Michael
(This used to be commit 182433be5bae753d264491a3ec97433e2e316d10)
2008-04-10 01:29:01 +02:00
Michael Adam
87ca447231 libsmbconf: add delete_includes mehtod to the api (and backend implementations)
Michael
(This used to be commit daef50e54d58a6684b6a890ebf523ca6245f0290)
2008-04-10 01:29:01 +02:00
Michael Adam
1321dda51b libsmbconf: let set_includes delete the includes paramter when given an empty list
instead of complaining

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

Michael
(This used to be commit 5a880c6a2f2415220557a76a9b4ce9a17c766819)
2008-04-10 01:29:01 +02:00
Michael Adam
d26daa0234 libsmbconf: consider "include" a forbidden parameter in regisry config again.
It is now taken care of by the special includes handling.

Michael
(This used to be commit 2c8c65d6900086e92c838333b31abf9efdb61343)
2008-04-10 01:29:00 +02:00
Michael Adam
7bf407c711 libsmbconf: add includes at the end of parameter list in reg_get_share().
Michael
(This used to be commit 9bd06d5737aff2bb27c07575285e079fd561a566)
2008-04-10 01:29:00 +02:00
Michael Adam
bb39d5c14b libsmbconf: add function smbconf_reg_valname_valid() and use it in get_values()
so "includes" doesn't get listed as a parameter

Michael
(This used to be commit 01c4bd07305b4ce800b99a098652623f118a74aa)
2008-04-10 01:29:00 +02:00
Michael Adam
1da629537c libsmbconf: refactor get_includes on opened key into smbconf_reg_get_includes_internal()
Michael
(This used to be commit 072a3228a4e08894c67ad2983bcea3417e202773)
2008-04-10 01:29:00 +02:00
Michael Adam
a7e06ad625 libsmbconf: rename registry_smbconf_valname_forbidden() to smbconf_reg_valname_forbidden()
Michael
(This used to be commit 23fb33fd33a8287d8691a1a5e95bf160be3ed25c)
2008-04-10 01:29:00 +02:00
Michael Adam
b91cdf7183 libsmbconf: make registry_smbconf_valname_forbidden() static
Michael
(This used to be commit 798808174d0d4cae3a746e26a253cad1a3177684)
2008-04-10 01:29:00 +02:00
Michael Adam
e06e8084c6 libsmbconf: move registry_smbconf_valname_forbidden() to the registry backend
from util_reg.c - no other callers left

Michael
(This used to be commit 98151fd3e1c24e5c8aaf3f5132071e91ac6ef257)
2008-04-10 01:29:00 +02:00
Michael Adam
7f0127a903 libsmbconf: more sanely print multi_sz values in registry backend
Michael
(This used to be commit 382c623948abd1c6a5cf8ab7ee2be784fcef76ee)
2008-04-10 01:28:59 +02:00
Michael Adam
56c0f28a50 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
(This used to be commit 3fee0d79cc618adc7dd82cfeff62c72ef061017b)
2008-04-10 01:28:59 +02:00
Michael Adam
f5aac0a8d0 libsmbconf: add talloc context to the get_includes methods.
Michael
(This used to be commit ed535b6b30b5c9412803f6373eadc704de6de2f9)
2008-04-10 01:28:57 +02:00
Michael Adam
8e97662899 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
(This used to be commit e86eb375d9f83f73aeea0a16c8b43e2ef21a6e20)
2008-04-10 01:28:57 +02:00
Michael Adam
0acf338503 libsmbconf: reformat smbconf_format_registry_value() - indentations/tabs
Michael
(This used to be commit b79a33eb2f370b8d8b50ed5ed2a0acc83e711c1e)
2008-04-10 01:28:56 +02:00
Michael Adam
ec12f0a25a libsmbconf: untangle assignment and test in for-loop condition.
Michael
(This used to be commit 4339caff09e1277ae33d3810043bcb3f4e7c4e45)
2008-04-10 01:28:56 +02:00
Michael Adam
24c54ee4fb libsmbconf: move initialization of registry value down after error checks.
Michael
(This used to be commit 2a8029985f9bde4da8ca20bc24d937150eab444c)
2008-04-03 15:43:04 +02:00
Michael Adam
9ec7af58c6 registry: fix registry_init_smbconf() to close the registry at the end.
Michael
(This used to be commit f4d87fdbf266a36fbb50dae863ee0784165c2fe1)
2008-03-21 23:50:49 +01:00
Michael Adam
a81ed36e86 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
(This used to be commit 03e72e13076e3215eb8ae51cfb4e7cd3d3683d3e)
2008-03-21 23:43:52 +01:00