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

378 Commits

Author SHA1 Message Date
Michael Adam
167d54cc67 registry: use regdb_fetch_key_internal() in regdb_fetch_values().
Michael
(This used to be commit 3316541ac9)
2008-04-30 12:42:32 +02:00
Michael Adam
6b4ed4b8f3 registry: use regdb_fetch_key_internal() in regdb_fetch_keys().
Michael
(This used to be commit 78f924ca05)
2008-04-30 12:42:32 +02:00
Michael Adam
5379dda0cd registry: add a function for fetching a tdb record for a given keystring
regdb_fetch_key_internal()

Michael
(This used to be commit 97bed9a236)
2008-04-30 12:42:32 +02:00
Michael Adam
411ae73283 registry: combine talloc_strdup() and normalize_reg_path() in regdb_fetch_keys().
the talloc_strdup() call is just and extra allocation here.

Michael
(This used to be commit 217233349b)
2008-04-30 12:42:32 +02:00
Michael Adam
dba75c0831 registry: use normalize_reg_path() in regdb_fetch_keys()
instead of handcrafting normalization.

Michael
(This used to be commit 1e4d2310d0)
2008-04-30 12:42:31 +02:00
Michael Adam
caba2d3a64 registry: use dbwrap_fetch_bystring() in regdb_fetch_values().
Michael
(This used to be commit 569f9844e9)
2008-04-30 12:42:31 +02:00
Michael Adam
9d933dedf9 registry: use dbwrap_fetch_bystring() in regdb_fetch_keys().
instead of using regdb->fetch and constructing tdb data
from the registry key string by hand.

Michael
(This used to be commit 87a58140f0)
2008-04-30 12:42:31 +02: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
86d189dad1 registry: honour the WERROR that regsubkey_ctr_addkey gives in regdb_fetch_keys.
Michael
(This used to be commit 7dd7471da7)
2008-04-13 15:41:07 +02:00
Michael Adam
a9ff941f41 registry: rename init_registry() to registry_init_full() for consistency.
Michael
(This used to be commit 14d82708d4)
2008-04-13 15:33:48 +02:00
Michael Adam
281e610ff3 registry: change init_registry() to return WERROR instead of bool.
Michael
(This used to be commit 0b196095db)
2008-04-13 15:33:48 +02:00
Michael Adam
6c66d5d019 registry: change registry_init_smbconf() to return WERROR instead of bool
Michael
(This used to be commit 7c343c6057)
2008-04-13 15:33:48 +02:00
Michael Adam
4ae2e8c7ba registry: refactor common part of registry initialization out.
into a new function registry_init_common().

Michael
(This used to be commit 5da52b95ac)
2008-04-13 15:33:48 +02:00
Michael Adam
3f01e05a77 registry: change registry_init_basic() to return WERROR instead of bool
Michael
(This used to be commit 6a31e659cb)
2008-04-13 15:33:48 +02:00
Michael Adam
80b6d7b1d6 registry: change reghook_cache_add() to return WERROR instead of bool
Michael
(This used to be commit e65a999989)
2008-04-13 15:33:48 +02:00
Michael Adam
5166d562ea registry cachehook: change helper function keyname_to_path() to return WERROR.
Michael
(This used to be commit 78bb005ee4)
2008-04-13 15:33:47 +02:00
Michael Adam
01f4bd4f4d adt_tree: change pathtree_add to return WERR instead of bool.
Michael
(This used to be commit da45fb92f6)
2008-04-13 15:33:47 +02:00
Michael Adam
84c5da2ff4 registry cachehook: revert logic to make fast path more obvious and reduce indent.
Michael
(This used to be commit e97d558c56)
2008-04-13 15:33:47 +02:00
Michael Adam
4b4306eb4a registry: change reghook_cache_init() to return WERROR and use it in the callers.
Michael
(This used to be commit 2f4ca62dce)
2008-04-13 15:33:47 +02:00
Michael Adam
2ffe46e24d registry cachehook: compare cache_tree against NULL, not 0.
Michael
(This used to be commit 4bfc0be55f)
2008-04-13 15:33:47 +02:00
Michael Adam
26a5652f6d registry: change init_registry_key() and init_registry_data() to return WERR
Michael
(This used to be commit e0718f04a7)
2008-04-13 15:33:47 +02:00
Michael Adam
cb624c4057 registry: unify debug output in the registry init functions.
Michael
(This used to be commit 4fd9b45ffc)
2008-04-13 15:33:47 +02:00
Michael Adam
6b85938f27 registry: change regdb_init() to return WERROR instead of bool.
Michael
(This used to be commit c312852abc)
2008-04-13 15:33:47 +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 8fe1a2f567)
2008-04-13 15:33:47 +02:00
Michael Adam
b5a75ec402 registry cachehook: add talloc failed debug messages.
Michael
(This used to be commit 9841ee7fd4)
2008-04-13 01:47:16 +02:00
Michael Adam
a721f0a729 registry cachehook: eliminate a couple trailing spaces (empty lines).
Michael
(This used to be commit c9f01aee37)
2008-04-13 01:44:57 +02:00
Michael Adam
0fa8845fa0 registry cachehook: fix memleak (to talloc_tos()): free key at the end.
Michael
(This used to be commit 3f5955d361)
2008-04-13 01:43:43 +02:00
Michael Adam
227904434a registry cachehook: refactor normalization of keyname out.
Michael
(This used to be commit acb9c98dff)
2008-04-13 01:43:42 +02:00
Michael Adam
bbca983507 registry: adapt copied function header comments.
Michael
(This used to be commit 2e762be0db)
2008-04-13 01:43:42 +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
c890aef164 registry: move normalize_dbkey() from lib/util_reg.c to registry/reg_util.c
This function is only used inside registry code.

