s3: smbd: Moving lp_posix_pathnames() out of the lower-level code.
authorJeremy Allison <jra@samba.org>
Fri, 11 Dec 2015 22:33:22 +0000 (14:33 -0800)
committerJeremy Allison <jra@samba.org>
Sun, 13 Dec 2015 21:59:26 +0000 (22:59 +0100)
Ensure we set posix_pathnames early.

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

index 555658de0149a9d19f9b77022d447ad8f97cd48d..4b40df36ce519bfd292a216aa49d7cb12c76a5ad 100644 (file)
@@ -229,7 +229,8 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
        char *stream = NULL;
        bool component_was_mangled = False;
        bool name_has_wildcard = False;
-       bool posix_pathnames = false;
+       bool posix_pathnames = (lp_posix_pathnames() ||
+                               (ucf_flags & UCF_POSIX_PATHNAMES));
        bool allow_wcard_last_component =
            (ucf_flags & UCF_ALWAYS_ALLOW_WCARD_LCOMP);
        bool save_last_component = ucf_flags & UCF_SAVE_LCOMP;
@@ -348,9 +349,6 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
                }
        }
 
-       posix_pathnames = (lp_posix_pathnames() ||
-                               (ucf_flags & UCF_POSIX_PATHNAMES));
-
        /*
         * Strip off the stream, and add it back when we're done with the
         * base_name.