summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_shortname.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-26 00:59:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:43 -0500
commitd5fd12648e004b47bbe5ed2623838866fedcbeb0 (patch)
tree837c57d7a2da2d3b61684c562541971721fb6e8a /source4/ntvfs/posix/pvfs_shortname.c
parentbf3f9757e58625decd78d0b1d761e35593f2922a (diff)
downloadsamba-d5fd12648e004b47bbe5ed2623838866fedcbeb0.tar.gz
samba-d5fd12648e004b47bbe5ed2623838866fedcbeb0.tar.bz2
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_shortname.c')
-rw-r--r--source4/ntvfs/posix/pvfs_shortname.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/source4/ntvfs/posix/pvfs_shortname.c b/source4/ntvfs/posix/pvfs_shortname.c
index c3c33fbc98..f80e532762 100644
--- a/source4/ntvfs/posix/pvfs_shortname.c
+++ b/source4/ntvfs/posix/pvfs_shortname.c
@@ -237,7 +237,7 @@ static BOOL is_mangled(struct pvfs_mangle_context *ctx, const char *name)
}
/* and the last part ... */
- return is_mangled_component(ctx, s,strlen(s));
+ return is_mangled_component(ctx, s, strlen(s));
}
@@ -301,7 +301,8 @@ static BOOL is_8_3(struct pvfs_mangle_context *ctx,
/* the length are all OK. Now check to see if the characters themselves are OK */
for (i=0; name[i]; i++) {
/* note that we may allow wildcard petterns! */
- if (!FLAG_CHECK(name[i], FLAG_ASCII|(allow_wildcards ? FLAG_WILDCARD : 0)) && name[i] != '.') {
+ if (!FLAG_CHECK(name[i], FLAG_ASCII|(allow_wildcards ? FLAG_WILDCARD : 0)) &&
+ name[i] != '.') {
return False;
}
}
@@ -686,3 +687,13 @@ BOOL pvfs_is_reserved_name(struct pvfs_state *pvfs, const char *name)
{
return is_reserved_name(pvfs->mangle_ctx, name);
}
+
+
+/*
+ see if a component of a filename could be a mangled name from our
+ mangling code
+*/
+BOOL pvfs_is_mangled_component(struct pvfs_state *pvfs, const char *name)
+{
+ return is_mangled_component(pvfs->mangle_ctx, name, strlen(name));
+}