s3:registry: replace typedef REGISTRY_OPS by struct registry_ops
authorMichael Adam <obnox@samba.org>
Mon, 23 Mar 2009 22:14:45 +0000 (23:14 +0100)
committerMichael Adam <obnox@samba.org>
Mon, 27 Apr 2009 09:21:04 +0000 (11:21 +0200)
Michael

17 files changed:
source3/include/proto.h
source3/include/reg_objects.h
source3/lib/util_reg.c
source3/registry/reg_api.c
source3/registry/reg_backend_current_version.c
source3/registry/reg_backend_db.c
source3/registry/reg_backend_hkpt_params.c
source3/registry/reg_backend_netlogon_params.c
source3/registry/reg_backend_perflib.c
source3/registry/reg_backend_printing.c
source3/registry/reg_backend_prod_options.c
source3/registry/reg_backend_shares.c
source3/registry/reg_backend_smbconf.c
source3/registry/reg_backend_tcpip_params.c
source3/registry/reg_cachehook.c
source3/registry/reg_init_full.c
source3/registry/reg_init_smbconf.c

index 83436a370ef575c60215f1f15c332e372db57188..101831577f8cfc5d4762da178d7f47d0455bd07a 100644 (file)
@@ -4853,8 +4853,8 @@ bool regdb_values_need_update(struct regval_ctr *values);
 /* The following definitions come from registry/reg_cachehook.c  */
 
 WERROR reghook_cache_init(void);
-WERROR reghook_cache_add(const char *keyname, REGISTRY_OPS *ops);
-REGISTRY_OPS *reghook_cache_find(const char *keyname);
+WERROR reghook_cache_add(const char *keyname, struct registry_ops *ops);
+struct registry_ops *reghook_cache_find(const char *keyname);
 void reghook_dump_cache( int debuglevel );
 
 /* The following definitions come from registry/reg_dispatcher.c  */
index 5a4f516402579a1ae1e82391004e8c8432a30148..8d220ebdf5823e0c27885894809fb2ee43d82649 100644 (file)
@@ -126,7 +126,7 @@ struct regsubkey_ctr;
  * for virtual registry view 
  */ 
  
-typedef struct {
+struct registry_ops {
        /* functions for enumerating subkeys and values */      
        int     (*fetch_subkeys)( const char *key, struct regsubkey_ctr *subkeys);
        int     (*fetch_values) ( const char *key, struct regval_ctr *val );
@@ -143,11 +143,11 @@ typedef struct {
                              struct security_descriptor *sec_desc);
        bool    (*subkeys_need_update)(struct regsubkey_ctr *subkeys);
        bool    (*values_need_update)(struct regval_ctr *values);
-} REGISTRY_OPS;
+};
 
 struct registry_hook {
        const char      *keyname;       /* full path to name of key */
-       REGISTRY_OPS    *ops;           /* registry function hooks */
+       struct registry_ops     *ops;   /* registry function hooks */
 };
 
 
