diff options
author | Matthieu Patou <mat@matws.net> | 2011-05-16 20:51:20 +0400 |
---|---|---|
committer | Matthieu Patou <mat@samba.org> | 2011-05-17 01:33:27 +0200 |
commit | 28598e79330f37abbb709e2b317dde9c8d6c90b5 (patch) | |
tree | 2269d95ba370155d071783833d6604e74ca701ac /source4 | |
parent | 0d2019dcbaad7f82319c1aac1aae51ab45e77c52 (diff) | |
download | samba-28598e79330f37abbb709e2b317dde9c8d6c90b5.tar.gz samba-28598e79330f37abbb709e2b317dde9c8d6c90b5.tar.bz2 samba-28598e79330f37abbb709e2b317dde9c8d6c90b5.zip |
s4-dfs: Use a workaround for ndr relative pointer bug/limitation
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Tue May 17 01:33:27 CEST 2011 on sn-devel-104
Diffstat (limited to 'source4')
-rw-r--r-- | source4/smb_server/smb/trans2.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/source4/smb_server/smb/trans2.c b/source4/smb_server/smb/trans2.c index 0587779677..163712379a 100644 --- a/source4/smb_server/smb/trans2.c +++ b/source4/smb_server/smb/trans2.c @@ -867,24 +867,22 @@ static NTSTATUS fill_normal_dfs_referraltype(struct dfs_referral_type *ref, const char *dfs_path, const char *server_path, int isfirstoffset) { + ZERO_STRUCTP(ref); + ref->version = version; switch (version) { case 3: - ZERO_STRUCTP(ref); - 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 = dfs_path; - ref->referral.v3.referrals.r1.DFS_alt_path = dfs_path; - ref->referral.v3.referrals.r1.netw_address = server_path; + 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: - ZERO_STRUCTP(ref); - ref->version = version; ref->referral.v4.server_type = DFS_SERVER_NON_ROOT; /* "normal" referral seems to always include the GUID */ ref->referral.v4.size = 34; @@ -893,10 +891,9 @@ static NTSTATUS fill_normal_dfs_referraltype(struct dfs_referral_type *ref, ref->referral.v4.entry_flags = DFS_HEADER_FLAG_TARGET_BCK; } ref->referral.v4.ttl = 900; /* As w2k8r2 */ - ref->referral.v4.referrals.r1.DFS_path = dfs_path; - ref->referral.v4.referrals.r1.DFS_alt_path = dfs_path; - ref->referral.v4.referrals.r1.netw_address = server_path; - + ref->referral.v4.referrals.r1.DFS_path = talloc_strdup(ref, dfs_path); + 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; } return NT_STATUS_INVALID_LEVEL; |