[SCM] Samba Shared Repository - branch master updated
Günther Deschner
gd at samba.org
Thu May 20 10:44:52 MDT 2010
The branch, master has been updated
via aadd293... s3-registry: support REG_DWORD_BIG_ENDIAN.
via fb16ac2... s3-registry: support REG_QWORD.
from 026fae8... s3-utils: remove trailing whitespace from profiles utility.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit aadd29356ee5785d11ebe072459b7dd3747ed9ed
Author: Günther Deschner <gd at samba.org>
Date: Thu May 20 18:32:37 2010 +0200
s3-registry: support REG_DWORD_BIG_ENDIAN.
Just treat it as a REG_DWORD for now. Long term all these checks will need to
pass away, once we get a real registry...
Guenther
commit fb16ac229beb9ce9d37b49ab6cb630d60c95ee9e
Author: Günther Deschner <gd at samba.org>
Date: Wed Sep 2 21:25:32 2009 +0200
s3-registry: support REG_QWORD.
Guenther
-----------------------------------------------------------------------
Summary of changes:
source3/lib/util_reg_api.c | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/lib/util_reg_api.c b/source3/lib/util_reg_api.c
index 1616d24..347c5d6 100644
--- a/source3/lib/util_reg_api.c
+++ b/source3/lib/util_reg_api.c
@@ -39,12 +39,20 @@ WERROR registry_pull_value(TALLOC_CTX *mem_ctx,
switch (type) {
case REG_DWORD:
+ case REG_DWORD_BIG_ENDIAN:
if ((size != 4) || (length != 4)) {
err = WERR_INVALID_PARAM;
goto error;
}
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 +92,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);
@@ -145,7 +152,8 @@ WERROR registry_push_value(TALLOC_CTX *mem_ctx,
DATA_BLOB *presult)
{
switch (value->type) {
- case REG_DWORD: {
+ case REG_DWORD:
+ case REG_DWORD_BIG_ENDIAN: {
char buf[4];
SIVAL(buf, 0, value->v.dword);
*presult = data_blob_talloc(mem_ctx, (void *)buf, 4);
@@ -154,6 +162,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))
--
Samba Shared Repository
More information about the samba-cvs
mailing list