summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-05-24 22:19:17 +0200
committerMichael Adam <obnox@samba.org>2010-05-25 10:35:25 +0200
commit9ccf66379a946cef87d915c5f0f7758adb11a4d6 (patch)
tree3567c2325ce5526fa81c863c94efd54b22327cac /source3/registry
parent70a81796fca29d3e924ab6a9396b1a4ab344a730 (diff)
downloadsamba-9ccf66379a946cef87d915c5f0f7758adb11a4d6.tar.gz
samba-9ccf66379a946cef87d915c5f0f7758adb11a4d6.tar.bz2
samba-9ccf66379a946cef87d915c5f0f7758adb11a4d6.zip
s3:registry: adapt callers of regval_ctr_addvalue to uint8 * instead of char *
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/reg_api.c4
-rw-r--r--source3/registry/reg_backend_db.c4
-rw-r--r--source3/registry/reg_backend_hkpt_params.c4
-rw-r--r--source3/registry/reg_backend_netlogon_params.c2
-rw-r--r--source3/registry/reg_backend_perflib.c12
-rw-r--r--source3/registry/reg_backend_printing.c36
-rw-r--r--source3/registry/reg_eventlog.c14
7 files changed, 38 insertions, 38 deletions
diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c
index e08bdb523f..ff2932c328 100644
--- a/source3/registry/reg_api.c
+++ b/source3/registry/reg_api.c
@@ -626,7 +626,7 @@ WERROR reg_setvalue(struct registry_key *key, const char *name,
}
res = regval_ctr_addvalue(key->values, name, val->type,
- (char *)value_data.data, value_data.length);
+ value_data.data, value_data.length);
TALLOC_FREE(value_data.data);
if (res == 0) {
@@ -750,7 +750,7 @@ static WERROR reg_load_tree(REGF_FILE *regfile, const char *topkeypath,
for (i=0; i<key->num_values; i++) {
regval_ctr_addvalue(values, key->values[i].valuename,
key->values[i].type,
- (char*)key->values[i].data,
+ key->values[i].data,
(key->values[i].data_size & ~VK_DATA_IN_OFFSET));
}
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index 3f9fdb6a0b..8f7930d7f8 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -256,7 +256,7 @@ static void regdb_ctr_add_value(struct regval_ctr *ctr,
switch(value->type) {
case REG_DWORD:
regval_ctr_addvalue(ctr, value->valuename, REG_DWORD,
- (char*)&value->data.dw_value,
+ (uint8_t *)&value->data.dw_value,
sizeof(uint32));
break;
@@ -1563,7 +1563,7 @@ static int regdb_unpack_values(struct regval_ctr *values, uint8 *buf, int buflen
if (size && data_p) {
regval_ctr_addvalue(values, valuename, type,
- (const char *)data_p, size);
+ (uint8_t *)data_p, size);
}
SAFE_FREE(data_p); /* 'B' option to tdb_unpack does a malloc() */
diff --git a/source3/registry/reg_backend_hkpt_params.c b/source3/registry/reg_backend_hkpt_params.c
index 479d9366b0..f0212f3e1b 100644
--- a/source3/registry/reg_backend_hkpt_params.c
+++ b/source3/registry/reg_backend_hkpt_params.c
@@ -43,7 +43,7 @@ static int hkpt_params_fetch_values(const char *key, struct regval_ctr *regvals)
base_index = reg_perfcount_get_base_index();
buffer_size = reg_perfcount_get_counter_names(base_index, &buffer);
- regval_ctr_addvalue(regvals, "Counters", REG_MULTI_SZ, buffer,
+ regval_ctr_addvalue(regvals, "Counters", REG_MULTI_SZ, (uint8 *)buffer,
buffer_size);
if(buffer_size > 0) {
@@ -51,7 +51,7 @@ static int hkpt_params_fetch_values(const char *key, struct regval_ctr *regvals)
}
buffer_size = reg_perfcount_get_counter_help(base_index, &buffer);
- regval_ctr_addvalue(regvals, "Help", REG_MULTI_SZ, buffer, buffer_size);
+ regval_ctr_addvalue(regvals, "Help", REG_MULTI_SZ, (uint8 *)buffer, buffer_size);
if(buffer_size > 0) {
SAFE_FREE(buffer);
}
diff --git a/source3/registry/reg_backend_netlogon_params.c b/source3/registry/reg_backend_netlogon_params.c
index 1d5ac719eb..5a5bcce577 100644
--- a/source3/registry/reg_backend_netlogon_params.c
+++ b/source3/registry/reg_backend_netlogon_params.c
@@ -41,7 +41,7 @@ static int netlogon_params_fetch_values(const char *key, struct regval_ctr *regv
}
regval_ctr_addvalue(regvals, "RefusePasswordChange", REG_DWORD,
- (char*)&dwValue, sizeof(dwValue));
+ (uint8_t *)&dwValue, sizeof(dwValue));
return regval_ctr_numvals(regvals);
}
diff --git a/source3/registry/reg_backend_perflib.c b/source3/registry/reg_backend_perflib.c
index 32f377634a..35564b4309 100644
--- a/source3/registry/reg_backend_perflib.c
+++ b/source3/registry/reg_backend_perflib.c
@@ -44,12 +44,12 @@ static int perflib_params(struct regval_ctr *regvals)
int version = 0x00010001;
base_index = reg_perfcount_get_base_index();
- regval_ctr_addvalue(regvals, "Base Index", REG_DWORD, (char *)&base_index, sizeof(base_index));
+ regval_ctr_addvalue(regvals, "Base Index", REG_DWORD, (uint8_t *)&base_index, sizeof(base_index));
last_counter = reg_perfcount_get_last_counter(base_index);
- regval_ctr_addvalue(regvals, "Last Counter", REG_DWORD, (char *)&last_counter, sizeof(last_counter));
+ regval_ctr_addvalue(regvals, "Last Counter", REG_DWORD, (uint8_t *)&last_counter, sizeof(last_counter));
last_help = reg_perfcount_get_last_help(last_counter);
- regval_ctr_addvalue(regvals, "Last Help", REG_DWORD, (char *)&last_help, sizeof(last_help));
- regval_ctr_addvalue(regvals, "Version", REG_DWORD, (char *)&version, sizeof(version));
+ regval_ctr_addvalue(regvals, "Last Help", REG_DWORD, (uint8_t *)&last_help, sizeof(last_help));
+ regval_ctr_addvalue(regvals, "Version", REG_DWORD, (uint8_t *)&version, sizeof(version));
return regval_ctr_numvals( regvals );
}
@@ -62,11 +62,11 @@ static int perflib_009_params(struct regval_ctr *regvals)
base_index = reg_perfcount_get_base_index();
buffer_size = reg_perfcount_get_counter_names(base_index, &buffer);
- regval_ctr_addvalue(regvals, "Counter", REG_MULTI_SZ, buffer, buffer_size);
+ regval_ctr_addvalue(regvals, "Counter", REG_MULTI_SZ, (uint8_t *)buffer, buffer_size);
if(buffer_size > 0)
SAFE_FREE(buffer);
buffer_size = reg_perfcount_get_counter_help(base_index, &buffer);
- regval_ctr_addvalue(regvals, "Help", REG_MULTI_SZ, buffer, buffer_size);
+ regval_ctr_addvalue(regvals, "Help", REG_MULTI_SZ, (uint8_t *)buffer, buffer_size);
if(buffer_size > 0)
SAFE_FREE(buffer);
diff --git a/source3/registry/reg_backend_printing.c b/source3/registry/reg_backend_printing.c
index 3990fb1c5e..08acb09b55 100644
--- a/source3/registry/reg_backend_printing.c
+++ b/source3/registry/reg_backend_printing.c
@@ -123,7 +123,7 @@ static int key_forms_fetch_values(const char *key, struct regval_ctr *values)
data[6] = form_index++;
data[7] = form->flag;
- regval_ctr_addvalue( values, form->name, REG_BINARY, (char*)data, sizeof(data) );
+ regval_ctr_addvalue(values, form->name, REG_BINARY, (uint8_t *)data, sizeof(data));
}
SAFE_FREE( forms_list );
@@ -148,7 +148,7 @@ static int key_forms_fetch_values(const char *key, struct regval_ctr *values)
data[6] = form_index++;
data[7] = form->flag;
- regval_ctr_addvalue(values, form->name, REG_BINARY, (char*)data, sizeof(data) );
+ regval_ctr_addvalue(values, form->name, REG_BINARY, (uint8_t *)data, sizeof(data));
}
SAFE_FREE(forms_list);
@@ -391,16 +391,16 @@ static void fill_in_printer_values(NT_PRINTER_INFO_LEVEL_2 *info2, struct regval
char *p;
uint32 printer_status = PRINTER_STATUS_OK;
- regval_ctr_addvalue( values, "Attributes", REG_DWORD, (char*)&info2->attributes, sizeof(info2->attributes) );
- regval_ctr_addvalue( values, "Priority", REG_DWORD, (char*)&info2->priority, sizeof(info2->attributes) );
- regval_ctr_addvalue( values, "ChangeID", REG_DWORD, (char*)&info2->changeid, sizeof(info2->changeid) );
- regval_ctr_addvalue( values, "Default Priority", REG_DWORD, (char*)&info2->default_priority, sizeof(info2->default_priority) );
+ regval_ctr_addvalue( values, "Attributes", REG_DWORD, (uint8_t *)&info2->attributes, sizeof(info2->attributes) );
+ regval_ctr_addvalue( values, "Priority", REG_DWORD, (uint8_t *)&info2->priority, sizeof(info2->attributes) );
+ regval_ctr_addvalue( values, "ChangeID", REG_DWORD, (uint8_t *)&info2->changeid, sizeof(info2->changeid) );
+ regval_ctr_addvalue( values, "Default Priority", REG_DWORD, (uint8_t *)&info2->default_priority, sizeof(info2->default_priority) );
/* lie and say everything is ok since we don't want to call print_queue_length() to get the real status */
- regval_ctr_addvalue( values, "Status", REG_DWORD, (char*)&printer_status, sizeof(info2->status) );
+ regval_ctr_addvalue( values, "Status", REG_DWORD, (uint8_t *)&printer_status, sizeof(info2->status) );
- regval_ctr_addvalue( values, "StartTime", REG_DWORD, (char*)&info2->starttime, sizeof(info2->starttime) );
- regval_ctr_addvalue( values, "UntilTime", REG_DWORD, (char*)&info2->untiltime, sizeof(info2->untiltime) );
+ regval_ctr_addvalue( values, "StartTime", REG_DWORD, (uint8_t *)&info2->starttime, sizeof(info2->starttime) );
+ regval_ctr_addvalue( values, "UntilTime", REG_DWORD, (uint8_t *)&info2->untiltime, sizeof(info2->untiltime) );
/* strip the \\server\ from this string */
if ( !(p = strrchr( info2->printername, '\\' ) ) )
@@ -431,7 +431,7 @@ static void fill_in_printer_values(NT_PRINTER_INFO_LEVEL_2 *info2, struct regval
if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
regval_ctr_addvalue(values, "Default Devmode", REG_BINARY,
- (const char *)blob.data, blob.length);
+ blob.data, blob.length);
}
}
@@ -448,7 +448,7 @@ static void fill_in_printer_values(NT_PRINTER_INFO_LEVEL_2 *info2, struct regval
&blob.data, &blob.length);
if (NT_STATUS_IS_OK(status)) {
regval_ctr_addvalue(values, "Security", REG_BINARY,
- (const char *)blob.data, blob.length);
+ blob.data, blob.length);
}
}
@@ -889,7 +889,7 @@ static int key_driver_fetch_keys( const char *key, struct regsubkey_ctr *subkeys
static void fill_in_driver_values(const struct spoolss_DriverInfo8 *r,
struct regval_ctr *values)
{
- char *buffer = NULL;
+ uint8_t *buffer = NULL;
int buffer_size = 0;
int i, length;
const char *filename;
@@ -910,7 +910,7 @@ static void fill_in_driver_values(const struct spoolss_DriverInfo8 *r,
regval_ctr_addvalue_sz(values, "Datatype", r->default_datatype);
regval_ctr_addvalue_sz(values, "Monitor", r->monitor_name);
- regval_ctr_addvalue( values, "Version", REG_DWORD, (char*)&r->version,
+ regval_ctr_addvalue( values, "Version", REG_DWORD, (uint8_t *)&r->version,
sizeof(r->version) );
if (r->dependent_files) {
@@ -925,25 +925,25 @@ static void fill_in_driver_values(const struct spoolss_DriverInfo8 *r,
length = strlen(filename);
- buffer = (char *)SMB_REALLOC( buffer, buffer_size + (length + 1)*sizeof(uint16) );
+ buffer = (uint8_t *)SMB_REALLOC( buffer, buffer_size + (length + 1)*sizeof(uint16) );
if ( !buffer ) {
break;
}
push_reg_sz(talloc_tos(), &data, filename);
- memcpy( buffer+buffer_size, (char*)data.data, data.length);
+ memcpy( buffer+buffer_size, data.data, data.length);
buffer_size += (length + 1)*sizeof(uint16);
}
/* terminated by double NULL. Add the final one here */
- buffer = (char *)SMB_REALLOC( buffer, buffer_size + 2 );
+ buffer = (uint8_t *)SMB_REALLOC( buffer, buffer_size + 2 );
if ( !buffer ) {
buffer_size = 0;
} else {
- buffer[buffer_size++] = '\0';
- buffer[buffer_size++] = '\0';
+ buffer[buffer_size++] = (uint8_t)'\0';
+ buffer[buffer_size++] = (uint8_t)'\0';
}
}
diff --git a/source3/registry/reg_eventlog.c b/source3/registry/reg_eventlog.c
index c2b4a75fa9..1ef932f17a 100644
--- a/source3/registry/reg_eventlog.c
+++ b/source3/registry/reg_eventlog.c
@@ -109,18 +109,18 @@ bool eventlog_init_keys(void)
uiRetention = 0x93A80;
regval_ctr_addvalue(values, "MaxSize", REG_DWORD,
- (char *)&uiMaxSize,
+ (uint8 *)&uiMaxSize,
sizeof(uint32));
regval_ctr_addvalue(values, "Retention", REG_DWORD,
- (char *)&uiRetention,
+ (uint8 *)&uiRetention,
sizeof(uint32));
regval_ctr_addvalue_sz(values, "PrimaryModule", *elogs);
push_reg_sz(talloc_tos(), &data, *elogs);
regval_ctr_addvalue(values, "Sources", REG_MULTI_SZ,
- (char *)data.data,
+ data.data,
data.length);
evtfilepath = talloc_asprintf(ctx,
@@ -130,7 +130,7 @@ bool eventlog_init_keys(void)
TALLOC_FREE(values);
}
push_reg_sz(talloc_tos(), &data, evtfilepath);
- regval_ctr_addvalue(values, "File", REG_EXPAND_SZ, (char *)data.data,
+ regval_ctr_addvalue(values, "File", REG_EXPAND_SZ, data.data,
data.length);
regdb_store_values(evtlogpath, values);
@@ -160,14 +160,14 @@ bool eventlog_init_keys(void)
uiCategoryCount = 0x00000007;
regval_ctr_addvalue( values, "CategoryCount",
REG_DWORD,
- ( char * ) &uiCategoryCount,
+ (uint8 *) &uiCategoryCount,
sizeof( uint32 ) );
push_reg_sz(talloc_tos(), &data,
"%SystemRoot%\\system32\\eventlog.dll");
regval_ctr_addvalue( values, "CategoryMessageFile",
REG_EXPAND_SZ,
- ( char * ) data.data,
+ data.data,
data.length);
regdb_store_values( evtlogpath, values );
}
@@ -304,7 +304,7 @@ bool eventlog_add_source( const char *eventlog, const char *sourcename,
}
dump_data( 1, blob.data, blob.length);
regval_ctr_addvalue( values, "Sources", REG_MULTI_SZ,
- ( char * ) blob.data, blob.length);
+ blob.data, blob.length);
regdb_store_values( evtlogpath, values );
data_blob_free(&blob);
} else {