[SCM] Samba Shared Repository - branch master updated

Matthieu Patou mat at samba.org
Wed May 18 05:04:02 MDT 2011


The branch, master has been updated
       via  b25f7d4 torture: desactivate the level 4 tests for DFS referral
       via  29a03cd s4-dfs: Add workaround so that XP really works well
      from  192198a s3-modules: Fix the build of gpfs.c on RHEL 6.0 with gpfs 3.4.0-4

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


- Log -----------------------------------------------------------------
commit b25f7d4020276c199b29597ba4c575d9f8f8a4e3
Author: Matthieu Patou <mat at matws.net>
Date:   Wed May 18 08:44:05 2011 +0400

    torture: desactivate the level 4 tests for DFS referral
    
    Autobuild-User: Matthieu Patou <mat at samba.org>
    Autobuild-Date: Wed May 18 13:04:00 CEST 2011 on sn-devel-104

commit 29a03cdbc297460415b27a5acc8ecfb7240cd2b4
Author: Matthieu Patou <mat at matws.net>
Date:   Wed May 18 01:14:24 2011 +0400

    s4-dfs: Add workaround so that XP really works well
    
    XP seems to have problems working at a correct speed (or even
    working at all if we return referral of level 4).

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

Summary of changes:
 source4/smb_server/smb/trans2.c |   31 ++++++++++++++++++-------------
 source4/torture/dfs/domaindfs.c |   19 +++++++++++++++++--
 2 files changed, 35 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/smb_server/smb/trans2.c b/source4/smb_server/smb/trans2.c
index 1637123..b3aa690 100644
--- a/source4/smb_server/smb/trans2.c
+++ b/source4/smb_server/smb/trans2.c
@@ -868,21 +868,13 @@ static NTSTATUS fill_normal_dfs_referraltype(struct dfs_referral_type *ref,
 					     const char *server_path, int isfirstoffset)
 {
 	ZERO_STRUCTP(ref);
-	ref->version = version;
-
 	switch (version) {
-	case 3:
-		ref->referral.v3.server_type = DFS_SERVER_NON_ROOT;
-		/* "normal" referral seems to always include the GUID */
-		ref->referral.v3.size = 34;
-
-		ref->referral.v3.entry_flags = 0;
-		ref->referral.v3.ttl = 600; /* As w2k3 */
-		ref->referral.v3.referrals.r1.DFS_path = talloc_strdup(ref, dfs_path);
-		ref->referral.v3.referrals.r1.DFS_alt_path = talloc_strdup(ref, dfs_path);
-		ref->referral.v3.referrals.r1.netw_address = talloc_strdup(ref, server_path);
-		return NT_STATUS_OK;
 	case 4:
+		version = 3;
+# if 0
+		/* 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
+		 */
 		ref->referral.v4.server_type = DFS_SERVER_NON_ROOT;
 		/* "normal" referral seems to always include the GUID */
 		ref->referral.v4.size = 34;
@@ -895,6 +887,19 @@ static NTSTATUS fill_normal_dfs_referraltype(struct dfs_referral_type *ref,
 		ref->referral.v4.referrals.r1.DFS_alt_path = talloc_strdup(ref, dfs_path);
 		ref->referral.v4.referrals.r1.netw_address = talloc_strdup(ref, server_path);
 		return NT_STATUS_OK;
+#endif
+	case 3:
+		ref->version = version;
+		ref->referral.v3.server_type = DFS_SERVER_NON_ROOT;
+		/* "normal" referral seems to always include the GUID */
+		ref->referral.v3.size = 34;
+
+		ref->referral.v3.entry_flags = 0;
+		ref->referral.v3.ttl = 600; /* As w2k3 */
+		ref->referral.v3.referrals.r1.DFS_path = talloc_strdup(ref, dfs_path);
+		ref->referral.v3.referrals.r1.DFS_alt_path = talloc_strdup(ref, dfs_path);
+		ref->referral.v3.referrals.r1.netw_address = talloc_strdup(ref, server_path);
+		return NT_STATUS_OK;
 	}
 	return NT_STATUS_INVALID_LEVEL;
 }
diff --git a/source4/torture/dfs/domaindfs.c b/source4/torture/dfs/domaindfs.c
index fafae17..4914217 100644
--- a/source4/torture/dfs/domaindfs.c
+++ b/source4/torture/dfs/domaindfs.c
@@ -380,7 +380,11 @@ 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 ...
+	 */
 	r3.in.req.max_referral_level = 4;
 
 	torture_assert_ntstatus_ok(tctx,
@@ -394,6 +398,17 @@ 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
+	r3.in.req.max_referral_level = 4;
+
+	torture_assert_ntstatus_ok(tctx,
+		   dfs_cli_do_call(cli->tree, &r3),
+		   "Get sysvol Domain referral failed");
+
+	torture_assert_int_equal(tctx, resp3.referral_entries[0].version, 3,
+				 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
@@ -401,12 +416,12 @@ static bool test_getsysvolreferral(struct torture_context *tctx,
 	torture_assert_int_equal(tctx, resp3.header_flags,
 					DFS_HEADER_FLAG_STORAGE_SVR | DFS_HEADER_FLAG_TARGET_BCK,
 					"Header flag different it's not a referral for a storage with fallback");
-#endif
 	torture_assert_int_equal(tctx, resp3.referral_entries[0].referral.v4.entry_flags,
 				 DFS_FLAG_REFERRAL_FIRST_TARGET_SET,
 				 talloc_asprintf(tctx,
 					"Wrong entry flag expected to have a non domain response and got %d",
 					resp3.referral_entries[0].referral.v4.entry_flags));
+#endif
 	return true;
 }
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list