diff options
| author | Colin Percival <cperciva@FreeBSD.org> | 2006-05-31 22:32:22 +0000 |
|---|---|---|
| committer | Colin Percival <cperciva@FreeBSD.org> | 2006-05-31 22:32:22 +0000 |
| commit | 72f6a0fa7ae2649befc0ff21477e0f444d8c4e16 (patch) | |
| tree | d8f9a485f92570b3c3e7ce9d0fe939bbc7cbc5c8 /sys | |
| parent | 4ec07c5e933c1a5c22ba6fc028b9748171273689 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/fs/smbfs/smbfs_vnops.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/fs/smbfs/smbfs_vnops.c b/sys/fs/smbfs/smbfs_vnops.c index d741c060e229..ebdb309fc710 100644 --- a/sys/fs/smbfs/smbfs_vnops.c +++ b/sys/fs/smbfs/smbfs_vnops.c @@ -1018,11 +1018,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; |
