diff options
author | Jeremy Allison <jra@samba.org> | 2020-02-11 14:21:12 -0800 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2020-02-18 21:08:33 +0000 |
commit | 1ffc52abedae9787f745795a4f502c26b4c005d1 (patch) | |
tree | 29ddcbb66117e45bde57b021a1c160e98348249d /source3/smbd | |
parent | 07a3cd56cddfc0e27a75ca76e556e2fdb18c3291 (diff) | |
download | samba-1ffc52abedae9787f745795a4f502c26b4c005d1.tar.gz |
s3: DFS: Parse the returned target path in dfs_path_lookup().
Currently unused, but this will ease the transition to
using SMB_VFS_READ_DFS_PATHAT().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/msdfs.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c index fa8272f73bb..ada261651cb 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -855,6 +855,31 @@ static NTSTATUS dfs_path_lookup(TALLOC_CTX *ctx, status = NT_STATUS_OK; out: + + if (NT_STATUS_EQUAL(status, NT_STATUS_PATH_NOT_COVERED)) { + /* + * We're returning a DFS redirect. If we have + * the targetpath, parse it here. This will ease + * the code transition to SMB_VFS_READ_DFS_PATHAT(). + * (which will make this code redundent). + */ + if (pp_targetpath != NULL) { + struct referral *preflist = NULL; + size_t referral_count = 0; + + bool ok = parse_msdfs_symlink(ctx, + lp_msdfs_shuffle_referrals(SNUM(conn)), + *pp_targetpath, + &preflist, + &referral_count); + TALLOC_FREE(preflist); + if (!ok) { + status = NT_STATUS_NO_MEMORY; + } + } + + } + TALLOC_FREE(smb_fname); return status; } |