[SCM] Samba Shared Repository - branch master updated

José A. Rivera jarrpa at samba.org
Thu Sep 24 20:34:02 UTC 2015


The branch, master has been updated
       via  1b8ea12 witness: fix length calculation in witness_IPaddrInfoList IDL.
       via  f2fcbf2 witness: fix IP address endianess in witness_IPaddrInfo IDL.
       via  23c17d9 s4-torture: add test to verify WITNESS_NOTIFY_CLIENT_MOVE message marshalling.
      from  2266e24 smbd: Set process name for notifyd process

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


- Log -----------------------------------------------------------------
commit 1b8ea12aa7627ace735923e68e59bc3d5cce3676
Author: Günther Deschner <gd at samba.org>
Date:   Thu Sep 24 06:40:39 2015 +0200

    witness: fix length calculation in witness_IPaddrInfoList IDL.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Jose A. Rivera <jarrpa at samba.org>
    
    Autobuild-User(master): José A. Rivera <jarrpa at samba.org>
    Autobuild-Date(master): Thu Sep 24 22:33:28 CEST 2015 on sn-devel-104

commit f2fcbf24576110c9feaf5cc07feb1c469fa9247c
Author: Günther Deschner <gd at samba.org>
Date:   Thu Sep 24 06:40:19 2015 +0200

    witness: fix IP address endianess in witness_IPaddrInfo IDL.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Jose A. Rivera <jarrpa at samba.org>

commit 23c17d95342dc335bab03112f1c615cd3e9ea0d7
Author: Günther Deschner <gd at samba.org>
Date:   Thu Sep 24 02:47:35 2015 +0200

    s4-torture: add test to verify WITNESS_NOTIFY_CLIENT_MOVE message marshalling.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Jose A. Rivera <jarrpa at samba.org>

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

Summary of changes:
 librpc/idl/witness.idl        |  6 +++---
 source4/torture/ndr/witness.c | 44 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/witness.idl b/librpc/idl/witness.idl
index febae25..1557bad 100644
--- a/librpc/idl/witness.idl
+++ b/librpc/idl/witness.idl
@@ -100,12 +100,12 @@ interface witness
 
 	typedef [flag(NDR_NOALIGN|NDR_LITTLE_ENDIAN),gensize] struct {
 		witness_IPaddrInfo_flags flags;
-		ipv4address ipv4;
-		ipv6address ipv6;
+		[flag(NDR_BIG_ENDIAN)] ipv4address ipv4;
+		[flag(NDR_BIG_ENDIAN)] ipv6address ipv6;
 	} witness_IPaddrInfo;
 
 	typedef [flag(NDR_NOALIGN|NDR_LITTLE_ENDIAN)] struct {
-		[value(r->num*ndr_size_witness_IPaddrInfo(r->addr, ndr->flags))] uint32 length;
+		[value(12+(r->num*ndr_size_witness_IPaddrInfo(r->addr, ndr->flags)))] uint32 length;
 		[value(0)] uint32 reserved;
 		uint32 num;
 		witness_IPaddrInfo addr[num];
diff --git a/source4/torture/ndr/witness.c b/source4/torture/ndr/witness.c
index e837eab..9ba97d3 100644
--- a/source4/torture/ndr/witness.c
+++ b/source4/torture/ndr/witness.c
@@ -268,6 +268,42 @@ static bool witness_AsyncNotify_check_OUT(struct torture_context *tctx,
 	return true;
 }
 
+static const uint8_t witness_AsyncNotify_data_move_OUT[] = {
+	0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
+	0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, 0x24, 0x00, 0x00, 0x00,
+	0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+	0x01, 0x00, 0x00, 0x00, 0xc0, 0xa8, 0x03, 0x2d, 0x00, 0x00, 0x00, 0x00,
+	0x38, 0xe8, 0xeb, 0x26, 0x8e, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x60, 0x26,
+	0x00, 0x00, 0x00, 0x00
+};
+
+static bool witness_AsyncNotify_check_move_OUT(struct torture_context *tctx,
+					       struct witness_AsyncNotify *r)
+{
+	struct witness_notifyResponse *n;
+	struct witness_IPaddrInfoList *i;
+
+	torture_assert(tctx, r->out.response, "r->out.response");
+
+	n = *(r->out.response);
+
+	torture_assert_int_equal(tctx, n->type, WITNESS_NOTIFY_CLIENT_MOVE, "type");
+	torture_assert_int_equal(tctx, n->length, 36, "length");
+	torture_assert_int_equal(tctx, n->num, 1, "num");
+
+	i = &n->messages[0].client_move;
+
+	torture_assert_int_equal(tctx, i->length, 36, "i->length");
+	torture_assert_int_equal(tctx, i->reserved, 0, "i->reserved");
+	torture_assert_int_equal(tctx, i->num, 1, "i->num");
+
+	torture_assert_int_equal(tctx, i->addr[0].flags, WITNESS_IPADDR_V4, "i->addr[0].flags");
+	torture_assert_str_equal(tctx, i->addr[0].ipv4, "192.168.3.45", "i->addr[0].ipv4");
+	torture_assert_str_equal(tctx, i->addr[0].ipv6, "0000:0000:38e8:eb26:8e00:0000:009e:6026", "i->addr[0].ipv6");
+
+	return true;
+}
+
 struct torture_suite *ndr_witness_suite(TALLOC_CTX *ctx)
 {
 	struct torture_suite *suite = torture_suite_create(ctx, "witness");
@@ -320,5 +356,13 @@ struct torture_suite *ndr_witness_suite(TALLOC_CTX *ctx)
 					    NDR_OUT,
 					    0,
 					    witness_AsyncNotify_check_OUT);
+
+	torture_suite_add_ndr_pullpush_fn_test_flags(suite,
+					    witness_AsyncNotify,
+					    witness_AsyncNotify_data_move_OUT,
+					    NDR_OUT,
+					    0,
+					    witness_AsyncNotify_check_move_OUT);
+
 	return suite;
 }


-- 
Samba Shared Repository



More information about the samba-cvs mailing list