]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Add and use case_sensitive helper variable to unlink_internals().
authorJeremy Allison <jra@samba.org>
Tue, 9 Nov 2021 00:22:50 +0000 (16:22 -0800)
committerRalph Boehme <slow@samba.org>
Tue, 16 Nov 2021 20:21:37 +0000 (20:21 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/reply.c

index 6e576552fcd83099b463ad04dbc56a29d4cc4ebd..6ad76641fb8b5560dcfb9d7ca8751bc6a59330ae 100644 (file)
@@ -3359,6 +3359,9 @@ NTSTATUS unlink_internals(connection_struct *conn,
                long offset = 0;
                const char *dname = NULL;
                char *talloced = NULL;
+               bool case_sensitive =
+                       (smb_fname->flags & SMB_FILENAME_POSIX_PATH) ?
+                       true : conn->case_sensitive;
 
                if ((dirtype & SAMBA_ATTRIBUTES_MASK) == FILE_ATTRIBUTE_DIRECTORY) {
                        status = NT_STATUS_OBJECT_NAME_INVALID;
@@ -3427,7 +3430,7 @@ NTSTATUS unlink_internals(connection_struct *conn,
                        }
 
                        if(!mask_match(dname, fname_mask,
-                                      conn->case_sensitive)) {
+                                      case_sensitive)) {
                                TALLOC_FREE(frame);
                                TALLOC_FREE(talloced);
                                continue;