1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

72 Commits

Author SHA1 Message Date
Günther Deschner
f9f8007361 s3-build: only use ndr_security.h where needed.
Guenther
2010-05-31 11:32:37 +02:00
Michael Adam
0fe1ff99a1 s3:registry: move reg_objects.h to registry/ and use it only where needed
Every place outside of registry/ where this is used, should probably
be changed to use pure reg_api.c code.
2010-05-25 10:35:31 +02:00
Michael Adam
0d20053f10 s3:registry: use regval_ctr/blob accessor functions in reg_api.c 2010-05-25 10:35:28 +02:00
Michael Adam
e829b42978 s3:registry: extract registry_pull/push_value prototypes into own header
reg_util_marshalling.h and use them only where needed.
2010-05-25 10:35:27 +02:00
Michael Adam
773255ba50 s3:registry: rename reg_util.{c,h} to reg_util_internal.{c,h} 2010-05-25 10:35:27 +02:00
Michael Adam
b94267aa3f s3:registry: extraxt the reg_dispatcher prototypes into their own header.
And use them only where needed.
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
Michael Adam
9ccf66379a s3:registry: adapt callers of regval_ctr_addvalue to uint8 * instead of char * 2010-05-25 10:35:25 +02:00
Michael Adam
4ae77b2ef9 s3:registry: extract the reg_util prototypes into their own header.
And use them only where needed.
2010-05-25 10:35:25 +02:00
Michael Adam
14a025062e s3:registry: extract the reg_cachehook prototypes into their own header.
And use them only where necessary.
2010-05-25 10:35:24 +02:00
Günther Deschner
7f6bb48bdf s3-secdesc: remove "typedef struct security_descriptor SEC_DESC".
Guenther
2010-05-18 12:30:12 +02:00
Jelmer Vernooij
b8268cf7b0 s3: Remove use of iconv_convenience. 2010-05-18 11:45:31 +02:00
Günther Deschner
fe31b67d5e s3-registry: only include registry headers when really needed.
Guenther
2010-05-18 01:15:38 +02:00
Volker Lendecke
5552b44960 s3: Fix some nonempty blank lines 2010-02-07 12:29:25 +01:00
Michael Adam
e935d8616b s3:registry: replace typedef REGISTRY_OPS by struct registry_ops
Michael
2009-04-27 11:21:04 +02:00
Michael Adam
cec8428747 s3:registry: replace typedef REGISTRY_KEY by struct registry_key_handle
Michael
2009-04-27 11:21:04 +02:00
Michael Adam
221151a2a2 s3:registry: replace typedef REGVAL_CTR by struct regval_ctr.
This paves the way for hiding the typedef and the implementation
from the surface.

Michael
2009-04-27 11:21:02 +02:00
Günther Deschner
38264bb3b8 s3-secdesc: move all winreg access bits to IDL.
Guenther
2009-04-21 12:42:51 +02:00
Michael Adam
8c023fea86 s3:registry: Prevent creation of keys containing the '/' character.
This creates a broken registry that can only be fixed with
tdbtool, since the '/' sign is used as a key separator after
normalization at a lower level.

This makes e.g. "net conf setparm abc/def comment xyz" fail with
WERR_INVALID_PARAM, which is much more desirable than a broken
registry.tdb.

Michael
2009-04-17 11:46:14 +02:00
Michael Adam
2f4b821320 s3:registry: tighten the subkey loop in reg_deletekey_recursive()
and loop from the end to the beginning so that we don't need
to rehash the subkeys...

This gets "net conf drop" with 2000 shares down to 14 seconds
on my box.

Michael
2009-02-26 13:22:56 +01:00
Michael Adam
270ab5544b s3:registry: use delete_reg_subkey() in reg_deletekey()
This further speeds up net conf drop.

Michael
2009-02-26 13:22:55 +01:00
Michael Adam
741e902888 s3:registry: streamline reg_deletekey() somewhat.
use W_ERROR_... macros and separate assignments from checks

Michael
2009-02-26 13:22:55 +01:00
Michael Adam
4b444e4ac4 s3:registry: use create_reg_subkey() in reg_createkey().
Instead of calling store_reg_keys()

On my box, importing 2000 shares into an empty smbconf key
now takes some 32 seconds.

Michael
2009-02-26 13:22:55 +01:00
Michael Adam
0b22f8b99c s3:registry: hash the list of subkeys in the regsubkey_ctr
This removes many loops over all the arrays
(from regsubkey_ctr_key_exists) and thus
reduces "net conf drop" from 1m55 to 48seconds
and "net conf import" from 1m55 to 58 seconds
for 2000 shares on my box.

Michael
2009-02-26 13:22:54 +01:00
Michael Adam
ea2b74090d s3:registry: use regsubkey_ctr_init() in reg_api.c
instead of using talloc on struct regsubkey_ctr.

Michael
2009-02-26 13:22:52 +01:00
Michael Adam
8c1e4034fe s3:registry: don't directly access key->subkeys->subkeys[] in reg_api.c
Use the reg_objects accessor regsubkey_ctr_specific_key() instead.

Michael
2009-02-26 13:22:51 +01:00
Michael Adam
e05b7a8627 s3:registry: don't directly access key->subkeys->num_subkeys in reg_api.c
Use the reg_objects api instead.

