Subject: kern/22835: smbfs "accidentally" creates files on a read-only mount, and has case sensitivity issues
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <rquinn@sec.sprint.net>
List: netbsd-bugs
Date: 09/17/2003 20:45:23
>Number:         22835
>Category:       kern
>Synopsis:       smbfs "accidentally" creates files on a read-only mount, and has case sensitivity issues
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 17 20:46:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Rob Quinn
>Release:        NetBSD-current as of 17 Sep 2003
>Organization:
>Environment:
NetBSD strike.sec.sprint.net 1.6ZC NetBSD 1.6ZC (STRIKE) #18: Wed Sep 17 07:21:51 EDT 2003  rquinn@strike.sec.sprint.net:/usr/obj/STRIKE i386

>Description:
 I read-only mount Windows C$ shares onto my NetBSD box to scan them for virus
infections.  An "ls" of the mount shows the typical "WINNT" directory, but if I cd into
that directory with another name, like "winnt" or "WinNt" or "Winnt" it seems to create
a new empty directory for me on the remote machine.  There are no errors.  When I
unmount the directory and access the C$ share with smbclient (from Samba) I can see
these new directories but I can't access them.

 If I try to cd to a totally bogus directory like "XXXXXXX" then I get the expected
"No such file or directory".  Likewise "mkdir RRRRRR" gives "Read-only file system".
"mkdir winnT" gives "File exists".

>How-To-Repeat:
mount -r -t smbfs -o -I=<IPaddress>,-W=<domain> //<userid>@<NetBIOSname>/C\$ /mnt
cd /mnt
cd WinNT
cd ..
cd Winnt
cd ..
cd WINNt
cd ..
ls

>Fix:

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