summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util_reg_api.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/source3/lib/util_reg_api.c b/source3/lib/util_reg_api.c
index 1616d24107..4347e5d6ed 100644
--- a/source3/lib/util_reg_api.c
+++ b/source3/lib/util_reg_api.c
@@ -45,6 +45,13 @@ WERROR registry_pull_value(TALLOC_CTX *mem_ctx,
}
value->v.dword = IVAL(data, 0);
break;
+ case REG_QWORD:
+ if ((size != 8) || (length != 8)) {
+ err = WERR_INVALID_PARAM;
+ goto error;
+ }
+ value->v.qword = BVAL(data, 0);
+ break;
case REG_SZ:
case REG_EXPAND_SZ:
{
@@ -84,7 +91,6 @@ WERROR registry_pull_value(TALLOC_CTX *mem_ctx,
memcpy((void *)tmp, (const void *)data, length);
tmp[num_ucs2] = 0;
}
-
if (length + 2 < length) {
/* Integer wrap. */
SAFE_FREE(tmp);
@@ -154,6 +160,15 @@ WERROR registry_push_value(TALLOC_CTX *mem_ctx,
}
break;
}
+ case REG_QWORD: {
+ char buf[8];
+ SBVAL(buf, 0, value->v.qword);
+ *presult = data_blob_talloc(mem_ctx, (void *)buf, 8);
+ if (presult->data == NULL) {
+ return WERR_NOMEM;
+ }
+ break;
+ }
case REG_SZ:
case REG_EXPAND_SZ: {
if (!push_reg_sz(mem_ctx, presult, value->v.sz.str))