diff options
author | Michael Adam <obnox@samba.org> | 2009-03-23 18:14:17 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2009-04-27 11:21:02 +0200 |
commit | 221151a2a2c30e5c82b100161b498fdbbc1d4382 (patch) | |
tree | d4346a16206b3308ff20b026012aa095e99d778a /source3 | |
parent | 38d02c5d857ecea3405c3f48e64906764329f1a1 (diff) | |
download | samba-221151a2a2c30e5c82b100161b498fdbbc1d4382.tar.gz samba-221151a2a2c30e5c82b100161b498fdbbc1d4382.tar.bz2 samba-221151a2a2c30e5c82b100161b498fdbbc1d4382.zip |
s3:registry: replace typedef REGVAL_CTR by struct regval_ctr.
This paves the way for hiding the typedef and the implementation
from the surface.
Michael
Diffstat (limited to 'source3')
26 files changed, 116 insertions, 116 deletions
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h index 7dc60a8f03..a25d984eb2 100644 --- a/source3/include/nt_printing.h +++ b/source3/include/nt_printing.h @@ -243,8 +243,8 @@ typedef struct nt_printer_driver_info_level /* container for a single registry key */ typedef struct { - char *name; - REGVAL_CTR *values; + char *name; + struct regval_ctr *values; } NT_PRINTER_KEY; /* container for all printer data */ diff --git a/source3/include/proto.h b/source3/include/proto.h index aec249c326..d39c3de607 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -4821,10 +4821,10 @@ WERROR regdb_transaction_cancel(void); int regdb_get_seqnum(void); bool regdb_store_keys(const char *key, struct regsubkey_ctr *ctr); int regdb_fetch_keys(const char *key, struct regsubkey_ctr *ctr); -int regdb_fetch_values( const char* key, REGVAL_CTR *values ); -bool regdb_store_values( const char *key, REGVAL_CTR *values ); +int regdb_fetch_values(const char* key, struct regval_ctr *values); +bool regdb_store_values(const char *key, struct regval_ctr *values); bool regdb_subkeys_need_update(struct regsubkey_ctr *subkeys); -bool regdb_values_need_update(REGVAL_CTR *values); +bool regdb_values_need_update(struct regval_ctr *values); /* The following definitions come from registry/reg_backend_hkpt_params.c */ @@ -4860,11 +4860,11 @@ void reghook_dump_cache( int debuglevel ); /* The following definitions come from registry/reg_dispatcher.c */ bool store_reg_keys( REGISTRY_KEY *key, struct regsubkey_ctr *subkeys ); -bool store_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val ); +bool store_reg_values(REGISTRY_KEY *key, struct regval_ctr *val); WERROR create_reg_subkey(REGISTRY_KEY *key, const char *subkey); WERROR delete_reg_subkey(REGISTRY_KEY *key, const char *subkey); int fetch_reg_keys( REGISTRY_KEY *key, struct regsubkey_ctr *subkey_ctr ); -int fetch_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val ); +int fetch_reg_values(REGISTRY_KEY *key, struct regval_ctr *val); bool regkey_access_check( REGISTRY_KEY *key, uint32 requested, uint32 *granted, const struct nt_user_token *token ); WERROR regkey_get_secdesc(TALLOC_CTX *mem_ctx, REGISTRY_KEY *key, @@ -4872,7 +4872,7 @@ WERROR regkey_get_secdesc(TALLOC_CTX *mem_ctx, REGISTRY_KEY *key, WERROR regkey_set_secdesc(REGISTRY_KEY *key, struct security_descriptor *psecdesc); bool reg_subkeys_need_update(REGISTRY_KEY *key, struct regsubkey_ctr *subkeys); -bool reg_values_need_update(REGISTRY_KEY *key, REGVAL_CTR *values); +bool reg_values_need_update(REGISTRY_KEY *key, struct regval_ctr *values); /* The following definitions come from registry/reg_eventlog.c */ @@ -4905,22 +4905,22 @@ WERROR regsubkey_ctr_delkey( struct regsubkey_ctr *ctr, const char *keyname ); bool regsubkey_ctr_key_exists( struct regsubkey_ctr *ctr, const char *keyname ); int regsubkey_ctr_numkeys( struct regsubkey_ctr *ctr ); char* regsubkey_ctr_specific_key( struct regsubkey_ctr *ctr, uint32 key_index ); -int regval_ctr_numvals( REGVAL_CTR *ctr ); +int regval_ctr_numvals(struct regval_ctr *ctr); REGISTRY_VALUE* dup_registry_value( REGISTRY_VALUE *val ); void free_registry_value( REGISTRY_VALUE *val ); uint8* regval_data_p( REGISTRY_VALUE *val ); uint32 regval_size( REGISTRY_VALUE *val ); char* regval_name( REGISTRY_VALUE *val ); uint32 regval_type( REGISTRY_VALUE *val ); -REGISTRY_VALUE* regval_ctr_specific_value( REGVAL_CTR *ctr, uint32 idx ); -bool regval_ctr_key_exists( REGVAL_CTR *ctr, const char *value ); +REGISTRY_VALUE* regval_ctr_specific_value(struct regval_ctr *ctr, uint32 idx); +bool regval_ctr_key_exists(struct regval_ctr *ctr, const char *value); REGISTRY_VALUE *regval_compose(TALLOC_CTX *ctx, const char *name, uint16 type, const char *data_p, size_t size); -int regval_ctr_addvalue( REGVAL_CTR *ctr, const char *name, uint16 type, - const char *data_p, size_t size ); -int regval_ctr_copyvalue( REGVAL_CTR *ctr, REGISTRY_VALUE *val ); -int regval_ctr_delvalue( REGVAL_CTR *ctr, const char *name ); -REGISTRY_VALUE* regval_ctr_getvalue( REGVAL_CTR *ctr, const char *name ); +int regval_ctr_addvalue(struct regval_ctr *ctr, const char *name, uint16 type, + const char *data_p, size_t size); +int regval_ctr_copyvalue(struct regval_ctr *ctr, REGISTRY_VALUE *val); +int regval_ctr_delvalue(struct regval_ctr *ctr, const char *name); +REGISTRY_VALUE* regval_ctr_getvalue(struct regval_ctr *ctr, const char *name); uint32 regval_dword( REGISTRY_VALUE *val ); char *regval_sz(REGISTRY_VALUE *val); @@ -5881,7 +5881,7 @@ SEC_DESC *svcctl_get_secdesc( TALLOC_CTX *ctx, const char *name, NT_USER_TOKEN * bool svcctl_set_secdesc( TALLOC_CTX *ctx, const char *name, SEC_DESC *sec_desc, NT_USER_TOKEN *token ); const char *svcctl_lookup_dispname(TALLOC_CTX *ctx, const char *name, NT_USER_TOKEN *token ); const char *svcctl_lookup_description(TALLOC_CTX *ctx, const char *name, NT_USER_TOKEN *token ); -REGVAL_CTR *svcctl_fetch_regvalues( const char *name, NT_USER_TOKEN *token ); +struct regval_ctr *svcctl_fetch_regvalues( const char *name, NT_USER_TOKEN *token ); /* The following definitions come from services/svc_netlogon.c */ diff --git a/source3/include/reg_objects.h b/source3/include/reg_objects.h index a03ac1bff4..029f8544d6 100644 --- a/source3/include/reg_objects.h +++ b/source3/include/reg_objects.h @@ -58,11 +58,11 @@ struct registry_value { /* container for registry values */ -typedef struct { +struct regval_ctr { uint32 num_values; REGISTRY_VALUE **values; int seqnum; -} REGVAL_CTR; +}; /* container for registry subkey names */ @@ -129,11 +129,11 @@ struct regsubkey_ctr; typedef struct { /* functions for enumerating subkeys and values */ int (*fetch_subkeys)( const char *key, struct regsubkey_ctr *subkeys); - int (*fetch_values) ( const char *key, REGVAL_CTR *val ); + int (*fetch_values) ( const char *key, struct regval_ctr *val ); bool (*store_subkeys)( const char *key, struct regsubkey_ctr *subkeys ); WERROR (*create_subkey)(const char *key, const char *subkey); WERROR (*delete_subkey)(const char *key, const char *subkey); - bool (*store_values)( const char *key, REGVAL_CTR *val ); + bool (*store_values)( const char *key, struct regval_ctr *val ); bool (*reg_access_check)( const char *keyname, uint32 requested, uint32 *granted, const NT_USER_TOKEN *token ); @@ -142,7 +142,7 @@ typedef struct { WERROR (*set_secdesc)(const char *key, struct security_descriptor *sec_desc); bool (*subkeys_need_update)(struct regsubkey_ctr *subkeys); - bool (*values_need_update)(REGVAL_CTR *values); + bool (*values_need_update)(struct regval_ctr *values); } REGISTRY_OPS; typedef struct { @@ -163,7 +163,7 @@ typedef struct _RegistryKey { struct registry_key { REGISTRY_KEY *key; struct regsubkey_ctr *subkeys; - REGVAL_CTR *values; + struct regval_ctr *values; struct nt_user_token *token; }; diff --git a/source3/include/regfio.h b/source3/include/regfio.h index 0e957d51e5..58bfe80c91 100644 --- a/source3/include/regfio.h +++ b/source3/include/regfio.h @@ -214,7 +214,7 @@ int regfio_close( REGF_FILE *r ); REGF_NK_REC* regfio_rootkey( REGF_FILE *file ); REGF_NK_REC* regfio_fetch_subkey( REGF_FILE *file, REGF_NK_REC *nk ); REGF_NK_REC* regfio_write_key ( REGF_FILE *file, const char *name, - REGVAL_CTR *values, struct regsubkey_ctr *subkeys, + struct regval_ctr *values, struct regsubkey_ctr *subkeys, SEC_DESC *sec_desc, REGF_NK_REC *parent ); diff --git a/source3/libads/ldap_printer.c b/source3/libads/ldap_printer.c index 7fec58c7eb..c1bfd75d88 100644 --- a/source3/libads/ldap_printer.c +++ b/source3/libads/ldap_printer.c @@ -403,7 +403,7 @@ bool get_local_printer_publishing_data(TALLOC_CTX *mem_ctx, uint32 key,val; for (key=0; key < data->num_keys; key++) { - REGVAL_CTR *ctr = data->keys[key].values; + struct regval_ctr *ctr = data->keys[key].values; for (val=0; val < ctr->num_values; val++) map_regval_to_ads(mem_ctx, mods, ctr->values[val]); } diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index d6fead11c2..49e28403e2 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -2474,7 +2474,7 @@ static int pack_values(NT_PRINTER_DATA *data, uint8 *buf, int buflen) int len = 0; int i, j; REGISTRY_VALUE *val; - REGVAL_CTR *val_ctr; + struct regval_ctr *val_ctr; char *path = NULL; int num_values; @@ -2870,7 +2870,7 @@ int add_new_printer_key( NT_PRINTER_DATA *data, const char *name ) data->keys[key_index].name = talloc_strdup( data, name ); - if ( !(data->keys[key_index].values = TALLOC_ZERO_P( data, REGVAL_CTR )) ) + if ( !(data->keys[key_index].values = TALLOC_ZERO_P( data, struct regval_ctr )) ) return -1; data->num_keys++; @@ -3041,7 +3041,7 @@ done: } #ifdef HAVE_ADS -static void map_sz_into_ctr(REGVAL_CTR *ctr, const char *val_name, +static void map_sz_into_ctr(struct regval_ctr *ctr, const char *val_name, const char *sz) { smb_ucs2_t conv_str[1024]; @@ -3054,7 +3054,7 @@ static void map_sz_into_ctr(REGVAL_CTR *ctr, const char *val_name, (char *) conv_str, str_size); } -static void map_dword_into_ctr(REGVAL_CTR *ctr, const char *val_name, +static void map_dword_into_ctr(struct regval_ctr *ctr, const char *val_name, uint32 dword) { regval_ctr_delvalue(ctr, val_name); @@ -3062,7 +3062,7 @@ static void map_dword_into_ctr(REGVAL_CTR *ctr, const char *val_name, (char *) &dword, sizeof(dword)); } -static void map_bool_into_ctr(REGVAL_CTR *ctr, const char *val_name, +static void map_bool_into_ctr(struct regval_ctr *ctr, const char *val_name, bool b) { uint8 bin_bool = (b ? 1 : 0); @@ -3071,7 +3071,7 @@ static void map_bool_into_ctr(REGVAL_CTR *ctr, const char *val_name, (char *) &bin_bool, sizeof(bin_bool)); } -static void map_single_multi_sz_into_ctr(REGVAL_CTR *ctr, const char *val_name, +static void map_single_multi_sz_into_ctr(struct regval_ctr *ctr, const char *val_name, const char *multi_sz) { smb_ucs2_t *conv_strs = NULL; @@ -3105,7 +3105,7 @@ static void map_single_multi_sz_into_ctr(REGVAL_CTR *ctr, const char *val_name, static bool map_nt_printer_info2_to_dsspooler(NT_PRINTER_INFO_LEVEL_2 *info2) { - REGVAL_CTR *ctr = NULL; + struct regval_ctr *ctr = NULL; fstring longname; const char *dnssuffix; char *allocated_string = NULL; @@ -3177,7 +3177,7 @@ static void store_printer_guid(NT_PRINTER_INFO_LEVEL_2 *info2, struct GUID guid) { int i; - REGVAL_CTR *ctr=NULL; + struct regval_ctr *ctr=NULL; UNISTR2 unistr_guid; /* find the DsSpooler key */ @@ -3469,7 +3469,7 @@ bool is_printer_published(Printer_entry *print_hnd, int snum, struct GUID *guid) { NT_PRINTER_INFO_LEVEL *printer = NULL; - REGVAL_CTR *ctr; + struct regval_ctr *ctr; REGISTRY_VALUE *guid_val; WERROR win_rc; int i; diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c index 817d43be6b..e81c11747b 100644 --- a/source3/registry/reg_api.c +++ b/source3/registry/reg_api.c @@ -81,7 +81,7 @@ static WERROR fill_value_cache(struct registry_key *key) } } - if (!(key->values = TALLOC_ZERO_P(key, REGVAL_CTR))) { + if (!(key->values = TALLOC_ZERO_P(key, struct regval_ctr))) { return WERR_NOMEM; } if (fetch_reg_values(key->key, key->values) == -1) { @@ -710,7 +710,7 @@ static WERROR reg_load_tree(REGF_FILE *regfile, const char *topkeypath, { REGF_NK_REC *subkey; REGISTRY_KEY registry_key; - REGVAL_CTR *values; + struct regval_ctr *values; struct regsubkey_ctr *subkeys; int i; char *path = NULL; @@ -736,12 +736,12 @@ static WERROR reg_load_tree(REGF_FILE *regfile, const char *topkeypath, result = regsubkey_ctr_init(regfile->mem_ctx, &subkeys); W_ERROR_NOT_OK_RETURN(result); - values = TALLOC_ZERO_P(subkeys, REGVAL_CTR); + values = TALLOC_ZERO_P(subkeys, struct regval_ctr); if (values == NULL) { return WERR_NOMEM; } - /* copy values into the REGVAL_CTR */ + /* copy values into the struct regval_ctr */ for (i=0; i<key->num_values; i++) { regval_ctr_addvalue(values, key->values[i].valuename, @@ -843,7 +843,7 @@ static WERROR reg_write_tree(REGF_FILE *regfile, const char *keypath, REGF_NK_REC *parent) { REGF_NK_REC *key; - REGVAL_CTR *values; + struct regval_ctr *values; struct regsubkey_ctr *subkeys; int i, num_subkeys; char *key_tmp = NULL; @@ -895,7 +895,7 @@ static WERROR reg_write_tree(REGF_FILE *regfile, const char *keypath, result = regsubkey_ctr_init(regfile->mem_ctx, &subkeys); W_ERROR_NOT_OK_RETURN(result); - values = TALLOC_ZERO_P(subkeys, REGVAL_CTR); + values = TALLOC_ZERO_P(subkeys, struct regval_ctr); if (values == NULL) { return WERR_NOMEM; } diff --git a/source3/registry/reg_backend_current_version.c b/source3/registry/reg_backend_current_version.c index f76840ee22..c1b3211053 100644 --- a/source3/registry/reg_backend_current_version.c +++ b/source3/registry/reg_backend_current_version.c @@ -33,7 +33,7 @@ extern REGISTRY_OPS regdb_ops; #define KEY_CURRENT_VERSION_NORM "HKLM/SOFTWARE/MICROSOFT/WINDOWS NT/CURRENTVERSION" -static int current_version_fetch_values(const char *key, REGVAL_CTR *values) +static int current_version_fetch_values(const char *key, struct regval_ctr *values) { const char *sysroot_string = "c:\\Windows"; fstring sysversion; diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c index 30f1db9c53..82cf7cae39 100644 --- a/source3/registry/reg_backend_db.c +++ b/source3/registry/reg_backend_db.c @@ -239,7 +239,7 @@ WERROR init_registry_data(void) { WERROR werr; TALLOC_CTX *frame = talloc_stackframe(); - REGVAL_CTR *values; + struct regval_ctr *values; int i; UNISTR2 data; @@ -254,7 +254,7 @@ WERROR init_registry_data(void) } for (i=0; builtin_registry_values[i].path != NULL; i++) { - values = TALLOC_ZERO_P(frame, REGVAL_CTR); + values = TALLOC_ZERO_P(frame, struct regval_ctr); if (values == NULL) { werr = WERR_NOMEM; goto done; @@ -307,7 +307,7 @@ do_init: for (i=0; builtin_registry_values[i].path != NULL; i++) { - values = TALLOC_ZERO_P(frame, REGVAL_CTR); + values = TALLOC_ZERO_P(frame, struct regval_ctr); if (values == NULL) { werr = WERR_NOMEM; goto fail; @@ -1398,7 +1398,7 @@ done: Unpack a list of registry values frem the TDB ***************************************************************************/ -static int regdb_unpack_values(REGVAL_CTR *values, uint8 *buf, int buflen) +static int regdb_unpack_values(struct regval_ctr *values, uint8 *buf, int buflen) { int len = 0; uint32 type; @@ -1443,7 +1443,7 @@ static int regdb_unpack_values(REGVAL_CTR *values, uint8 *buf, int buflen) Pack all values in all printer keys ***************************************************************************/ -static int regdb_pack_values(REGVAL_CTR *values, uint8 *buf, int buflen) +static int regdb_pack_values(struct regval_ctr *values, uint8 *buf, int buflen) { int len = 0; int i; @@ -1478,7 +1478,7 @@ static int regdb_pack_values(REGVAL_CTR *values, uint8 *buf, int buflen) released by the caller. ***********************************************************************/ -int regdb_fetch_values( const char* key, REGVAL_CTR *values ) +int regdb_fetch_values(const char* key, struct regval_ctr *values) { char *keystr = NULL; TALLOC_CTX *ctx = talloc_stackframe(); @@ -1513,7 +1513,7 @@ done: return ret; } -bool regdb_store_values( const char *key, REGVAL_CTR *values ) +bool regdb_store_values(const char *key, struct regval_ctr *values) { TDB_DATA old_data, data; char *keystr = NULL; @@ -1658,7 +1658,7 @@ bool regdb_subkeys_need_update(struct regsubkey_ctr *subkeys) return (regdb_get_seqnum() != regsubkey_ctr_get_seqnum(subkeys)); } -bool regdb_values_need_update(REGVAL_CTR *values) +bool regdb_values_need_update(struct regval_ctr *values) { return (regdb_get_seqnum() != values->seqnum); } diff --git a/source3/registry/reg_backend_hkpt_params.c b/source3/registry/reg_backend_hkpt_params.c index c67f7b3ea4..565198df4b 100644 --- a/source3/registry/reg_backend_hkpt_params.c +++ b/source3/registry/reg_backend_hkpt_params.c @@ -31,7 +31,7 @@ extern REGISTRY_OPS regdb_ops; -static int hkpt_params_fetch_values(const char *key, REGVAL_CTR *regvals) +static int hkpt_params_fetch_values(const char *key, struct regval_ctr *regvals) { uint32 base_index; uint32 buffer_size; diff --git a/source3/registry/reg_backend_netlogon_params.c b/source3/registry/reg_backend_netlogon_params.c index 17abf038a6..3d8a18c9f6 100644 --- a/source3/registry/reg_backend_netlogon_params.c +++ b/source3/registry/reg_backend_netlogon_params.c @@ -31,7 +31,7 @@ extern REGISTRY_OPS regdb_ops; -static int netlogon_params_fetch_values(const char *key, REGVAL_CTR *regvals) +static int netlogon_params_fetch_values(const char *key, struct regval_ctr *regvals) { uint32 dwValue; diff --git a/source3/registry/reg_backend_perflib.c b/source3/registry/reg_backend_perflib.c index e23c87efe8..3a098f3ba8 100644 --- a/source3/registry/reg_backend_perflib.c +++ b/source3/registry/reg_backend_perflib.c @@ -34,7 +34,7 @@ extern 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" -static int perflib_params( REGVAL_CTR *regvals ) +static int perflib_params(struct regval_ctr *regvals) { int base_index = -1; int last_counter = -1; @@ -52,7 +52,7 @@ static int perflib_params( REGVAL_CTR *regvals ) return regval_ctr_numvals( regvals ); } -static int perflib_009_params( REGVAL_CTR *regvals ) +static int perflib_009_params(struct regval_ctr *regvals) { int base_index; int buffer_size; @@ -71,7 +71,7 @@ static int perflib_009_params( REGVAL_CTR *regvals ) return regval_ctr_numvals( regvals ); } -static int perflib_fetch_values(const char *key, REGVAL_CTR *regvals) +static int perflib_fetch_values(const char *key, struct regval_ctr *regvals) { char *path = NULL; TALLOC_CTX *ctx = talloc_tos(); diff --git a/source3/registry/reg_backend_printing.c b/source3/registry/reg_backend_printing.c index a02293e528..01d2a6deb1 100644 --- a/source3/registry/reg_backend_printing.c +++ b/source3/registry/reg_backend_printing.c @@ -44,8 +44,8 @@ struct reg_dyn_tree { /* callbscks for fetch/store operations */ int ( *fetch_subkeys) ( const char *path, struct regsubkey_ctr *subkeys ); bool (*store_subkeys) ( const char *path, struct regsubkey_ctr *subkeys ); - int (*fetch_values) ( const char *path, REGVAL_CTR *values ); - bool (*store_values) ( const char *path, REGVAL_CTR *values ); + int (*fetch_values) ( const char *path, struct regval_ctr *values ); + bool (*store_values) ( const char *path, struct regval_ctr *values ); }; /********************************************************************* @@ -93,7 +93,7 @@ static int key_forms_fetch_keys(const char *key, struct regsubkey_ctr *subkeys) /********************************************************************** *********************************************************************/ -static int key_forms_fetch_values( const char *key, REGVAL_CTR *values ) +static int key_forms_fetch_values(const char *key, struct regval_ctr *values) { uint32 data[8]; int i, num_values, form_index = 1; @@ -383,7 +383,7 @@ static bool key_printers_store_keys( const char *key, struct regsubkey_ctr *subk /********************************************************************** *********************************************************************/ -static void fill_in_printer_values( NT_PRINTER_INFO_LEVEL_2 *info2, REGVAL_CTR *values ) +static void fill_in_printer_values(NT_PRINTER_INFO_LEVEL_2 *info2, struct regval_ctr *values) { struct spoolss_DeviceMode *devmode; UNISTR2 data; @@ -475,7 +475,7 @@ static void fill_in_printer_values( NT_PRINTER_INFO_LEVEL_2 *info2, REGVAL_CTR * /********************************************************************** *********************************************************************/ -static int key_printers_fetch_values( const char *key, REGVAL_CTR *values ) +static int key_printers_fetch_values(const char *key, struct regval_ctr *values) { int num_values; char *printers_key; @@ -594,7 +594,7 @@ static int find_valuename_index( const char *valuename ) /********************************************************************** *********************************************************************/ -static void convert_values_to_printer_info_2( NT_PRINTER_INFO_LEVEL_2 *printer2, REGVAL_CTR *values ) +static void convert_values_to_printer_info_2(NT_PRINTER_INFO_LEVEL_2 *printer2, struct regval_ctr *values) { int num_values = regval_ctr_numvals( values ); uint32 value_index; @@ -671,7 +671,7 @@ static void convert_values_to_printer_info_2( NT_PRINTER_INFO_LEVEL_2 *printer2, /********************************************************************** *********************************************************************/ -static bool key_printers_store_values( const char *key, REGVAL_CTR *values ) +static bool key_printers_store_values(const char *key, struct regval_ctr *values) { char *printers_key; char *printername, *keyname; @@ -888,7 +888,7 @@ static int key_driver_fetch_keys( const char *key, struct regsubkey_ctr *subkeys /********************************************************************** *********************************************************************/ -static void fill_in_driver_values( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info3, REGVAL_CTR *values ) +static void fill_in_driver_values(NT_PRINTER_DRIVER_INFO_LEVEL_3 *info3, struct regval_ctr *values) { char *buffer = NULL; int buffer_size = 0; @@ -967,7 +967,7 @@ static void fill_in_driver_values( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info3, REGVAL /********************************************************************** *********************************************************************/ -static int driver_arch_fetch_values( char *key, REGVAL_CTR *values ) +static int driver_arch_fetch_values(char *key, struct regval_ctr *values) { char *keystr, *base, *subkeypath; fstring arch_environment; @@ -1054,7 +1054,7 @@ static int driver_arch_fetch_values( char *key, REGVAL_CTR *values ) /********************************************************************** *********************************************************************/ -static int key_driver_fetch_values( const char *key, REGVAL_CTR *values ) +static int key_driver_fetch_values(const char *key, struct regval_ctr *values) { char *keystr = NULL; char *subkey = NULL; @@ -1222,7 +1222,7 @@ static bool regprint_store_reg_keys( const char *key, struct regsubkey_ctr *subk /********************************************************************** *********************************************************************/ -static int regprint_fetch_reg_values( const char *key, REGVAL_CTR *values ) +static int regprint_fetch_reg_values(const char *key, struct regval_ctr *values) { int i = match_registry_path( key ); @@ -1241,7 +1241,7 @@ static int regprint_fetch_reg_values( const char *key, REGVAL_CTR *values ) /********************************************************************** *********************************************************************/ -static bool regprint_store_reg_values( const char *key, REGVAL_CTR *values ) +static bool regprint_store_reg_values(const char *key, struct regval_ctr *values) { int i = match_registry_path( key ); diff --git a/source3/registry/reg_backend_prod_options.c b/source3/registry/reg_backend_prod_options.c index 3e9d32cd97..dc6b987f9d 100644 --- a/source3/registry/reg_backend_prod_options.c +++ b/source3/registry/reg_backend_prod_options.c @@ -31,7 +31,7 @@ extern REGISTRY_OPS regdb_ops; -static int prod_options_fetch_values(const char *key, REGVAL_CTR *regvals) +static int prod_options_fetch_values(const char *key, struct regval_ctr *regvals) { const char *value_ascii = ""; fstring value; diff --git a/source3/registry/reg_backend_shares.c b/source3/registry/reg_backend_shares.c index a30ae34b4e..562fd7b4ff 100644 --- a/source3/registry/reg_backend_shares.c +++ b/source3/registry/reg_backend_shares.c @@ -100,7 +100,7 @@ static int shares_subkey_info( const char *key, struct regsubkey_ctr *subkey_ctr Caller is responsible for freeing memory *********************************************************************/ -static int shares_value_info( const char *key, REGVAL_CTR *val ) +static int shares_value_info(const char *key, struct regval_ctr *val) { char *path; bool top_level = False; @@ -145,7 +145,7 @@ static bool shares_store_subkey( const char *key, struct regsubkey_ctr *subkeys (for now at least) *********************************************************************/ -static bool shares_store_value( const char *key, REGVAL_CTR *val ) +static bool shares_store_value(const char *key, struct regval_ctr *val) { return False; } diff --git a/source3/registry/reg_backend_smbconf.c b/source3/registry/reg_backend_smbconf.c index 8e1bbcab6f..e8ac967e44 100644 --- a/source3/registry/reg_backend_smbconf.c +++ b/source3/registry/reg_backend_smbconf.c @@ -45,12 +45,12 @@ static WERROR smbconf_delete_subkey(const char *key, const char *subkey) return regdb_ops.delete_subkey(key, subkey); } -static int smbconf_fetch_values( const char *key, REGVAL_CTR *val ) +static int smbconf_fetch_values(const char *key, struct regval_ctr *val) { return regdb_ops.fetch_values(key, val); } -static bool smbconf_store_values( const char *key, REGVAL_CTR *val ) +static bool smbconf_store_values(const char *key, struct regval_ctr *val) { return regdb_ops.store_values(key, val); } diff --git a/source3/registry/reg_backend_tcpip_params.c b/source3/registry/reg_backend_tcpip_params.c index a6aa2fc2ea..f5311b733c 100644 --- a/source3/registry/reg_backend_tcpip_params.c +++ b/source3/registry/reg_backend_tcpip_params.c @@ -31,7 +31,7 @@ extern REGISTRY_OPS regdb_ops; -static int tcpip_params_fetch_values(const char *key, REGVAL_CTR *regvals) +static int tcpip_params_fetch_values(const char *key, struct regval_ctr *regvals) { fstring value; int value_length; diff --git a/source3/registry/reg_dispatcher.c b/source3/registry/reg_dispatcher.c index f8c382536f..8b7987507a 100644 --- a/source3/registry/reg_dispatcher.c +++ b/source3/registry/reg_dispatcher.c @@ -92,7 +92,7 @@ bool store_reg_keys( REGISTRY_KEY *key, struct regsubkey_ctr *subkeys ) High level wrapper function for storing registry values ***********************************************************************/ -bool store_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val ) +bool store_reg_values(REGISTRY_KEY *key, struct regval_ctr *val) { if (key->ops && key->ops->store_values) return key->ops->store_values(key->name, val); @@ -137,7 +137,7 @@ int fetch_reg_keys( REGISTRY_KEY *key, struct regsubkey_ctr *subkey_ctr ) High level wrapper function for enumerating registry values ***********************************************************************/ -int fetch_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val ) +int fetch_reg_values(REGISTRY_KEY *key, struct regval_ctr *val) { int result = -1; @@ -237,7 +237,7 @@ bool reg_subkeys_need_update(REGISTRY_KEY *key, struct regsubkey_ctr *subkeys) * Check whether the in-memory version of the values of a * registry key needs update from disk. */ -bool reg_values_need_update(REGISTRY_KEY *key, REGVAL_CTR *values) +bool reg_values_need_update(REGISTRY_KEY *key, struct regval_ctr *values) { if (key->ops && key->ops->values_need_update) { diff --git a/source3/registry/reg_eventlog.c b/source3/registry/reg_eventlog.c index c02318beac..fbeef9acad 100644 --- a/source3/registry/reg_eventlog.c +++ b/source3/registry/reg_eventlog.c @@ -36,7 +36,7 @@ bool eventlog_init_keys(void) char *evtlogpath = NULL; char *evtfilepath = NULL; struct regsubkey_ctr *subkeys; - REGVAL_CTR *values; + struct regval_ctr *values; uint32 uiMaxSize; uint32 uiRetention; uint32 uiCategoryCount; @@ -87,7 +87,7 @@ bool eventlog_init_keys(void) TALLOC_FREE( subkeys ); /* now add the values to the KEY_EVENTLOG/Application form key */ - if (!(values = TALLOC_ZERO_P(ctx, REGVAL_CTR))) { + if (!(values = TALLOC_ZERO_P(ctx, struct regval_ctr))) { DEBUG( 0, ( "talloc() failure!\n" ) ); return False; } @@ -149,7 +149,7 @@ bool eventlog_init_keys(void) if (!evtlogpath) { return false; } - if (!(values = TALLOC_ZERO_P(ctx, REGVAL_CTR))) { + if (!(values = TALLOC_ZERO_P(ctx, struct regval_ctr))) { DEBUG( 0, ( "talloc() failure!\n" ) ); return False; } @@ -201,7 +201,7 @@ bool eventlog_add_source( const char *eventlog, const char *sourcename, char **wrklist, **wp; char *evtlogpath = NULL; struct regsubkey_ctr *subkeys; - REGVAL_CTR *values; + struct regval_ctr *values; REGISTRY_VALUE *rval; UNISTR2 data; uint16 *msz_wp; @@ -233,7 +233,7 @@ bool eventlog_add_source( const char *eventlog, const char *sourcename, /* todo add to Sources */ - if (!( values = TALLOC_ZERO_P(ctx, REGVAL_CTR))) { + if (!( values = TALLOC_ZERO_P(ctx, struct regval_ctr))) { DEBUG( 0, ( "talloc() failure!\n" )); return false; } @@ -363,7 +363,7 @@ bool eventlog_add_source( const char *eventlog, const char *sourcename, regdb_fetch_keys( evtlogpath, subkeys ); /* now add the values to the KEY_EVENTLOG/Application form key */ - if ( !( values = TALLOC_ZERO_P(ctx, REGVAL_CTR ) ) ) { + if ( !( values = TALLOC_ZERO_P(ctx, struct regval_ctr ) ) ) { DEBUG( 0, ( "talloc() failure!\n" ) ); return False; } diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c index b975ced324..79539598ab 100644 --- a/source3/registry/reg_objects.c +++ b/source3/registry/reg_objects.c @@ -33,7 +33,7 @@ struct regsubkey_ctr { /********************************************************************** - Note that the struct regsubkey_ctr and REGVAL_CTR objects *must* be + Note that the struct regsubkey_ctr and struct regval_ctr objects *must* be talloc()'d since the methods use the object pointer as the talloc context for internal private data. @@ -266,14 +266,14 @@ char* regsubkey_ctr_specific_key( struct regsubkey_ctr *ctr, uint32_t key_index } /* - * Utility functions for REGVAL_CTR + * Utility functions for struct regval_ctr */ /*********************************************************************** How many keys does the container hold ? **********************************************************************/ -int regval_ctr_numvals( REGVAL_CTR *ctr ) +int regval_ctr_numvals(struct regval_ctr *ctr) { return ctr->num_values; } @@ -369,7 +369,7 @@ uint32 regval_type( REGISTRY_VALUE *val ) since this memory will go away when the ctr is free()'d **********************************************************************/ -REGISTRY_VALUE* regval_ctr_specific_value( REGVAL_CTR *ctr, uint32 idx ) +REGISTRY_VALUE* regval_ctr_specific_value(struct regval_ctr *ctr, uint32 idx) { if ( !(idx < ctr->num_values) ) return NULL; @@ -381,7 +381,7 @@ REGISTRY_VALUE* regval_ctr_specific_value( REGVAL_CTR *ctr, uint32 idx ) Check for the existance of a value **********************************************************************/ -bool regval_ctr_key_exists( REGVAL_CTR *ctr, const char *value ) +bool regval_ctr_key_exists(struct regval_ctr *ctr, const char *value) { int i; @@ -426,8 +426,8 @@ REGISTRY_VALUE *regval_compose(TALLOC_CTX *ctx, const char *name, uint16 type, Add a new registry value to the array **********************************************************************/ -int regval_ctr_addvalue( REGVAL_CTR *ctr, const char *name, uint16 type, - const char *data_p, size_t size ) +int regval_ctr_addvalue(struct regval_ctr *ctr, const char *name, uint16 type, + const char *data_p, size_t size) { if ( !name ) return ctr->num_values; @@ -468,7 +468,7 @@ int regval_ctr_addvalue( REGVAL_CTR *ctr, const char *name, uint16 type, Add a new registry value to the array **********************************************************************/ -int regval_ctr_copyvalue( REGVAL_CTR *ctr, REGISTRY_VALUE *val ) +int regval_ctr_copyvalue(struct regval_ctr *ctr, REGISTRY_VALUE *val) { if ( val ) { regval_ctr_addvalue(ctr, val->valuename, val->type, @@ -483,7 +483,7 @@ int regval_ctr_copyvalue( REGVAL_CTR *ctr, REGISTRY_VALUE *val ) No need to free memory since it is talloc'd. **********************************************************************/ -int regval_ctr_delvalue( REGVAL_CTR *ctr, const char *name ) +int regval_ctr_delvalue(struct regval_ctr *ctr, const char *name) { int i; @@ -511,7 +511,7 @@ int regval_ctr_delvalue( REGVAL_CTR *ctr, const char *name ) No need to free memory since it is talloc'd. **********************************************************************/ -REGISTRY_VALUE* regval_ctr_getvalue( REGVAL_CTR *ctr, const char *name ) +REGISTRY_VALUE* regval_ctr_getvalue(struct regval_ctr *ctr, const char *name) { int i; diff --git a/source3/registry/regfio.c b/source3/registry/regfio.c index 074e8414b1..006db7627c 100644 --- a/source3/registry/regfio.c +++ b/source3/registry/regfio.c @@ -1714,8 +1714,8 @@ static int hashrec_cmp( REGF_HASH_REC *h1, REGF_HASH_REC *h2 ) /******************************************************************* *******************************************************************/ - REGF_NK_REC* regfio_write_key( REGF_FILE *file, const char *name, - REGVAL_CTR *values, struct regsubkey_ctr *subkeys, + REGF_NK_REC* regfio_write_key( REGF_FILE *file, const char *name, + struct regval_ctr *values, struct regsubkey_ctr *subkeys, SEC_DESC *sec_desc, REGF_NK_REC *parent ) { REGF_NK_REC *nk; diff --git a/source3/rpc_server/srv_ntsvcs_nt.c b/source3/rpc_server/srv_ntsvcs_nt.c index 7b8dc93a6e..474cde2b3e 100644 --- a/source3/rpc_server/srv_ntsvcs_nt.c +++ b/source3/rpc_server/srv_ntsvcs_nt.c @@ -124,7 +124,7 @@ WERROR _PNP_GetDeviceRegProp(pipes_struct *p, struct PNP_GetDeviceRegProp *r) { char *ptr; - REGVAL_CTR *values; + struct regval_ctr *values; REGISTRY_VALUE *val; switch( r->in.property ) { diff --git a/source3/rpc_server/srv_svcctl_nt.c b/source3/rpc_server/srv_svcctl_nt.c index f88801e794..ebb254571a 100644 --- a/source3/rpc_server/srv_svcctl_nt.c +++ b/source3/rpc_server/srv_svcctl_nt.c @@ -634,7 +634,7 @@ static WERROR fill_svc_config( TALLOC_CTX *ctx, const char *name, struct QUERY_SERVICE_CONFIG *config, NT_USER_TOKEN *token ) { - REGVAL_CTR *values; + struct regval_ctr *values; REGISTRY_VALUE *val; /* retrieve the registry values for this service */ diff --git a/source3/services/services_db.c b/source3/services/services_db.c index 7a4b90c7cf..1c9495f732 100644 --- a/source3/services/services_db.c +++ b/source3/services/services_db.c @@ -248,7 +248,7 @@ static bool read_init_file( const char *servicename, struct rcinit_file_informat Display name, Description, etc... ********************************************************************/ -static void fill_service_values( const char *name, REGVAL_CTR *values ) +static void fill_service_values(const char *name, struct regval_ctr *values) { UNISTR2 data, dname, ipath, description; uint32 dword; @@ -338,7 +338,7 @@ static void add_new_svc_name( REGISTRY_KEY *key_parent, struct regsubkey_ctr *su REGISTRY_KEY *key_service = NULL, *key_secdesc = NULL; WERROR wresult; char *path = NULL; - REGVAL_CTR *values = NULL; + struct regval_ctr *values = NULL; struct regsubkey_ctr *svc_subkeys = NULL; SEC_DESC *sd = NULL; DATA_BLOB sd_blob; @@ -379,7 +379,7 @@ static void add_new_svc_name( REGISTRY_KEY *key_parent, struct regsubkey_ctr *su /* now for the service values */ - if ( !(values = TALLOC_ZERO_P( key_service, REGVAL_CTR )) ) { + if ( !(values = TALLOC_ZERO_P( key_service, struct regval_ctr )) ) { DEBUG(0,("add_new_svc_name: talloc() failed!\n")); TALLOC_FREE( key_service ); return; @@ -408,7 +408,7 @@ static void add_new_svc_name( REGISTRY_KEY *key_parent, struct regsubkey_ctr *su } SAFE_FREE(path); - if ( !(values = TALLOC_ZERO_P( key_secdesc, REGVAL_CTR )) ) { + if ( !(values = TALLOC_ZERO_P( key_secdesc, struct regval_ctr )) ) { DEBUG(0,("add_new_svc_name: talloc() failed!\n")); TALLOC_FREE( key_secdesc ); return; @@ -505,7 +505,7 @@ void svcctl_init_keys( void ) SEC_DESC *svcctl_get_secdesc( TALLOC_CTX *ctx, const char *name, NT_USER_TOKEN *token ) { REGISTRY_KEY *key = NULL; - REGVAL_CTR *values = NULL; + struct regval_ctr *values = NULL; REGISTRY_VALUE *val = NULL; SEC_DESC *ret_sd = NULL; char *path= NULL; @@ -525,7 +525,7 @@ SEC_DESC *svcctl_get_secdesc( TALLOC_CTX *ctx, const char *name, NT_USER_TOKEN * goto done; } - if ( !(values = TALLOC_ZERO_P( key, REGVAL_CTR )) ) { + if ( !(values = TALLOC_ZERO_P( key, struct regval_ctr )) ) { DEBUG(0,("svcctl_get_secdesc: talloc() failed!\n")); goto done; } @@ -568,7 +568,7 @@ bool svcctl_set_secdesc( TALLOC_CTX *ctx, const char *name, SEC_DESC *sec_desc, REGISTRY_KEY *key = NULL; WERROR wresult; char *path = NULL; - REGVAL_CTR *values = NULL; + struct regval_ctr *values = NULL; DATA_BLOB blob; NTSTATUS status; bool ret = False; @@ -588,7 +588,7 @@ bool svcctl_set_secdesc( TALLOC_CTX *ctx, const char *name, SEC_DESC *sec_desc, } SAFE_FREE(path); - if ( !(values = TALLOC_ZERO_P( key, REGVAL_CTR )) ) { + if ( !(values = TALLOC_ZERO_P( key, struct regval_ctr )) ) { DEBUG(0,("svcctl_set_secdesc: talloc() failed!\n")); TALLOC_FREE( key ); return False; @@ -620,7 +620,7 @@ const char *svcctl_lookup_dispname(TALLOC_CTX *ctx, const char *name, NT_USER_TO { char *display_name = NULL; REGISTRY_KEY *key = NULL; - REGVAL_CTR *values = NULL; + struct regval_ctr *values = NULL; REGISTRY_VALUE *val = NULL; char *path = NULL; WERROR wresult; @@ -640,7 +640,7 @@ const char *svcctl_lookup_dispname(TALLOC_CTX *ctx, const char *name, NT_USER_TO } SAFE_FREE(path); - if ( !(values = TALLOC_ZERO_P( key, REGVAL_CTR )) ) { + if ( !(values = TALLOC_ZERO_P( key, struct regval_ctr )) ) { DEBUG(0,("svcctl_lookup_dispname: talloc() failed!\n")); TALLOC_FREE( key ); goto fail; @@ -670,7 +670,7 @@ const char *svcctl_lookup_description(TALLOC_CTX *ctx, const char *name, NT_USER { char *description = NULL; REGISTRY_KEY *key = NULL; - REGVAL_CTR *values = NULL; + struct regval_ctr *values = NULL; REGISTRY_VALUE *val = NULL; char *path = NULL; WERROR wresult; @@ -690,7 +690,7 @@ const char *svcctl_lookup_description(TALLOC_CTX *ctx, const char *name, NT_USER } SAFE_FREE(path); - if ( !(values = TALLOC_ZERO_P( key, REGVAL_CTR )) ) { + if ( !(values = TALLOC_ZERO_P( key, struct regval_ctr )) ) { DEBUG(0,("svcctl_lookup_description: talloc() failed!\n")); TALLOC_FREE( key ); return NULL; @@ -712,10 +712,10 @@ const char *svcctl_lookup_description(TALLOC_CTX *ctx, const char *name, NT_USER /******************************************************************** ********************************************************************/ -REGVAL_CTR *svcctl_fetch_regvalues( const char *name, NT_USER_TOKEN *token ) +struct regval_ctr *svcctl_fetch_regvalues(const char *name, NT_USER_TOKEN *token) { REGISTRY_KEY *key = NULL; - REGVAL_CTR *values = NULL; + struct regval_ctr *values = NULL; char *path = NULL; WERROR wresult; @@ -734,7 +734,7 @@ REGVAL_CTR *svcctl_fetch_regvalues( const char *name, NT_USER_TOKEN *token ) } SAFE_FREE(path); - if ( !(values = TALLOC_ZERO_P( NULL, REGVAL_CTR )) ) { + if ( !(values = TALLOC_ZERO_P( NULL, struct regval_ctr )) ) { DEBUG(0,("svcctl_fetch_regvalues: talloc() failed!\n")); TALLOC_FREE( key ); return NULL; diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c index cad605fdde..168a654ac3 100644 --- a/source3/utils/net_rpc_registry.c +++ b/source3/utils/net_rpc_registry.c @@ -970,7 +970,7 @@ static bool write_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk, const char *parentpath ) { REGF_NK_REC *key, *subkey; - REGVAL_CTR *values = NULL; + struct regval_ctr *values = NULL; struct regsubkey_ctr *subkeys = NULL; int i; char *path = NULL; @@ -983,13 +983,13 @@ static bool write_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk, return false; } - if ( !(values = TALLOC_ZERO_P( subkeys, REGVAL_CTR )) ) { + if ( !(values = TALLOC_ZERO_P( subkeys, struct regval_ctr )) ) { DEBUG(0,("write_registry_tree: talloc() failed!\n")); TALLOC_FREE(subkeys); return false; } - /* copy values into the REGVAL_CTR */ + /* copy values into the struct regval_ctr */ for ( i=0; i<nk->num_values; i++ ) { regval_ctr_addvalue( values, nk->values[i].valuename, nk->values[i].type, diff --git a/source3/utils/profiles.c b/source3/utils/profiles.c index 0ac93dedeb..0dc9aca876 100644 --- a/source3/utils/profiles.c +++ b/source3/utils/profiles.c @@ -117,7 +117,7 @@ static bool copy_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk, { REGF_NK_REC *key, *subkey; SEC_DESC *new_sd; - REGVAL_CTR *values; + struct regval_ctr *values; struct regsubkey_ctr *subkeys; int i; char *path; @@ -139,13 +139,13 @@ static bool copy_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk, return False; } - if ( !(values = TALLOC_ZERO_P( subkeys, REGVAL_CTR )) ) { + if ( !(values = TALLOC_ZERO_P( subkeys, struct regval_ctr )) ) { TALLOC_FREE( subkeys ); DEBUG(0,("copy_registry_tree: talloc() failure!\n")); return False; } - /* copy values into the REGVAL_CTR */ + /* copy values into the struct regval_ctr */ for ( i=0; i<nk->num_values; i++ ) { regval_ctr_addvalue( values, nk->values[i].valuename, nk->values[i].type, |