misc/65843: poor handling of write protected floppy.

Andrew Grillet andrew at grillet.co.uk
Wed Apr 21 02:00:42 PDT 2004


>Number:         65843
>Category:       misc
>Synopsis:       poor handling of write protected floppy.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 21 02:00:41 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Andrew Grillet
>Release:        4.9 Stable
>Organization:
Quickstart Technology Ltd
>Environment:
FreeBSD dayton.grillet.home 4.9-STABLE FreeBSD                   4.9-STABLE #3: Sun Mar 28 21:09:07 BST 2004                       root at dayton.grillet.home:/usr/src/sys/compile/DAYTON  i386     
>Description:
Handling of write protected floppy disks is totally naff! You get no message when you mount (write protected the floppy.  If you attempt to write to it (cp file /floppy) you get "io error" - suggesting a defective medium, and not "Illegal attempt to write to protected medium" or "flip the write protect tab, you nitwit". The, if you attempt to unmount the floppy to fix the problem, you are unable to do so, because the floppy is write-protected
>How-To-Repeat:
1) Instert write protected (but known good) floppy      
2) mount /floppy
3) cp file /floppy <confusing error here>
4) umount /floppy <inappropriate error here>
5) have attack of "floppy rage"
>Fix:
1) only allow ro mount if disk is write protected, otherwise refuse to mount.
2) detect the error code for "attempted write while write protected" and handle with more user friendly message      

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


More information about the freebsd-bugs mailing list