[SCM] Samba Shared Repository - branch master updated

Matthieu Patou mat at samba.org
Thu Apr 26 13:26:03 MDT 2012


The branch, master has been updated
       via  307e2d1 torture: change dfs tests now that we return a level 4 when level 4 is requested
       via  a73b1ed dfs_server: fix the response to please XP and Windows 2008R2 doing so avoid continious DFS requests from W2K8R2
      from  1fbc185 replace: Fix use of mktemp

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


- Log -----------------------------------------------------------------
commit 307e2d13878a1f7b3db62f2fb33d30981be55a1e
Author: Matthieu Patou <mat at matws.net>
Date:   Thu Apr 26 00:05:24 2012 -0700

    torture: change dfs tests now that we return a level 4 when level 4 is requested
    
    Autobuild-User: Matthieu Patou <mat at samba.org>
    Autobuild-Date: Thu Apr 26 21:25:37 CEST 2012 on sn-devel-104

commit a73b1ed580ec7ae1660bfc570c093a5eb0c6a531
Author: Matthieu Patou <mat at matws.net>
Date:   Tue Apr 24 00:24:39 2012 -0700

    dfs_server: fix the response to please XP and Windows 2008R2 doing so avoid continious DFS requests from W2K8R2

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

Summary of changes:
 dfs_server/dfs_server_ad.c      |   16 ++++++++++++----
 source4/torture/dfs/domaindfs.c |    5 ++---
 2 files changed, 14 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/dfs_server/dfs_server_ad.c b/dfs_server/dfs_server_ad.c
index 22d3263..b7004c5 100644
--- a/dfs_server/dfs_server_ad.c
+++ b/dfs_server/dfs_server_ad.c
@@ -49,8 +49,7 @@ static NTSTATUS fill_normal_dfs_referraltype(TALLOC_CTX *mem_ctx,
 	ZERO_STRUCTP(ref);
 	switch (version) {
 	case 4:
-		version = 3;
-# if 0
+		ref->version = version;
 		/* For the moment there is a bug with XP that don't seems to appriciate much
 		 * level4 so we return just level 3 for everyone
 		 */
@@ -75,7 +74,6 @@ static NTSTATUS fill_normal_dfs_referraltype(TALLOC_CTX *mem_ctx,
 			return NT_STATUS_NO_MEMORY;
 		}
 		return NT_STATUS_OK;
-#endif
 	case 3:
 		ref->version = version;
 		ref->referral.v3.server_type = DFS_SERVER_NON_ROOT;
@@ -117,6 +115,13 @@ static NTSTATUS fill_domain_dfs_referraltype(TALLOC_CTX *mem_ctx,
 		DEBUG(8, ("Called fill_domain_dfs_referraltype\n"));
 		ref->version = version;
 		ref->referral.v3.server_type = DFS_SERVER_NON_ROOT;
+#if 0
+		/* We use to have variable size, on Windows 2008R2 it's the same
+		 * and it seems that it gives better results so ... let's use the same
+		 * size.
+		 *
+		 * Additional note: XP SP2 will ask for version 3 and SP3 for version 4.
+		 */
 		/*
 		 * It's hard coded ... don't think it's a good way but the
 		 * sizeof return not the correct values
@@ -130,8 +135,11 @@ static NTSTATUS fill_domain_dfs_referraltype(TALLOC_CTX *mem_ctx,
 		} else {
 			ref->referral.v3.size = 34;
 		}
+#endif
+		/* As seen in w2k8r2 it always return the null GUID */
+		ref->referral.v3.size = 34;
 		ref->referral.v3.entry_flags = DFS_FLAG_REFERRAL_DOMAIN_RESP;
-		ref->referral.v3.ttl = 600; /* As w2k3 */
+		ref->referral.v3.ttl = 600; /* As w2k3 and w2k8r2*/
 		ref->referral.v3.referrals.r2.special_name = talloc_strdup(mem_ctx,
 									domain);
 		if (ref->referral.v3.referrals.r2.special_name == NULL) {
diff --git a/source4/torture/dfs/domaindfs.c b/source4/torture/dfs/domaindfs.c
index 89e9cc1..4981d0f 100644
--- a/source4/torture/dfs/domaindfs.c
+++ b/source4/torture/dfs/domaindfs.c
@@ -380,7 +380,6 @@ static bool test_getsysvolreferral(struct torture_context *tctx,
 						"Wrong DFS_path %s unable to find substring %s in it",
 						resp3.referral_entries[0].referral.v3.referrals.r1.netw_address,
 						str+1));
-#if 0
 	/*
 	 * Due to strange behavior with XP and level 4
 	 * we are obliged to degrade to level 3 ...
@@ -398,7 +397,8 @@ static bool test_getsysvolreferral(struct torture_context *tctx,
 	torture_assert_int_equal(tctx, memcmp(resp3.referral_entries[0].referral.v3.service_site_guid.value, zeros, 16), 0,
 				 talloc_asprintf(tctx,
 					"Service_site_guid is not NULL as expected"));
-#endif
+#if 0
+	/* Shouldn't be needed anymore*/
 	r3.in.req.max_referral_level = 4;
 
 	torture_assert_ntstatus_ok(tctx,
@@ -409,7 +409,6 @@ static bool test_getsysvolreferral(struct torture_context *tctx,
 				 talloc_asprintf(tctx,
 					"Not expected version for referral entry 0 got %d expected 3 in degraded mode",
 					resp3.referral_entries[0].version));
-#if 0
 	/*
 	 * We do not support fallback indication for the moment
 	 */


-- 
Samba Shared Repository


More information about the samba-cvs mailing list