summaryrefslogtreecommitdiff
path: root/source3/smbd/msdfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/msdfs.c')
-rw-r--r--source3/smbd/msdfs.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c
index efbc05ceb0..7f99a186aa 100644
--- a/source3/smbd/msdfs.c
+++ b/source3/smbd/msdfs.c
@@ -515,8 +515,8 @@ static NTSTATUS dfs_path_lookup(TALLOC_CTX *ctx,
{
char *p = NULL;
char *q = NULL;
- SMB_STRUCT_STAT sbuf;
NTSTATUS status;
+ struct smb_filename *smb_fname = NULL;
char *localpath = NULL;
char *canon_dfspath = NULL; /* Canonicalized dfs path. (only '/'
components). */
@@ -536,13 +536,22 @@ static NTSTATUS dfs_path_lookup(TALLOC_CTX *ctx,
* think this is needed. JRA.
*/
- status = unix_convert(ctx, conn, pdp->reqpath, search_flag, &localpath,
- NULL, &sbuf);
+ status = unix_convert(ctx, conn, pdp->reqpath, &smb_fname,
+ search_flag ? UCF_ALLOW_WCARD_LCOMP : 0);
+
if (!NT_STATUS_IS_OK(status) && !NT_STATUS_EQUAL(status,
NT_STATUS_OBJECT_PATH_NOT_FOUND)) {
return status;
}
+ status = get_full_smb_filename(ctx, smb_fname, &localpath);
+ if (!NT_STATUS_IS_OK(status)) {
+ TALLOC_FREE(smb_fname);
+ return status;
+ }
+
+ TALLOC_FREE(smb_fname);
+
/* Optimization - check if we can redirect the whole path. */
if (is_msdfs_link_internal(ctx, conn, localpath, pp_targetpath, NULL)) {