1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-28 17:47:29 +03:00

371 Commits

Author SHA1 Message Date
Michael Adam
c2d9baa29e registry: honour the WERROR that regsubkey_ctr_addkey gives us in reg_load_tree.
Michael
2008-04-13 15:45:33 +02:00
Michael Adam
7dd7471da7 registry: honour the WERROR that regsubkey_ctr_addkey gives in regdb_fetch_keys.
Michael
2008-04-13 15:41:07 +02:00
Michael Adam
14d82708d4 registry: rename init_registry() to registry_init_full() for consistency.
Michael
2008-04-13 15:33:48 +02:00
Michael Adam
0b196095db registry: change init_registry() to return WERROR instead of bool.
Michael
2008-04-13 15:33:48 +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
5da52b95ac registry: refactor common part of registry initialization out.
into a new function registry_init_common().

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

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

metze
2008-04-01 14:04:20 +02:00
Michael Adam
04b48984bb registry: reg_deletevalue should return error, when the value does not exist.
Michael
2008-03-31 17:22:02 +02:00
Michael Adam
5c28c74aa0 Revert "regdb: use dbwrap->fetch() instead of fetch_locked() for readonly access"
This reverts commit 4e2be189e97f653b75bd88135a631ce0f42db267.

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
2008-03-30 03:05:34 +02:00
Michael Adam
7dcd0c1e53 regdb: use == 0 (instead of != -1) as indicator for success of dbwrap_trans_[delete|store]()
Michael
2008-03-27 18:14:57 +01:00
Michael Adam
b6ceeaabae regdb: use != 0 instead of == -1 check for transaction_[commit|cancel]
Michael
2008-03-27 18:14:57 +01:00
Stefan Metzmacher
a77b5b91dd regdb: use db_open_trans()
metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-03-27 18:14:56 +01:00
Stefan Metzmacher
093c3bced9 regdb: use regdb->transaction_start(regdb) != 0 consistent
metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-03-27 18:14:56 +01:00
Stefan Metzmacher
4e2be189e9 regdb: use dbwrap->fetch() instead of fetch_locked() for readonly access
metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-03-27 18:14:56 +01:00
Stefan Metzmacher
9620696083 regdb: use dbwrap_trans_store_int32
metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-03-27 18:14:56 +01:00
Volker Lendecke
d3b6df67fe Fix Coverity ID 471 2008-03-23 18:28:24 +01:00
Volker Lendecke
f17b1b0fc6 Fix Coverity ID 477 2008-03-23 18:28:24 +01:00
Volker Lendecke
5f77938dc4 Fix Coverity ID 478 2008-03-23 18:28:23 +01:00
Michael Adam
1831042bdc registry: add reg_init_basic() - init registry with only the db backend.
Michael
2008-03-22 02:05:53 +01:00
Michael Adam
5aa3141bff registry: close registry in exit path in registry_init_smbconf().
Michael
2008-03-22 01:54:18 +01:00
Michael Adam
f33095e44b registry: some whitespace cleanup in init_registry().
Michael
2008-03-22 01:53:44 +01:00
Michael Adam
81993db828 registry: remove unneeded talloc stackframe variable.
Michael
2008-03-22 01:52:03 +01:00
Michael Adam
73b325fe7a registry: close regdb in error path (and use it) in init_registry().
Michael
2008-03-22 01:49:21 +01: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
Volker Lendecke
c9add4d59a Fix Coverity ID 506 2008-03-21 11:48:09 +01:00
Michael Adam
6bac03a2ec registry: use available string constant in debug statement.
Michael
2008-03-20 15:01:52 +01:00
Michael Adam
27d67365ad registry: in regdb_init, not only complain about INFO/version, store it...
Michael
2008-03-20 15:01:52 +01:00