summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-09-02 21:25:32 +0200
committerGünther Deschner <gd@samba.org>2010-05-20 18:32:08 +0200
commitfb16ac229beb9ce9d37b49ab6cb630d60c95ee9e (patch)
treedaabca06d9e1742d766f298978128bc485755892 /source3/lib
parent026fae89d6628669ce594493ff7c27485e479603 (diff)
downloadsamba-fb16ac229beb9ce9d37b49ab6cb630d60c95ee9e.tar.gz
samba-fb16ac229beb9ce9d37b49ab6cb630d60c95ee9e.tar.bz2
samba-fb16ac229beb9ce9d37b49ab6cb630d60c95ee9e.zip
s3-registry: support REG_QWORD.
Guenther
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))