Michael
(This used to be commit 48745e3fbd)
2008-04-12 02:41:20 +02:00
Michael Adam
2830626877 registry: remove parameter checks from smbconf backend: they are in libsmbconf.
Michael
(This used to be commit 118cf38133)
2008-04-03 15:43:04 +02:00
Volker Lendecke
16198dc51e Convert dbwrap_trans_delete to NTSTATUS
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit dead193f46)
2008-04-01 14:04:22 +02:00
Volker Lendecke
fcdfff1cc8 Convert dbwrap_trans_store to NTSTATUS
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit 5f4de856af)
2008-04-01 14:04:22 +02:00
Stefan Metzmacher
b8dcade819 regdb: let regdb_fetch_keys() handle NULL and failure cases in the same way and return -1
metze
(This used to be commit 983fd58805)
2008-04-01 14:04:20 +02:00
Stefan Metzmacher
b55942a763 regdb: get the seqnum before the record, to not miss something
metze
(This used to be commit c214107bd9)
2008-04-01 14:04:20 +02:00
Stefan Metzmacher
2b21b02c6a regdb: use dbwrap->fetch() instead of fetch_locked() for readonly access"
This is the fixed version of commit 5c28c74aa0.

metze
(This used to be commit 924acd7f69)
2008-04-01 14:04:20 +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
ce0bbc82fd Revert "regdb: use dbwrap->fetch() instead of fetch_locked() for readonly access"
This reverts commit 4e2be189e9.

Metze, this broke the registry (reg_api layer), but I don't yet know
exactly how and why. By the way, the locks there had the purpose of
fetching the seqnum that really matches the data.

This needs some more thought / debugging. But I wanted to have
the tree in a working state again.

Michael
(This used to be commit 5c28c74aa0)
2008-03-30 03:05:34 +02:00
Michael Adam
f8fdc36fdb regdb: use == 0 (instead of != -1) as indicator for success of dbwrap_trans_[delete|store]()
Michael
(This used to be commit 7dcd0c1e53)
2008-03-27 18:14:57 +01:00
Michael Adam
c86d10ae83 regdb: use != 0 instead of == -1 check for transaction_[commit|cancel]
Michael
(This used to be commit b6ceeaabae)
2008-03-27 18:14:57 +01:00
Stefan Metzmacher
5439f5f710 regdb: use db_open_trans()
metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit a77b5b91dd)
2008-03-27 18:14:56 +01:00
Stefan Metzmacher
618f22409a regdb: use regdb->transaction_start(regdb) != 0 consistent
metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit 093c3bced9)
2008-03-27 18:14:56 +01:00
Stefan Metzmacher
2a95f3f874 regdb: use dbwrap->fetch() instead of fetch_locked() for readonly access
metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit 4e2be189e9)
2008-03-27 18:14:56 +01:00
Stefan Metzmacher
d9de61341c regdb: use dbwrap_trans_store_int32
metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit 9620696083)
2008-03-27 18:14:56 +01:00
Volker Lendecke
fac2d8546b Fix Coverity ID 471
(This used to be commit d3b6df67fe)
2008-03-23 18:28:24 +01:00
Volker Lendecke
2e2f1d57b1 Fix Coverity ID 477
(This used to be commit f17b1b0fc6)
2008-03-23 18:28:24 +01:00
Volker Lendecke
988cffe9ca Fix Coverity ID 478
(This used to be commit 5f77938dc4)
2008-03-23 18:28:23 +01:00
Michael Adam
178c430821 registry: add reg_init_basic() - init registry with only the db backend.
Michael
(This used to be commit 1831042bdc)
2008-03-22 02:05:53 +01:00
Michael Adam
4825cef8bc registry: close registry in exit path in registry_init_smbconf().
Michael
(This used to be commit 5aa3141bff)
2008-03-22 01:54:18 +01:00