kern/140068: [patch] smbfs does not allow semicolon in filenames, but should

Tom Uffner tom at uffner.com
Thu Oct 29 06:50:02 UTC 2009


>Number:         140068
>Category:       kern
>Synopsis:       [patch] smbfs does not allow semicolon in filenames, but should
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 29 06:50:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Tom Uffner
>Release:        7.x, 8.0, 9-current
>Organization:
>Environment:
FreeBSD xiombarg.uffner.com 9.0-CURRENT FreeBSD 9.0-CURRENT #52: Tue Oct 27 03:32:12 EDT 2009     root at xiombarg.uffner.com:/usr/obj/usr/src/sys/XIOMBARG  i386

>Description:
Semicolon (';') is a legal character in modern MS Windows filesystems (FAT32 & NTFS). it is allowed by Windows, Linux & Samba. But on FreeBSD using mount_smbfs, it is not possible to create a file or directory with a semicolon in the name.
>How-To-Repeat:
mount a windows or samba share. `% touch a\;1' or `% mkdir b\;1'
>Fix:
delete ';' from badchars in sys/fs/smbfs/smbfs_vnops.c

Patch attached with submission follows:

--- sys/fs/smbfs/smbfs_vnops.c.orig     2009-10-29 00:00:31.000000000 -0400
+++ sys/fs/smbfs/smbfs_vnops.c  2009-10-29 00:02:18.000000000 -0400
@@ -1036,7 +1036,7 @@
 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;


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list