The branch, master has been updated
       via  ef3490e... s4:registry - "REGF backend" - don't ignore wrong-sized 
REG_DWORD/REG_DWORD_BIG_ENDIAN values
      from  3d5732f... s3: Remove the separate "child" argument from 
setup_domain_child()

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit ef3490e79959a3c4366f6981c67dbe5e529a3738
Author: Matthias Dieter Wallnöfer <mwallnoe...@yahoo.de>
Date:   Thu Apr 8 15:19:07 2010 +0200

    s4:registry - "REGF backend" - don't ignore wrong-sized 
REG_DWORD/REG_DWORD_BIG_ENDIAN values

-----------------------------------------------------------------------

Summary of changes:
 source4/lib/registry/regf.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/registry/regf.c b/source4/lib/registry/regf.c
index 615389e..3888b8e 100644
--- a/source4/lib/registry/regf.c
+++ b/source4/lib/registry/regf.c
@@ -1822,8 +1822,11 @@ static WERROR regf_set_value(struct hive_key *key, const 
char *name,
        /* Set the type and data */
        vk.data_length = data.length;
        vk.data_type = type;
-       if ((data.length == sizeof(uint32_t)) &&
-           ((type == REG_DWORD) || (type == REG_DWORD_BIG_ENDIAN))) {
+       if ((type == REG_DWORD) || (type == REG_DWORD_BIG_ENDIAN)) {
+               if (vk.data_length != sizeof(uint32_t)) {
+                       DEBUG(0, ("DWORD or DWORD_BIG_ENDIAN value with size 
other than 4 byte!\n"));
+                       return WERR_NOT_SUPPORTED;
+               }
                vk.data_length |= 0x80000000;
                vk.data_offset = IVAL(data.data, 0);
        } else {


-- 
Samba Shared Repository

Reply via email to