Subject: kern/9034: can write to a mounted ro msdos disk
To: None <>
From: Shane Hutchison <>
List: netbsd-bugs
Date: 12/20/1999 11:48:39
>Number:         9034
>Category:       kern
>Synopsis:       can write to a mounted ro msdos disk
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 20 11:48:01 1999
>Originator:     Shane Hutchison
>Release:        NetBSD-1.4.1
	i386, NetBSD, 
System: NetBSD 1.4.1 NetBSD 1.4.1 (AMAROK) #1: Mon Dec 13 12:08:25 MST 1999 i386

- quoted material -
	amarok-~/pdos/4/binaries/special/floppy$ tar -czf *
amarok-~/pdos/4/binaries/special/floppy$ ls  readme

amarok-~/pdos/4/binaries/special$ mount
/dev/wd0a on / type ffs (local)
/dev/wd0e on /usr type ffs (local)
/dev/wd0f on /var type ffs (local)
/dev/wd0g on /tmp type ffs (local)
kernfs on /kern type kernfs (local)
/dev/fd0a on /usr/home/shutchis/pdos/4/binaries/special/floppy type msdos (local, nodev, nosuid, read-only, mounted by shutchis)

- submitters' notes -
When mistakenly denoting the wrong location to create the above mentioned 3580-264.tar.gz (written as, the file was created on the mounted HD floppy which was mounted only as read-only.  Worthy of note is that the file created (besides ofcourse being a lfn, had 0 bytes of information - thus the filename was written to the otherwise read-only disk but no actual information was written.

	amarokbash-2.03# mount -t msdos -o ro /dev/fd0a /mnt      
        amarokbash-2.03# echo something > /mnt/file

	amarokbash-2.03# ls /mnt
	amarokbash-2.03# ll /mnt
	total 1
	-rwxr-xr-x  1 root  wheel  10 Dec 20 12:29 file
	amarokbash-2.03# umount /mnt

(note:  when checking floppy on MSDOS computer "file" showed as zero (0) bytes)