diff options
-rw-r--r-- | source4/smb_server/smb/trans2.c | 31 |
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; } |