s3: smbd: Correctly identify a snapshot path using UCF_GMT_PATHNAME.
authorJeremy Allison <jra@samba.org>
Thu, 18 May 2017 20:28:23 +0000 (13:28 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 22 May 2017 20:49:17 +0000 (22:49 +0200)
All our client code already does this correctly for @GMT names.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon May 22 22:49:17 CEST 2017 on sn-devel-144

source3/smbd/filename.c

index fbe8eb4b3257473c17c2b9607732a8b437d5775e..084849d4ba130b1e36bd6d891075b31f0d793360 100644 (file)
@@ -434,6 +434,7 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
        bool allow_wcard_last_component =
            (ucf_flags & UCF_ALWAYS_ALLOW_WCARD_LCOMP);
        bool save_last_component = ucf_flags & UCF_SAVE_LCOMP;
+       bool snapshot_path = (ucf_flags & UCF_GMT_PATHNAME);
        NTSTATUS status;
        int ret = -1;
 
@@ -516,7 +517,7 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
        }
 
        /* Canonicalize any @GMT- paths. */
-       if (posix_pathnames == false) {
+       if (snapshot_path) {
                status = canonicalize_snapshot_path(smb_fname);
                if (!NT_STATUS_IS_OK(status)) {
                        goto err;