summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/reg_backend_db.c2
-rw-r--r--source3/registry/reg_backend_printing.c4
-rw-r--r--source3/registry/reg_eventlog.c2
-rw-r--r--source3/registry/reg_objects.c49
-rw-r--r--source3/registry/regfio.c5
5 files changed, 33 insertions, 29 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index 82cf7cae39..5229f154ac 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -1447,7 +1447,7 @@ static int regdb_pack_values(struct regval_ctr *values, uint8 *buf, int buflen)
{
int len = 0;
int i;
- REGISTRY_VALUE *val;
+ struct regval_blob *val;
int num_values;
if ( !values )
diff --git a/source3/registry/reg_backend_printing.c b/source3/registry/reg_backend_printing.c
index 01d2a6deb1..0854d7d8fc 100644
--- a/source3/registry/reg_backend_printing.c
+++ b/source3/registry/reg_backend_printing.c
@@ -598,7 +598,7 @@ static void convert_values_to_printer_info_2(NT_PRINTER_INFO_LEVEL_2 *printer2,
{
int num_values = regval_ctr_numvals( values );
uint32 value_index;
- REGISTRY_VALUE *val;
+ struct regval_blob *val;
int i;
for ( i=0; i<num_values; i++ ) {
@@ -702,7 +702,7 @@ static bool key_printers_store_values(const char *key, struct regval_ctr *values
else {
int num_values = regval_ctr_numvals( values );
int i;
- REGISTRY_VALUE *val;
+ struct regval_blob *val;
delete_printer_key( printer->info_2->data, keyname );
diff --git a/source3/registry/reg_eventlog.c b/source3/registry/reg_eventlog.c
index fbeef9acad..45ade52102 100644
--- a/source3/registry/reg_eventlog.c
+++ b/source3/registry/reg_eventlog.c
@@ -202,7 +202,7 @@ bool eventlog_add_source( const char *eventlog, const char *sourcename,
char *evtlogpath = NULL;
struct regsubkey_ctr *subkeys;
struct regval_ctr *values;
- REGISTRY_VALUE *rval;
+ struct regval_blob *rval;
UNISTR2 data;
uint16 *msz_wp;
int mbytes, ii;
diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c
index 79539598ab..5ae1cd8aa7 100644
--- a/source3/registry/reg_objects.c
+++ b/source3/registry/reg_objects.c
@@ -279,25 +279,25 @@ int regval_ctr_numvals(struct regval_ctr *ctr)
}
/***********************************************************************
- allocate memory for and duplicate a REGISTRY_VALUE.
+ allocate memory for and duplicate a struct regval_blob.
This is malloc'd memory so the caller should free it when done
**********************************************************************/
-REGISTRY_VALUE* dup_registry_value( REGISTRY_VALUE *val )
+struct regval_blob* dup_registry_value(struct regval_blob *val)
{
- REGISTRY_VALUE *copy = NULL;
+ struct regval_blob *copy = NULL;
if ( !val )
return NULL;
- if ( !(copy = SMB_MALLOC_P( REGISTRY_VALUE)) ) {
+ if ( !(copy = SMB_MALLOC_P( struct regval_blob)) ) {
DEBUG(0,("dup_registry_value: malloc() failed!\n"));
return NULL;
}
/* copy all the non-pointer initial data */
- memcpy( copy, val, sizeof(REGISTRY_VALUE) );
+ memcpy( copy, val, sizeof(struct regval_blob) );
copy->size = 0;
copy->data_p = NULL;
@@ -318,10 +318,10 @@ REGISTRY_VALUE* dup_registry_value( REGISTRY_VALUE *val )
}
/**********************************************************************
- free the memory allocated to a REGISTRY_VALUE
+ free the memory allocated to a struct regval_blob
*********************************************************************/
-void free_registry_value( REGISTRY_VALUE *val )
+void free_registry_value(struct regval_blob *val)
{
if ( !val )
return;
@@ -335,7 +335,7 @@ void free_registry_value( REGISTRY_VALUE *val )
/**********************************************************************
*********************************************************************/
-uint8* regval_data_p( REGISTRY_VALUE *val )
+uint8* regval_data_p(struct regval_blob *val)
{
return val->data_p;
}
@@ -343,7 +343,7 @@ uint8* regval_data_p( REGISTRY_VALUE *val )
/**********************************************************************
*********************************************************************/
-uint32 regval_size( REGISTRY_VALUE *val )
+uint32 regval_size(struct regval_blob *val)
{
return val->size;
}
@@ -351,7 +351,7 @@ uint32 regval_size( REGISTRY_VALUE *val )
/**********************************************************************
*********************************************************************/
-char* regval_name( REGISTRY_VALUE *val )
+char* regval_name(struct regval_blob *val)
{
return val->valuename;
}
@@ -359,7 +359,7 @@ char* regval_name( REGISTRY_VALUE *val )
/**********************************************************************
*********************************************************************/
-uint32 regval_type( REGISTRY_VALUE *val )
+uint32 regval_type(struct regval_blob *val)
{
return val->type;
}
@@ -369,7 +369,8 @@ uint32 regval_type( REGISTRY_VALUE *val )
since this memory will go away when the ctr is free()'d
**********************************************************************/
-REGISTRY_VALUE* regval_ctr_specific_value(struct regval_ctr *ctr, uint32 idx)
+struct regval_blob *regval_ctr_specific_value(struct regval_ctr *ctr,
+ uint32 idx)
{
if ( !(idx < ctr->num_values) )
return NULL;
@@ -394,13 +395,14 @@ bool regval_ctr_key_exists(struct regval_ctr *ctr, const char *value)
}
/***********************************************************************
- * compose a REGISTRY_VALUE from input data
+ * compose a struct regval_blob from input data
**********************************************************************/
-REGISTRY_VALUE *regval_compose(TALLOC_CTX *ctx, const char *name, uint16 type,
- const char *data_p, size_t size)
+struct regval_blob *regval_compose(TALLOC_CTX *ctx, const char *name,
+ uint16 type,
+ const char *data_p, size_t size)
{
- REGISTRY_VALUE *regval = TALLOC_P(ctx, REGISTRY_VALUE);
+ struct regval_blob *regval = TALLOC_P(ctx, struct regval_blob);
if (regval == NULL) {
return NULL;
@@ -439,10 +441,10 @@ int regval_ctr_addvalue(struct regval_ctr *ctr, const char *name, uint16 type,
/* allocate a slot in the array of pointers */
if ( ctr->num_values == 0 ) {
- ctr->values = TALLOC_P( ctr, REGISTRY_VALUE *);
+ ctr->values = TALLOC_P( ctr, struct regval_blob *);
} else {
ctr->values = TALLOC_REALLOC_ARRAY(ctr, ctr->values,
- REGISTRY_VALUE *,
+ struct regval_blob *,
ctr->num_values+1);
}
@@ -468,7 +470,7 @@ int regval_ctr_addvalue(struct regval_ctr *ctr, const char *name, uint16 type,
Add a new registry value to the array
**********************************************************************/
-int regval_ctr_copyvalue(struct regval_ctr *ctr, REGISTRY_VALUE *val)
+int regval_ctr_copyvalue(struct regval_ctr *ctr, struct regval_blob *val)
{
if ( val ) {
regval_ctr_addvalue(ctr, val->valuename, val->type,
@@ -501,7 +503,7 @@ int regval_ctr_delvalue(struct regval_ctr *ctr, const char *name)
ctr->num_values--;
if ( i < ctr->num_values )
memmove(&ctr->values[i], &ctr->values[i+1],
- sizeof(REGISTRY_VALUE*)*(ctr->num_values-i));
+ sizeof(struct regval_blob*)*(ctr->num_values-i));
return ctr->num_values;
}
@@ -511,7 +513,8 @@ int regval_ctr_delvalue(struct regval_ctr *ctr, const char *name)
No need to free memory since it is talloc'd.
**********************************************************************/
-REGISTRY_VALUE* regval_ctr_getvalue(struct regval_ctr *ctr, const char *name)
+struct regval_blob* regval_ctr_getvalue(struct regval_ctr *ctr,
+ const char *name)
{
int i;
@@ -529,7 +532,7 @@ REGISTRY_VALUE* regval_ctr_getvalue(struct regval_ctr *ctr, const char *name)
return the data_p as a uint32
**********************************************************************/
-uint32 regval_dword( REGISTRY_VALUE *val )
+uint32 regval_dword(struct regval_blob *val)
{
uint32 data;
@@ -542,7 +545,7 @@ uint32 regval_dword( REGISTRY_VALUE *val )
return the data_p as a character string
**********************************************************************/
-char *regval_sz(REGISTRY_VALUE *val)
+char *regval_sz(struct regval_blob *val)
{
char *data = NULL;
diff --git a/source3/registry/regfio.c b/source3/registry/regfio.c
index 006db7627c..cc6a6f4103 100644
--- a/source3/registry/regfio.c
+++ b/source3/registry/regfio.c
@@ -1657,7 +1657,8 @@ static uint32 nk_record_data_size( REGF_NK_REC *nk )
/*******************************************************************
*******************************************************************/
-static bool create_vk_record( REGF_FILE *file, REGF_VK_REC *vk, REGISTRY_VALUE *value )
+static bool create_vk_record(REGF_FILE *file, REGF_VK_REC *vk,
+ struct regval_blob *value)
{
char *name = regval_name(value);
REGF_HBIN *data_hbin;
@@ -1894,7 +1895,7 @@ static int hashrec_cmp( REGF_HASH_REC *h1, REGF_HASH_REC *h2 )
for ( i=0; i<nk->num_values; i++ ) {
uint32 vk_size, namelen, datalen;
- REGISTRY_VALUE *r;
+ struct regval_blob *r;
r = regval_ctr_specific_value( values, i );
create_vk_record( file, &nk->values[i], r );