From: Jeremy Allison Date: Tue, 9 Nov 2021 00:22:50 +0000 (-0800) Subject: s3: smbd: Add and use case_sensitive helper variable to unlink_internals(). X-Git-Tag: ldb-2.5.0~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=836d6f8a22696e1de4009dbde46bf355261f8e7a;p=thirdparty%2Fsamba.git s3: smbd: Add and use case_sensitive helper variable to unlink_internals(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 6e576552fcd..6ad76641fb8 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -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;