s3: smbd: Moving lp_posix_pathnames() out of the lower-level code.
authorJeremy Allison <jra@samba.org>
Fri, 11 Dec 2015 22:53:30 +0000 (14:53 -0800)
committerJeremy Allison <jra@samba.org>
Sun, 13 Dec 2015 21:59:27 +0000 (22:59 +0100)
Prepare to remove lp_posix_pathnames() out of ms_has_wild().
Check before calls to ms_has_wild().

Fix smbd_smb2_query_directory_send().

No SMB2 client uses unix extensions yet, but this is a placeholder
for when we move the POSIX pathnames bit into the SMB2 request
when moving to handle based code.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/smb2_query_directory.c

index 81f2e1772c53344be5af273f046f7b1336990ce2..73f2d6349712d2135359ab084d50ea7331930567 100644 (file)
@@ -325,7 +325,9 @@ static struct tevent_req *smbd_smb2_query_directory_send(TALLOC_CTX *mem_ctx,
                dptr_CloseDir(fsp);
        }
 
-       wcard_has_wild = ms_has_wild(in_file_name);
+       if (!lp_posix_pathnames()) {
+               wcard_has_wild = ms_has_wild(in_file_name);
+       }
 
        /* Ensure we've canonicalized any search path if not a wildcard. */
        if (!wcard_has_wild) {