aboutsummaryrefslogtreecommitdiff
path: root/sys/fs
diff options
context:
space:
mode:
authorColin Percival <cperciva@FreeBSD.org>2006-05-31 22:35:32 +0000
committerColin Percival <cperciva@FreeBSD.org>2006-05-31 22:35:32 +0000
commit7459678c59a36ca2523460a638e17bc1d0365eec (patch)
tree22c9139c3d4039851e7157cf1f4161713e02de50 /sys/fs
parent16bd853276cbaaea5922bca3bebd2452b4a985f7 (diff)
Notes
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/smbfs/smbfs_vnops.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/fs/smbfs/smbfs_vnops.c b/sys/fs/smbfs/smbfs_vnops.c
index ec7b381a0e0a..2588369cf873 100644
--- a/sys/fs/smbfs/smbfs_vnops.c
+++ b/sys/fs/smbfs/smbfs_vnops.c
@@ -1076,11 +1076,18 @@ smbfs_advlock(ap)
static int
smbfs_pathcheck(struct smbmount *smp, const char *name, int nmlen, int nameiop)
{
- static const char *badchars = "*/\\:<>;?";
+ static const char *badchars = "*/:<>;?";
static const char *badchars83 = " +|,[]=";
const char *cp;
int i, error;
+ /*
+ * Backslash characters, being a path delimiter, are prohibited
+ * within a path component even for LOOKUP operations.
+ */
+ if (index(name, '\\') != NULL)
+ return ENOENT;
+
if (nameiop == LOOKUP)
return 0;
error = ENOENT;