Subject: kern/738: r/w opens of r/o scsi tapes devices should fail.
To: None <gnats-admin@NetBSD.ORG>
From: Bill Sommerfeld <sommerfeld@orchard.medford.ma.us>
List: netbsd-bugs
Date: 01/18/1995 07:20:05
>Number:         738
>Category:       kern
>Synopsis:       r/w opens of r/o scsi tapes should fail.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 18 07:20:04 1995
>Originator:     Bill Sommerfeld
>Organization:
"	"
>Release:        1.0
>Environment:

System: NetBSD orchard.medford.ma.us 1.0_BETA NetBSD 1.0_BETA (ORCHARD) #13: Wed Aug 17 11:51:25 EDT 1994 sommerfeld@orchard.medford.ma.us:/u1/nsys/sys/arch/i386/compile/ORCHARD i386
	(yeah, I know, I should update to 1.0 final.  haven't found the time yet)

>Description:
	The system should be able to detect that a device with
	write-protectable media has write-protected media in it, and 
	disallow opens for write.

	Currently, the open succeeds, and subsequent writes fail,
	with a bunch of ugly kernel printfs.

	I'm filing this against "kern" rather than "port-i386" because
	I'm under the impression that the higher-level scsi subsystem is
	machine-independant.
>How-To-Repeat:
	write protect a tape and insert into drive.
	attempt to dump a partition to that device.
	observe a bunch of kernel printfs reporting write errors.
>Fix:
	?? ask scsi device w/removeable media if it's write-protected
	at open time if a r/w open is done, and fail the open if
	it's write protected.
>Audit-Trail:
>Unformatted: