[SCM] Samba Shared Repository - branch master updated

Jelmer Vernooij jelmer at samba.org
Sun Nov 15 12:20:43 MST 2009


The branch, master has been updated
       via  df3451a... Fix writing corrupt registries because of hardcoded version string in IDL.
       via  c319b96... Fix NULL pointer dereference in libgpo when listing Local Policy which has no security descriptor.
       via  5a7d48f... Fix writing corrupt REG_SZ to the registry.
       via  45bb24e... Fix trailing garbage in the hbin block.
      from  1e984e6... Added tests for descriptor inheritance on ldap modify.

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


- Log -----------------------------------------------------------------
commit df3451aec0e841da311fda837db6e79e09b88e3c
Author: Wilco Baan Hofman <wilco at baanhofman.nl>
Date:   Thu Oct 15 13:18:52 2009 +0200

    Fix writing corrupt registries because of hardcoded version string in IDL.
    
    Signed-off-by: Jelmer Vernooij <jelmer at samba.org>

commit c319b965a1a8ab2fe54d7def06f4a41fb193dde3
Author: Wilco Baan Hofman <wilco at baanhofman.nl>
Date:   Sun Oct 11 00:12:28 2009 +0200

    Fix NULL pointer dereference in libgpo when listing Local Policy which has no security descriptor.
    
    Signed-off-by: Jelmer Vernooij <jelmer at samba.org>

commit 5a7d48f82b06738924d6afedd53d79b0202d150a
Author: Wilco Baan Hofman <wilco at baanhofman.nl>
Date:   Sat Oct 10 21:42:27 2009 +0200

    Fix writing corrupt REG_SZ to the registry.
    
    Signed-off-by: Jelmer Vernooij <jelmer at samba.org>

commit 45bb24e93914d2fc5253052d75ef7e43a1c2b26c
Author: Wilco Baan Hofman <wilco at baanhofman.nl>
Date:   Thu Oct 8 12:36:30 2009 +0200

    Fix trailing garbage in the hbin block.
    
    This specifically fixes a problem showing extra bytes of garbage in list and
    print in regshell, even though the vk.data_length has the correct size.
    
    Signed-off-by: Jelmer Vernooij <jelmer at samba.org>

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

Summary of changes:
 libgpo/gpo_util.c             |    7 ++++---
 source4/lib/registry/regf.c   |    5 +++++
 source4/lib/registry/regf.idl |    2 +-
 source4/lib/registry/util.c   |    3 ++-
 4 files changed, 12 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libgpo/gpo_util.c b/libgpo/gpo_util.c
index 7a23b5c..fdf4c6d 100644
--- a/libgpo/gpo_util.c
+++ b/libgpo/gpo_util.c
@@ -321,10 +321,11 @@ void dump_gpo(ADS_STRUCT *ads,
 		}
 		dump_gp_ext(gp_ext, lvl);
 	}
+	if (gpo->security_descriptor) {
+		DEBUGADD(lvl,("security descriptor:\n"));
 
-	DEBUGADD(lvl,("security descriptor:\n"));
-
-	NDR_PRINT_DEBUG(security_descriptor, gpo->security_descriptor);
+		NDR_PRINT_DEBUG(security_descriptor, gpo->security_descriptor);
+	}
 }
 
 /****************************************************************
diff --git a/source4/lib/registry/regf.c b/source4/lib/registry/regf.c
index c5a74c7..a7fed42 100644
--- a/source4/lib/registry/regf.c
+++ b/source4/lib/registry/regf.c
@@ -261,6 +261,11 @@ static uint32_t hbin_store (struct regf_data *data, DATA_BLOB blob)
 
 	memcpy(dest.data, blob.data, blob.length);
 
+	/* Make sure that we have no tailing garbage in the block */
+	if (dest.length > blob.length) {
+		memset(dest.data + blob.length, 0, dest.length - blob.length);
+	}
+
 	return ret;
 }
 
diff --git a/source4/lib/registry/regf.idl b/source4/lib/registry/regf.idl
index ffd7072..fd58ad2 100644
--- a/source4/lib/registry/regf.idl
+++ b/source4/lib/registry/regf.idl
@@ -24,7 +24,7 @@ interface regf
 	
 	[noprint] struct regf_version {
 		[value(1)] uint32 major; 
-		[value(3)] uint32 minor;
+		uint32 minor;
 		[value(0)] uint32 release;
 		[value(1)] uint32 build;
 	};
diff --git a/source4/lib/registry/util.c b/source4/lib/registry/util.c
index 038b23f..88b9d18 100644
--- a/source4/lib/registry/util.c
+++ b/source4/lib/registry/util.c
@@ -124,8 +124,9 @@ _PUBLIC_ bool reg_string_to_val(TALLOC_CTX *mem_ctx,
 		case REG_SZ:
 		case REG_EXPAND_SZ:
       		convert_string_talloc_convenience(mem_ctx, iconv_convenience, CH_UNIX, CH_UTF16,
-						     data_str, strlen(data_str),
+						     data_str, strlen(data_str)+1,
 						     (void **)&data->data, &data->length, false);
+
 			break;
 
 		case REG_DWORD: {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list