summaryrefslogtreecommitdiffstats
path: root/source3/registry
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-05-23 23:59:34 +0200
committerMichael Adam <obnox@samba.org>2010-05-25 10:35:29 +0200
commit5fbf935ffce6204843fc498afd02dc3ba1dd9ff5 (patch)
treefe0545f2e926ec0ded7695bc1f61f486ea75e3e5 /source3/registry
parenta71dac488233a9d95df32361d10d96dde951988c (diff)
downloadsamba-5fbf935ffce6204843fc498afd02dc3ba1dd9ff5.tar.gz
samba-5fbf935ffce6204843fc498afd02dc3ba1dd9ff5.tar.xz
samba-5fbf935ffce6204843fc498afd02dc3ba1dd9ff5.zip
s3:registry: use regval_ctr/blob accessor functoin in reg_eventlog.c
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/reg_eventlog.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/source3/registry/reg_eventlog.c b/source3/registry/reg_eventlog.c
index b2bf69fa51..3fe35542a1 100644
--- a/source3/registry/reg_eventlog.c
+++ b/source3/registry/reg_eventlog.c
@@ -90,7 +90,9 @@ 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, struct regval_ctr))) {
+
+ werr = regval_ctr_init(ctx, &values);
+ if (!W_ERROR_IS_OK(werr)) {
DEBUG( 0, ( "talloc() failure!\n" ) );
return False;
}
@@ -147,7 +149,9 @@ bool eventlog_init_keys(void)
if (!evtlogpath) {
return false;
}
- if (!(values = TALLOC_ZERO_P(ctx, struct regval_ctr))) {
+
+ werr = regval_ctr_init(ctx, &values);
+ if (!W_ERROR_IS_OK(werr)) {
DEBUG( 0, ( "talloc() failure!\n" ) );
return False;
}
@@ -228,7 +232,8 @@ bool eventlog_add_source( const char *eventlog, const char *sourcename,
/* todo add to Sources */
- if (!( values = TALLOC_ZERO_P(ctx, struct regval_ctr))) {
+ werr = regval_ctr_init(ctx, &values);
+ if(!W_ERROR_IS_OK(werr)) {
DEBUG( 0, ( "talloc() failure!\n" ));
return false;
}
@@ -249,7 +254,7 @@ bool eventlog_add_source( const char *eventlog, const char *sourcename,
/* perhaps this adding a new string to a multi_sz should be a fn? */
/* check to see if it's there already */
- if ( rval->type != REG_MULTI_SZ ) {
+ if ( regval_type(rval) != REG_MULTI_SZ ) {
DEBUG( 0,
( "Wrong type for Sources, should be REG_MULTI_SZ\n" ) );
return False;
@@ -258,9 +263,9 @@ bool eventlog_add_source( const char *eventlog, const char *sourcename,
already_in = False;
wrklist = NULL;
- dump_data( 1, rval->data_p, rval->size );
+ dump_data(1, regval_data_p(rval), regval_size(rval));
- blob = data_blob_const(rval->data_p, rval->size);
+ blob = data_blob_const(regval_data_p(rval), regval_size(rval));
if (!pull_reg_multi_sz(talloc_tos(), &blob, &wrklist)) {
return false;
}
@@ -361,7 +366,8 @@ 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, struct regval_ctr ) ) ) {
+ werr = regval_ctr_init(ctx, &values);
+ if (!W_ERROR_IS_OK(werr)) {
DEBUG( 0, ( "talloc() failure!\n" ) );
return False;
}