From 84bbe948f3beff0fbdc51c9c63e2f674b70b5bbe Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 2 Oct 2004 12:25:02 +0000 Subject: r2786: - match on both long and short name for search posix backend - a final name component of . is illegal (This used to be commit 11c852170b83e5adbdb58407e1c7d3aeb4ab5bb8) --- source4/ntvfs/posix/pvfs_shortname.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'source4/ntvfs/posix/pvfs_shortname.c') diff --git a/source4/ntvfs/posix/pvfs_shortname.c b/source4/ntvfs/posix/pvfs_shortname.c index fe6fd8e030..33e601e429 100644 --- a/source4/ntvfs/posix/pvfs_shortname.c +++ b/source4/ntvfs/posix/pvfs_shortname.c @@ -24,6 +24,16 @@ #include "vfs_posix.h" +/* + return the short name for a component of a full name + TODO: this is obviously not very useful in its current form ! +*/ +char *pvfs_short_name_component(struct pvfs_state *pvfs, const char *name) +{ + return talloc_strndup(pvfs, name, 12); +} + + /* return the short name for a given entry in a directory TODO: this is obviously not very useful in its current form ! @@ -31,5 +41,5 @@ char *pvfs_short_name(struct pvfs_state *pvfs, struct pvfs_filename *name) { char *p = strrchr(name->full_name, '/'); - return talloc_strndup(name, p+1, 12); + return pvfs_short_name_component(pvfs, p+1); } -- cgit