The branch, master has been updated
       via  bebb17a... s4:WINREG torture - fix an error (missing "break" in a 
"switch")
       via  3a24888... s4:registry - "reg_ldb_pack_value" - provide workarounds 
when the server receives non-standard data.
       via  0426b5b... s4:registry - "LDB backend" - fix indentation
      from  97a974e... s4-smbtorture: use torture_context for debugging output 
everywhere in libnet torture tests.

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


- Log -----------------------------------------------------------------
commit bebb17ad0e8a9508bf6b083c4f709001fc6998c5
Author: Matthias Dieter Wallnöfer <mwallnoe...@yahoo.de>
Date:   Tue Mar 23 16:43:41 2010 +0100

    s4:WINREG torture - fix an error (missing "break" in a "switch")
    
    Sorry my fault - I didn't discover that earlier since we had binary data 
types
    support activated in s4.

commit 3a2488870f8f52e14948b50ec9b91de1c9a990b9
Author: Matthias Dieter Wallnöfer <mwallnoe...@yahoo.de>
Date:   Tue Mar 23 16:19:26 2010 +0100

    s4:registry - "reg_ldb_pack_value" - provide workarounds when the server 
receives non-standard data.
    
    For now we reset/delete the "data" attribute. Anyway there is the need to 
find
    a better solution (we probably want to change the format and save all data 
as
    we got it like Windows itself does).
    
    These workarounds are needed since for example the Windows 2000 Registry 
Editor
    initialises empty REG_SZ strings with content '\0' and length 1 (not a valid
    UTF16 sequence - "convert_string_talloc" breaks). So we simply reset/delete 
the
    "data" attribute which works (no content).

commit 0426b5b78678f4ffe564aa58a00a8f01790e7b1f
Author: Matthias Dieter Wallnöfer <mwallnoe...@yahoo.de>
Date:   Tue Mar 23 16:17:25 2010 +0100

    s4:registry - "LDB backend" - fix indentation

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

Summary of changes:
 source4/lib/registry/ldb.c   |   12 +++++++++++-
 source4/torture/rpc/winreg.c |    1 +
 2 files changed, 12 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c
index a4675c8..b897641 100644
--- a/source4/lib/registry/ldb.c
+++ b/source4/lib/registry/ldb.c
@@ -162,6 +162,9 @@ static struct ldb_message *reg_ldb_pack_value(struct 
ldb_context *ctx,
                                                     false);
                        if (ret2) {
                                ret = ldb_msg_add_value(msg, "data", val, NULL);
+                       } else {
+                               /* workaround for non-standard data */
+                               ret = ldb_msg_add_empty(msg, "data", 
LDB_FLAG_MOD_DELETE, NULL);
                        }
                } else {
                        ret = ldb_msg_add_empty(msg, "data", 
LDB_FLAG_MOD_DELETE, NULL);
@@ -181,6 +184,9 @@ static struct ldb_message *reg_ldb_pack_value(struct 
ldb_context *ctx,
                                        return NULL;
                                }
                                ret = ldb_msg_add_string(msg, "data", conv_str);
+                       } else {
+                               /* workaround for non-standard data */
+                               ret = ldb_msg_add_empty(msg, "data", 
LDB_FLAG_MOD_DELETE, NULL);
                        }
                } else {
                        ret = ldb_msg_add_empty(msg, "data", 
LDB_FLAG_MOD_DELETE, NULL);
@@ -192,12 +198,16 @@ static struct ldb_message *reg_ldb_pack_value(struct 
ldb_context *ctx,
                        if (data.length == sizeof(uint64_t)) {
                                char *conv_str;
 
-                               conv_str = talloc_asprintf(msg, "0x%16.16llx", 
BVAL(data.data, 0));
+                               conv_str = talloc_asprintf(msg, "0x%16.16llx",
+                                                          BVAL(data.data, 0));
                                if (conv_str == NULL) {
                                        talloc_free(msg);
                                        return NULL;
                                }
                                ret = ldb_msg_add_string(msg, "data", conv_str);
+                       } else {
+                               /* workaround for non-standard data */
+                               ret = ldb_msg_add_empty(msg, "data", 
LDB_FLAG_MOD_DELETE, NULL);
                        }
                } else {
                        ret = ldb_msg_add_empty(msg, "data", 
LDB_FLAG_MOD_DELETE, NULL);
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index da46c13..8b57dd8 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -1949,6 +1949,7 @@ static bool test_SetValue_simple(struct 
dcerpc_binding_handle *b,
                case REG_QWORD:
                        blob = data_blob_talloc_zero(tctx, 8);
                        SBVAL(blob.data, 0, value2);
+                       break;
                case REG_BINARY:
                        blob = data_blob_string_const("binary_blob");
                        break;


-- 
Samba Shared Repository

Reply via email to