@@ -157,7 +157,7 @@ struct registry_key_handle {
        uint32          type;
        char            *name;          /* full name of registry key */
        uint32          access_granted;
-       REGISTRY_OPS    *ops;
+       struct registry_ops     *ops;
 };
 
 struct registry_key {
index 96717e33d331cfd1308b4f7e917394fe2bb4706a..1e1bcfeb10336fb2fc70d6aa2567b7504329d14d 100644 (file)
@@ -22,7 +22,7 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
 
-extern REGISTRY_OPS smbconf_reg_ops;
+extern struct registry_ops smbconf_reg_ops;
 
 const char *reg_type_lookup(enum winreg_Type type)
 {
index 6dfda13e33850edfbf0c21367b1adad0b0b394bc..9aff4b05ca8277e97cfe4caf5651ce5288678ba9 100644 (file)
@@ -187,7 +187,7 @@ static WERROR regkey_open_onelevel(TALLOC_CTX *mem_ctx,
 
        if ( !(key->ops = reghook_cache_find( key->name )) ) {
                DEBUG(0,("reg_open_onelevel: Failed to assign "
-                        "REGISTRY_OPS to [%s]\n", key->name ));
+                        "registry_ops to [%s]\n", key->name ));
                result = WERR_BADFILE;
                goto done;
        }
@@ -721,7 +721,7 @@ static WERROR reg_load_tree(REGF_FILE *regfile, const char *topkeypath,
 
        registry_key.ops = reghook_cache_find(topkeypath);
        if (!registry_key.ops) {
-               DEBUG(0, ("reg_load_tree: Failed to assign  REGISTRY_OPS "
+               DEBUG(0, ("reg_load_tree: Failed to assign registry_ops "
                          "to [%s]\n", topkeypath));
                return WERR_BADFILE;
        }
index c1b321105317b5a7bc49ec38e9032ad6f9a5758d..1a3b2819a68a9c818282047050692db3a7f0e996 100644 (file)
@@ -29,7 +29,7 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
 
-extern REGISTRY_OPS regdb_ops;
+extern struct registry_ops regdb_ops;
 
 #define KEY_CURRENT_VERSION_NORM "HKLM/SOFTWARE/MICROSOFT/WINDOWS NT/CURRENTVERSION"
 
@@ -75,7 +75,7 @@ static int current_version_fetch_subkeys(const char *key,
        return regdb_ops.fetch_subkeys(key, subkey_ctr);
 }
 
-REGISTRY_OPS current_version_reg_ops = {
+struct registry_ops current_version_reg_ops = {
        .fetch_values = current_version_fetch_values,
        .fetch_subkeys = current_version_fetch_subkeys,
 };
index 5229f154acf7187472870993e822af6bafe942f1..e296d319e29cb75e56d6c3c7c5cfc3c9795119a3 100644 (file)
@@ -1667,7 +1667,7 @@ bool regdb_values_need_update(struct regval_ctr *values)
  * Table of function pointers for default access
  */
  
-REGISTRY_OPS regdb_ops = {
+struct registry_ops regdb_ops = {
        .fetch_subkeys = regdb_fetch_keys,
        .fetch_values = regdb_fetch_values,
        .store_subkeys = regdb_store_keys,
index 565198df4b2661c73620eebcd0707fcb1b9c189a..ca37b5952265ae3c7d9b4857e78ee3f10aa65c36 100644 (file)
@@ -29,7 +29,7 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
 
-extern REGISTRY_OPS regdb_ops;
+extern struct registry_ops regdb_ops;
 
 static int hkpt_params_fetch_values(const char *key, struct regval_ctr *regvals)
 {
@@ -64,7 +64,7 @@ static int hkpt_params_fetch_subkeys(const char *key,
        return regdb_ops.fetch_subkeys(key, subkey_ctr);
 }
 
-REGISTRY_OPS hkpt_params_reg_ops = {
+struct registry_ops hkpt_params_reg_ops = {
        .fetch_values = hkpt_params_fetch_values,
        .fetch_subkeys = hkpt_params_fetch_subkeys,
 };
index 3d8a18c9f6f4f285c544692aa2fd2242d014424f..682c7fe9a57537401935621b62ecd78a50a6f90b 100644 (file)
@@ -29,7 +29,7 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
 
-extern REGISTRY_OPS regdb_ops;
+extern struct registry_ops regdb_ops;
 
 static int netlogon_params_fetch_values(const char *key, struct regval_ctr *regvals)
 {
@@ -51,7 +51,7 @@ static int netlogon_params_fetch_subkeys(const char *key,
        return regdb_ops.fetch_subkeys(key, subkey_ctr);
 }
 
-REGISTRY_OPS netlogon_params_reg_ops = {
+struct registry_ops netlogon_params_reg_ops = {
        .fetch_values = netlogon_params_fetch_values,
        .fetch_subkeys = netlogon_params_fetch_subkeys,
 };
index 3a098f3ba895895fb1cc28ec638aa93b9409c39a..54e6cfe92225465dbc4b0982f799b4ee634f02a9 100644 (file)
@@ -29,7 +29,7 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
 
-extern REGISTRY_OPS regdb_ops;
+extern struct registry_ops regdb_ops;
 
 #define KEY_PERFLIB_NORM       "HKLM/SOFTWARE/MICROSOFT/WINDOWS NT/CURRENTVERSION/PERFLIB"
 #define KEY_PERFLIB_009_NORM   "HKLM/SOFTWARE/MICROSOFT/WINDOWS NT/CURRENTVERSION/PERFLIB/009"
@@ -100,7 +100,7 @@ static int perflib_fetch_subkeys(const char *key,
        return regdb_ops.fetch_subkeys(key, subkey_ctr);
 }
 
-REGISTRY_OPS perflib_reg_ops = {
+struct registry_ops perflib_reg_ops = {
        .fetch_values = perflib_fetch_values,
        .fetch_subkeys = perflib_fetch_subkeys,
 };
index 0854d7d8fc5bbed517fad116a6d8066929566fe9..4465d2e2e1305213bab0dfb5549d9ac88f3fdec4 100644 (file)
@@ -1258,7 +1258,7 @@ static bool regprint_store_reg_values(const char *key, struct regval_ctr *values
  * Table of function pointers for accessing printing data
  */
 
-REGISTRY_OPS printing_ops = {
+struct registry_ops printing_ops = {
        .fetch_subkeys = regprint_fetch_reg_keys,
        .fetch_values = regprint_fetch_reg_values,
        .store_subkeys = regprint_store_reg_keys,
index dc6b987f9d814f21e622cb5d74056d970249cffa..cdc1f37e72829b370ac7fda0ee07e856700e968c 100644 (file)
@@ -29,7 +29,7 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
 
-extern REGISTRY_OPS regdb_ops;
+extern struct registry_ops regdb_ops;
 
 static int prod_options_fetch_values(const char *key, struct regval_ctr *regvals)
 {
@@ -64,7 +64,7 @@ static int prod_options_fetch_subkeys(const char *key,
        return regdb_ops.fetch_subkeys(key, subkey_ctr);
 }
 
-REGISTRY_OPS prod_options_reg_ops = {
+struct registry_ops prod_options_reg_ops = {
        .fetch_values = prod_options_fetch_values,
        .fetch_subkeys = prod_options_fetch_subkeys,
 };
index 562fd7b4ffafb9df07fc60a65f8e52b078dba73c..1977406049191df22615bdc9db21c652143c749a 100644 (file)
@@ -154,7 +154,7 @@ static bool shares_store_value(const char *key, struct regval_ctr *val)
  * Table of function pointers for accessing printing data
  */
  
-REGISTRY_OPS shares_reg_ops = {
+struct registry_ops shares_reg_ops = {
        .fetch_subkeys = shares_subkey_info,
        .fetch_values = shares_value_info,
        .store_subkeys = shares_store_subkey,
index e8ac967e44d4c078007954a44edf6635ac774708..15993438a9456957aafef772d9a0b058cdc3bbbf 100644 (file)
@@ -23,7 +23,7 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
 
-extern REGISTRY_OPS regdb_ops;         /* these are the default */
+extern struct registry_ops regdb_ops;          /* these are the default */
 
 static int smbconf_fetch_keys( const char *key, struct regsubkey_ctr *subkey_ctr )
 {
@@ -84,7 +84,7 @@ static WERROR smbconf_set_secdesc(const char *key,
  * Table of function pointers for accessing smb.conf data
  */
 
-REGISTRY_OPS smbconf_reg_ops = {
+struct registry_ops smbconf_reg_ops = {
        .fetch_subkeys = smbconf_fetch_keys,
        .fetch_values = smbconf_fetch_values,
        .store_subkeys = smbconf_store_keys,
index f5311b733c998ae79d4b56a0416e7c8b196892d5..30f7f719382b725ee63d2a38c31c4c99c766ec7c 100644 (file)
@@ -29,7 +29,7 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
 
-extern REGISTRY_OPS regdb_ops;
+extern struct registry_ops regdb_ops;
 
 static int tcpip_params_fetch_values(const char *key, struct regval_ctr *regvals)
 {
@@ -61,7 +61,7 @@ static int tcpip_params_fetch_subkeys(const char *key,
        return regdb_ops.fetch_subkeys(key, subkey_ctr);
 }
 
-REGISTRY_OPS tcpip_params_reg_ops = {
+struct registry_ops tcpip_params_reg_ops = {
        .fetch_values = tcpip_params_fetch_values,
        .fetch_subkeys = tcpip_params_fetch_subkeys,
 };
index 6697a69356b34d26cbb460b70b3a97f69fe28e46..4f84de52860370b70530a31bb3a824b0389cab7e 100644 (file)
@@ -26,7 +26,7 @@
 #define DBGC_CLASS DBGC_REGISTRY
 
 static SORTED_TREE *cache_tree = NULL;
-extern REGISTRY_OPS regdb_ops;         /* these are the default */
+extern struct registry_ops regdb_ops;          /* these are the default */
 
 static WERROR keyname_to_path(TALLOC_CTX *mem_ctx, const char *keyname,
                              char **path)
@@ -79,7 +79,7 @@ WERROR reghook_cache_init(void)
  is not in the exact format that a SORTED_TREE expects.
  *********************************************************************/
 
-WERROR reghook_cache_add(const char *keyname, REGISTRY_OPS *ops)
+WERROR reghook_cache_add(const char *keyname, struct registry_ops *ops)
 {
        WERROR werr;
        char *key = NULL;
@@ -107,11 +107,11 @@ done:
  Find a key in the cache.
  *********************************************************************/
 
-REGISTRY_OPS *reghook_cache_find(const char *keyname)
+struct registry_ops *reghook_cache_find(const char *keyname)
 {
        WERROR werr;
        char *key = NULL;
-       REGISTRY_OPS *ops = NULL;
+       struct registry_ops *ops = NULL;
 
        if (keyname == NULL) {
                return NULL;
@@ -124,7 +124,7 @@ REGISTRY_OPS *reghook_cache_find(const char *keyname)
 
        DEBUG(10,("reghook_cache_find: Searching for keyname [%s]\n", key));
 
-       ops = (REGISTRY_OPS *)pathtree_find(cache_tree, key);
+       ops = (struct registry_ops *)pathtree_find(cache_tree, key);
 
        DEBUG(10, ("reghook_cache_find: found ops %p for key [%s]\n",
                   ops ? (void *)ops : 0, key));
index 206dcd140bfe6268ca8fbc8b35729bba6d04280a..d05a74ef35227b5d51485a7cb06ed4f1d8e21569 100644 (file)
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
 
-extern REGISTRY_OPS printing_ops;
-extern REGISTRY_OPS eventlog_ops;
-extern REGISTRY_OPS shares_reg_ops;
-extern REGISTRY_OPS smbconf_reg_ops;
-extern REGISTRY_OPS netlogon_params_reg_ops;
-extern REGISTRY_OPS prod_options_reg_ops;
-extern REGISTRY_OPS tcpip_params_reg_ops;
-extern REGISTRY_OPS hkpt_params_reg_ops;
-extern REGISTRY_OPS current_version_reg_ops;
-extern REGISTRY_OPS perflib_reg_ops;
-extern REGISTRY_OPS regdb_ops;         /* these are the default */
+extern struct registry_ops printing_ops;
+extern struct registry_ops eventlog_ops;
+extern struct registry_ops shares_reg_ops;
+extern struct registry_ops smbconf_reg_ops;
+extern struct registry_ops netlogon_params_reg_ops;
+extern struct registry_ops prod_options_reg_ops;
+extern struct registry_ops tcpip_params_reg_ops;
+extern struct registry_ops hkpt_params_reg_ops;
+extern struct registry_ops current_version_reg_ops;
+extern struct registry_ops perflib_reg_ops;
+extern struct registry_ops regdb_ops;          /* these are the default */
 
 /* array of registry_hook's which are read into a tree for easy access */
 /* #define REG_TDB_ONLY                1 */
index 7ba53cd367e0662fa5efb5fde4955424076a7c2f..28c4187784dbd5619f3fb971dd7606fbb865bd56 100644 (file)
@@ -22,7 +22,7 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
 
-extern REGISTRY_OPS smbconf_reg_ops;
+extern struct registry_ops smbconf_reg_ops;
 
 /*
  * create a fake token just with enough rights to