/* 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 */
* 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 );
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 */
};
uint32 type;
char *name; /* full name of registry key */
uint32 access_granted;
- REGISTRY_OPS *ops;
+ struct registry_ops *ops;
};
struct registry_key {
#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)
{
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;
}
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;
}
#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"
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,
};
* 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,
#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)
{
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,
};
#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)
{
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,
};
#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"
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,
};
* 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,
#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)
{
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,
};
* 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,
#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 )
{
* 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,
#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)
{
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,
};
#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)
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;
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;
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));
#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 */
#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