summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2021-10-15 16:52:10 -0700
committerRalph Boehme <slow@samba.org>2021-11-16 20:21:37 +0000
commitede3a45dfcaa91bbf8c64683ec51eeba9054cfbb (patch)
treebf6bf5cd738bdb6369476727b5ac08c6e23fd374
parentaf35c684a39ed59a750a03b71ef78522fc14ce13 (diff)
downloadsamba-ede3a45dfcaa91bbf8c64683ec51eeba9054cfbb.tar.gz
s3: smbd: Use dir_hnd->case_sensitive instead of conn->case_sensitive.
No logic change. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
-rw-r--r--source3/smbd/dir.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index f67e82613d5..8aa88409d92 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -477,7 +477,7 @@ static char *dptr_ReadDirName(TALLOC_CTX *ctx,
* providing case sensitive semantics or the underlying
* filesystem is case sensitive.
*/
- if (dptr->conn->case_sensitive ||
+ if (dptr->dir_hnd->case_sensitive ||
!(dptr->conn->fs_capabilities & FILE_CASE_SENSITIVE_SEARCH))
{
goto clean;
@@ -1717,7 +1717,7 @@ static bool SearchDir(struct smb_Dir *dir_hnd, const char *name, long *poffset)
if (dir_hnd->name_cache_size && dir_hnd->name_cache) {
for (i = dir_hnd->name_cache_index; i >= 0; i--) {
struct name_cache_entry *e = &dir_hnd->name_cache[i];
- if (e->name && (conn->case_sensitive ? (strcmp(e->name, name) == 0) : strequal(e->name, name))) {
+ if (e->name && (dir_hnd->case_sensitive ? (strcmp(e->name, name) == 0) : strequal(e->name, name))) {
*poffset = e->offset;
SeekDir(dir_hnd, e->offset);
return True;
@@ -1726,7 +1726,7 @@ static bool SearchDir(struct smb_Dir *dir_hnd, const char *name, long *poffset)
for (i = dir_hnd->name_cache_size - 1;
i > dir_hnd->name_cache_index; i--) {
struct name_cache_entry *e = &dir_hnd->name_cache[i];
- if (e->name && (conn->case_sensitive ? (strcmp(e->name, name) == 0) : strequal(e->name, name))) {
+ if (e->name && (dir_hnd->case_sensitive ? (strcmp(e->name, name) == 0) : strequal(e->name, name))) {
*poffset = e->offset;
SeekDir(dir_hnd, e->offset);
return True;
@@ -1739,7 +1739,7 @@ static bool SearchDir(struct smb_Dir *dir_hnd, const char *name, long *poffset)
dir_hnd->file_number = 0;
*poffset = START_OF_DIRECTORY_OFFSET;
while ((entry = ReadDirName(dir_hnd, poffset, NULL, &talloced))) {
- if (conn->case_sensitive ? (strcmp(entry, name) == 0) : strequal(entry, name)) {
+ if (dir_hnd->case_sensitive ? (strcmp(entry, name) == 0) : strequal(entry, name)) {
TALLOC_FREE(talloced);
return True;
}