From 29a03cdbc297460415b27a5acc8ecfb7240cd2b4 Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Wed, 18 May 2011 01:14:24 +0400 Subject: 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). --- source4/smb_server/smb/trans2.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'source4/smb_server') 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; } -- cgit