aboutsummaryrefslogtreecommitdiff
path: root/website/static/security/patches/SA-06:16/smbfs.patch
blob: 826af157b273ee553be98edab84f1bed055f651e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Index: sys/fs/smbfs/smbfs_vnops.c
===================================================================
RCS file: /home/ncvs/src/sys/fs/smbfs/smbfs_vnops.c,v
retrieving revision 1.61
diff -u -I__FBSDID -r1.61 smbfs_vnops.c
--- sys/fs/smbfs/smbfs_vnops.c	13 Apr 2005 10:59:08 -0000	1.61
+++ sys/fs/smbfs/smbfs_vnops.c	27 May 2006 10:18:33 -0000
@@ -1018,11 +1018,18 @@
 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;