diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-10-26 00:59:06 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:04:43 -0500 |
commit | d5fd12648e004b47bbe5ed2623838866fedcbeb0 (patch) | |
tree | 837c57d7a2da2d3b61684c562541971721fb6e8a /source4/ntvfs/posix/pvfs_resolve.c | |
parent | bf3f9757e58625decd78d0b1d761e35593f2922a (diff) | |
download | samba-d5fd12648e004b47bbe5ed2623838866fedcbeb0.tar.gz samba-d5fd12648e004b47bbe5ed2623838866fedcbeb0.tar.xz samba-d5fd12648e004b47bbe5ed2623838866fedcbeb0.zip |
r3227: added a per-share option "case insensitive filesystem", that tells the
backend that the underlying filesystem is case insensitive, so it can
bypass the directory search if the name is not found.
(This used to be commit d84ade90ce7e03ec749d6ae8dcdcb41de85d836e)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_resolve.c')
-rw-r--r-- | source4/ntvfs/posix/pvfs_resolve.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/source4/ntvfs/posix/pvfs_resolve.c b/source4/ntvfs/posix/pvfs_resolve.c index 5d982745118..271dbc2b9a1 100644 --- a/source4/ntvfs/posix/pvfs_resolve.c +++ b/source4/ntvfs/posix/pvfs_resolve.c @@ -125,6 +125,18 @@ static NTSTATUS pvfs_case_search(struct pvfs_state *pvfs, struct pvfs_filename * } continue; } + + /* the filesystem might be case insensitive, in which + case a search is pointless unless the name is + mangled */ + if ((pvfs->flags & PVFS_FLAG_CI_FILESYSTEM) && + !pvfs_is_mangled_component(pvfs, components[i])) { + if (i < num_components-1) { + return NT_STATUS_OBJECT_PATH_NOT_FOUND; + } + partial_name = test_name; + continue; + } dir = opendir(partial_name); if (!dir) { @@ -319,12 +331,6 @@ NTSTATUS pvfs_resolve_name(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx, return pvfs_fill_dos_info(pvfs, *name); } - /* the filesystem might be case insensitive, in which - case a search is pointless */ - if (pvfs->flags & PVFS_FLAG_CI_FILESYSTEM) { - return NT_STATUS_OK; - } - /* search for a matching filename */ status = pvfs_case_search(pvfs, *name); |