summaryrefslogtreecommitdiff
path: root/source3/libgpo
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-03-22 02:29:02 +0100
committerMichael Adam <obnox@samba.org>2008-03-22 02:29:40 +0100
commit5ea7faef3dd698a01481b8a9fd4fe05579fe8664 (patch)
tree4d83e82de375604a36a4e54557834b51ce4d664f /source3/libgpo
parent39067a5dbd627fdc3c5c94924154fa67bb468614 (diff)
downloadsamba-5ea7faef3dd698a01481b8a9fd4fe05579fe8664.tar.gz
samba-5ea7faef3dd698a01481b8a9fd4fe05579fe8664.tar.bz2
samba-5ea7faef3dd698a01481b8a9fd4fe05579fe8664.zip
libgpo: replace hand-crafted registry initialization by registry_init_basic.
IMO there is no need to imitate a custom registry backend. Only default regdb hooks are used here, so a plain initialization of regdb should suffice. This way, only reg_api is used in libgpo, and no registry backend code is visible. Michael (This used to be commit 10ae8accb486956ebb1638cee540868a11623b11)
Diffstat (limited to 'source3/libgpo')
-rw-r--r--source3/libgpo/gpo_reg.c60
1 files changed, 1 insertions, 59 deletions
diff --git a/source3/libgpo/gpo_reg.c b/source3/libgpo/gpo_reg.c
index e1edde135a..e48a8715d3 100644
--- a/source3/libgpo/gpo_reg.c
+++ b/source3/libgpo/gpo_reg.c
@@ -20,53 +20,6 @@
#include "includes.h"
-extern REGISTRY_OPS regdb_ops;
-
-static int gp_reg_fetch_keys(const char *key, REGSUBKEY_CTR *subkey_ctr)
-{
- return regdb_ops.fetch_subkeys(key, subkey_ctr);
-}
-
-static bool gp_reg_store_keys(const char *key, REGSUBKEY_CTR *subkeys)
-{
- return regdb_ops.store_subkeys(key, subkeys);
-}
-
-static int gp_reg_fetch_values(const char *key, REGVAL_CTR *val)
-{
- return regdb_ops.fetch_values(key, val);
-}
-
-static bool gp_reg_store_values(const char *key, REGVAL_CTR *val)
-{
- return regdb_ops.store_values(key, val);
-}
-
-static WERROR gp_reg_get_secdesc(TALLOC_CTX *mem_ctx, const char *key,
- struct security_descriptor **psecdesc)
-{
- return regdb_ops.get_secdesc(mem_ctx, key, psecdesc);
-}
-
-static WERROR gp_reg_set_secdesc(const char *key,
- struct security_descriptor *secdesc)
-{
- return regdb_ops.set_secdesc(key, secdesc);
-}
-
-/****************************************************************
-****************************************************************/
-
-static REGISTRY_OPS gp_reg_ops = {
- .fetch_subkeys = gp_reg_fetch_keys,
- .fetch_values = gp_reg_fetch_values,
- .store_subkeys = gp_reg_store_keys,
- .store_values = gp_reg_store_values,
-/* .reg_access_check = gp_reg_reg_access_check, */
- .get_secdesc = gp_reg_get_secdesc,
- .set_secdesc = gp_reg_set_secdesc
-};
-
/****************************************************************
****************************************************************/
@@ -101,24 +54,13 @@ WERROR gp_init_reg_ctx(TALLOC_CTX *mem_ctx,
struct gp_registry_context **reg_ctx)
{
struct gp_registry_context *tmp_ctx;
- static REGISTRY_HOOK gp_reg_hook;
WERROR werr;
if (!reg_ctx) {
return WERR_INVALID_PARAM;
}
- if (!regdb_init()) {
- return WERR_CAN_NOT_COMPLETE;
- }
-
- gp_reg_hook.keyname = initial_path; /* KEY_SAMBA_GROUP_POLICY */
- gp_reg_hook.ops = &gp_reg_ops;
-
- /* not sure about the cache hook */
- reghook_cache_init();
-
- if (!reghook_cache_add(&gp_reg_hook)) {
+ if (!registry_init_basic()) {
return WERR_CAN_NOT_COMPLETE;
}