From owner-freebsd-bugs@FreeBSD.ORG Wed Apr 21 02:00:42 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 28E9716A4CE for ; Wed, 21 Apr 2004 02:00:42 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0612A43D5F for ; Wed, 21 Apr 2004 02:00:42 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i3L90fbv027141 for ; Wed, 21 Apr 2004 02:00:41 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i3L90fNo027137; Wed, 21 Apr 2004 02:00:41 -0700 (PDT) (envelope-from gnats) Resent-Date: Wed, 21 Apr 2004 02:00:41 -0700 (PDT) Resent-Message-Id: <200404210900.i3L90fNo027137@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Andrew Grillet Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E26516A4CE for ; Wed, 21 Apr 2004 01:55:57 -0700 (PDT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F56243D77 for ; Wed, 21 Apr 2004 01:55:56 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.10/8.12.10) with ESMTP id i3L8tt72011204 for ; Wed, 21 Apr 2004 01:55:55 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.10/8.12.10/Submit) id i3L8tt9f011203; Wed, 21 Apr 2004 01:55:55 -0700 (PDT) (envelope-from nobody) Message-Id: <200404210855.i3L8tt9f011203@www.freebsd.org> Date: Wed, 21 Apr 2004 01:55:55 -0700 (PDT) From: Andrew Grillet To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: misc/65843: poor handling of write protected floppy. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2004 09:00:42 -0000 >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@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 4) umount /floppy 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: