summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2011-05-18 01:14:24 +0400
committerMatthieu Patou <mat@samba.org>2011-05-18 12:00:05 +0200
commit29a03cdbc297460415b27a5acc8ecfb7240cd2b4 (patch)
tree19161c8124fd87235e057e7ce7be253a5ca0bc0a
parent192198ad70474e56d4708b65482eee976ea78a05 (diff)
downloadsamba-29a03cdbc297460415b27a5acc8ecfb7240cd2b4.tar.gz
samba-29a03cdbc297460415b27a5acc8ecfb7240cd2b4.tar.bz2
samba-29a03cdbc297460415b27a5acc8ecfb7240cd2b4.zip
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).
-rw-r--r--source4/smb_server/smb/trans2.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/source4/smb_server/smb/trans2.c b/source4/smb_server/smb/trans2.c
index 163712379a..b3aa690e85 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;
}