From 02b3abec25ed0b303906c5dae9dd527171762d9a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 3 Sep 2005 17:17:30 +0000 Subject: r10007: Merge data_blk and data_len member of registry_value into a DATA_BLOB. Fix handling of REG_DWORD in the LDB backend. Fix a couple of warnings (This used to be commit 709fdc7ebf5a77cfb50359fad978884777decc3b) --- source4/lib/registry/tools/regpatch.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source4/lib/registry/tools/regpatch.c') diff --git a/source4/lib/registry/tools/regpatch.c b/source4/lib/registry/tools/regpatch.c index c2f01ce5b4..5f7d4376d4 100644 --- a/source4/lib/registry/tools/regpatch.c +++ b/source4/lib/registry/tools/regpatch.c @@ -704,9 +704,11 @@ static int nt_apply_reg_command_file(struct registry_context *r, const char *cmd DEBUG(0, ("Error removing value '%s'\n", val->name)); } modified = True; - } - else { - if(!W_ERROR_IS_OK(reg_val_set(tmp, val->name, val->type, val->val, strlen(val->val)))) { + } else { + DATA_BLOB blob; + blob.data = (uint8_t *)val->val; + blob.length = strlen(val->val); + if(!W_ERROR_IS_OK(reg_val_set(tmp, val->name, val->type, blob))) { DEBUG(0, ("Error adding new value '%s'\n", val->name)); continue; } -- cgit