diff options
author | Volker Lendecke <vl@samba.org> | 2017-02-12 20:12:10 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2017-02-15 11:40:32 +0100 |
commit | 129015d1a664e97410fa5fe2aef6bd8c494ffb5b (patch) | |
tree | f25bf9868a5a2383ea5f24362061a95a08f84a9e /source4/ntvfs | |
parent | e08110ece699eeb1b9ef688c92bf84c69a6fa5fc (diff) | |
download | samba-129015d1a664e97410fa5fe2aef6bd8c494ffb5b.tar.gz |
lib: Fix "is_case_sensitive" in "ms_fnmatch_protocol"' callers
In the optimization in f969be54417 I got the boolean flag "is_case_sensitive"
wrong. The behaviour was case *insensitive*, so all the flags should have been
"false", keeping the old behaviour. While there, simplify "mask_match" in
source4 client.c
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Feb 15 11:40:32 CET 2017 on sn-devel-144
Diffstat (limited to 'source4/ntvfs')
-rw-r--r-- | source4/ntvfs/cifs_posix_cli/svfs_util.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_dirlist.c | 8 | ||||
-rw-r--r-- | source4/ntvfs/simple/svfs_util.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/source4/ntvfs/cifs_posix_cli/svfs_util.c b/source4/ntvfs/cifs_posix_cli/svfs_util.c index ec2e9330806..0efab832199 100644 --- a/source4/ntvfs/cifs_posix_cli/svfs_util.c +++ b/source4/ntvfs/cifs_posix_cli/svfs_util.c @@ -106,7 +106,7 @@ struct cifspsx_dir *cifspsx_list_unix(TALLOC_CTX *mem_ctx, struct ntvfs_request /* check it matches the wildcard pattern */ if (ms_fnmatch_protocol(low_mask, low_name, PROTOCOL_NT1, - true) != 0) { + false) != 0) { continue; } diff --git a/source4/ntvfs/posix/pvfs_dirlist.c b/source4/ntvfs/posix/pvfs_dirlist.c index d86fce4e852..a5034040154 100644 --- a/source4/ntvfs/posix/pvfs_dirlist.c +++ b/source4/ntvfs/posix/pvfs_dirlist.c @@ -200,7 +200,7 @@ const char *pvfs_list_next(struct pvfs_dir *dir, off_t *ofs) (*ofs) = DIR_OFFSET_DOTDOT; dir->offset = *ofs; if (ms_fnmatch_protocol(dir->pattern, ".", protocol, - true) == 0) { + false) == 0) { dcache_add(dir, "."); return "."; } @@ -210,7 +210,7 @@ const char *pvfs_list_next(struct pvfs_dir *dir, off_t *ofs) (*ofs) = DIR_OFFSET_BASE; dir->offset = *ofs; if (ms_fnmatch_protocol(dir->pattern, "..", protocol, - true) == 0) { + false) == 0) { dcache_add(dir, ".."); return ".."; } @@ -231,11 +231,11 @@ const char *pvfs_list_next(struct pvfs_dir *dir, off_t *ofs) } if (ms_fnmatch_protocol(dir->pattern, dname, protocol, - true) != 0) { + false) != 0) { char *short_name = pvfs_short_name_component(dir->pvfs, dname); if (short_name == NULL || ms_fnmatch_protocol(dir->pattern, short_name, - protocol, true) != 0) { + protocol, false) != 0) { talloc_free(short_name); continue; } diff --git a/source4/ntvfs/simple/svfs_util.c b/source4/ntvfs/simple/svfs_util.c index 21f20c58ac8..d1901ae0199 100644 --- a/source4/ntvfs/simple/svfs_util.c +++ b/source4/ntvfs/simple/svfs_util.c @@ -102,7 +102,7 @@ struct svfs_dir *svfs_list_unix(TALLOC_CTX *mem_ctx, struct ntvfs_request *req, /* check it matches the wildcard pattern */ if (ms_fnmatch_protocol(low_mask, low_name, PROTOCOL_NT1, - true) != 0) { + false) != 0) { continue; } |