Michael
2009-02-26 13:22:51 +01:00
Michael Adam
58fc61217d s3:registry: replace typedef "REGSUBKEY_CTR" by "struct regsubkey_ctr"
This paves the way for hiding the typedef and the implementation from the
surface.

Michael
2009-02-26 13:22:51 +01:00
Michael Adam
9f97674ef7 s3:registry: wrap deletekey_recursive in one big transaction.
This speeds up "net conf drop" with 2000 shares on my box from
4m40s to 1m50s, leaving virtually only cpu load.

Michael
2009-02-26 11:05:23 +01:00
Jelmer Vernooij
08259c1c52 Add iconv_convenience argument to size functions. 2009-01-01 04:45:33 +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
282c9ff8ae registry: honour the WERROR that regsubkey_ctr_addkey gives us in reg_load_tree.
Michael
(This used to be commit c2d9baa29e)
2008-04-13 15:45:33 +02:00
Michael Adam
413c2e9b0a registry: remove the REGISTRY_HOOKS layer from the reghook cache.
There is no need to save the keyname again, we only need to
get the REGISTRY_OPS out of the pathtree.

Furthermore, this makes life easier, since we can now pass
in keynames as temporarily allocated strings.

Michael
(This used to be commit 2f9ee2f782)
2008-04-13 01:43:42 +02:00
Michael Adam
0bf8ba9f26 registry: reg_deletevalue should return error, when the value does not exist.
Michael
(This used to be commit 04b48984bb)
2008-03-31 17:22:02 +02:00
Michael Adam
bb0bf5c902 Remove (now) unused function make_default_reg_sd().
Michael
(This used to be commit 2c66413de2)
2008-02-18 17:41:21 +01:00
Michael Adam
7ba906634b Grab secdesc for key from registry for reg_savekey()
instead of construction another default secdesc.

Michael
(This used to be commit 194e00822c)
2008-02-18 17:41:21 +01:00
Michael Adam
abdedc7940 Reformat copied reg_savekey/reg_restorekey code.
Sticking to coding rules.

Michael
(This used to be commit 2c54ef2d07)
2008-02-15 17:32:32 +01:00
Michael Adam
355faf2e3d Move the implementation of _winreg_RestoreKey to reg_api.c
This removes the internals of reg_api from srv_winreg_nt.c entirely,
only reg_api is used there, now. This enlarges the dependencies of
reg_api somewhat now since it adds regfio. But this can be separated
out later. The current goal is to achieve a complete use of reg_api.

Michael
(This used to be commit 2222acbac9)
2008-02-15 16:23:10 +01:00
Michael Adam
c720a0e228 Move implementation of _winreg_SaveKey() from srv_winreg_nt.c to reg_api.c
This gives a new function reg_savekey() and hides a piece of
the backend code from srv_winreg_nt.c. One step towards using
reg_api throughout samba code.

Michael
(This used to be commit bf6340d00d)
2008-02-15 16:23:10 +01:00
Michael Adam
8fffca2e95 Adapt a comment to current circumstances.
Michael
(This used to be commit 84ec89ab9f)
2008-02-15 16:23:10 +01:00
Volker Lendecke
33f3eeaa00 Fix some "set but never used" warnings
(This used to be commit 4a6dadc517)
2008-01-20 17:44:40 +01:00
Michael Adam
1ea809383e Fix typo in debug message.
Michael
(This used to be commit d7a8d7ffbd)
2008-01-18 09:40:57 +01:00
Michael Adam
32a8e74078 Add a reg_getversion() function to reg_api and use it in srv_winreg_nt.c.
Michael
(This used to be commit 903223b160)
2008-01-17 16:25:11 +01:00
Michael Adam
7f8e4bc68e Add my (C) to reg_api.c - Michael
(This used to be commit 81d6a1fbed)
2008-01-17 16:25:11 +01:00
Michael Adam
138f7ec451 Add a comment header comparing winreg.idl and reg_api.c.
Michael
(This used to be commit 15163926a8)
2008-01-17 16:25:11 +01:00
Michael Adam
da4ecfc0fa Add reg_api functions reg_getkeysecurity() and reg_setkeysecurity().
These are wrappers around the lower level functions regkey_get_secdesc()
and regkey_set_secdesc(). Next step towards hiding reg_frontend from
the surface.

Michael
(This used to be commit 7251a24b48)
2008-01-17 16:25:11 +01:00
Michael Adam
fcb47f5ea9 Comment out unused reg_create_path() and reg_delete_path().
These functions are unused. Comment them out for now.

Michael
(This used to be commit 0cb8399d7c)
2008-01-17 16:25:11 +01:00
Michael Adam
99b195a6aa Move reg_create_path() and reg_delete_path() to reg_api.c
Michael
(This used to be commit 4d82cc586c)
2008-01-17 16:25:11 +01:00
Michael Adam
b6eaf05479 Add some sectioning comments to reg_api.c
Michael
(This used to be commit d3c9c27374)
2008-01-17 16:25:11 +01:00
Michael Adam
1a15320dcd Make utility function reg_deletekey_recursive_internal() static.
Michael
(This used to be commit 3e66127322)
2008-01-17 16:25:11 +01:00