summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/registry/util.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/source4/lib/registry/util.c b/source4/lib/registry/util.c
index ba284de8db..fd75f91aac 100644
--- a/source4/lib/registry/util.c
+++ b/source4/lib/registry/util.c
@@ -84,9 +84,6 @@ _PUBLIC_ char *reg_val_data_string(TALLOC_CTX *mem_ctx,
NULL, false);
}
break;
- case REG_BINARY:
- ret = data_blob_hex_string_upper(mem_ctx, &data);
- break;
case REG_DWORD:
if (data.length == sizeof(uint32_t)) {
ret = talloc_asprintf(mem_ctx, "0x%8.8x",
@@ -99,12 +96,9 @@ _PUBLIC_ char *reg_val_data_string(TALLOC_CTX *mem_ctx,
BVAL(data.data, 0));
}
break;
- case REG_MULTI_SZ:
- /* FIXME: We don't support this yet */
- break;
+ case REG_BINARY:
default:
- /* FIXME */
- /* Other datatypes aren't supported -> return "NULL" */
+ ret = data_blob_hex_string_upper(mem_ctx, &data);
break;
}
@@ -159,9 +153,6 @@ _PUBLIC_ bool reg_string_to_val(TALLOC_CTX *mem_ctx,
(void **)&data->data,
&data->length, false);
break;
- case REG_BINARY:
- *data = strhex_to_data_blob(mem_ctx, data_str);
- break;
case REG_DWORD: {
uint32_t tmp = strtol(data_str, NULL, 0);
*data = data_blob_talloc(mem_ctx, NULL, sizeof(uint32_t));
@@ -174,13 +165,10 @@ _PUBLIC_ bool reg_string_to_val(TALLOC_CTX *mem_ctx,
SBVAL(data->data, 0, tmp);
}
break;
- case REG_MULTI_SZ:
- /* FIXME: We don't support this yet */
- return false;
+ case REG_BINARY:
default:
- /* FIXME */
- /* Other datatypes aren't supported -> return no success */
- return false;
+ *data = strhex_to_data_blob(mem_ctx, data_str);
+ break;
}
return true;
}