Subject: kern/11515: vnconfig requires read/write access to the underlying file
To: None <>
From: None <kre@munnari.OZ.AU>
List: netbsd-bugs
Date: 11/18/2000 07:31:13
>Number:         11515
>Category:       kern
>Synopsis:       vnconfig requires reqd/write access to the file
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 18 07:31:01 PST 2000
>Originator:     Robert Elz
>Release:        NetBSD-1.5_BETA
	University of Melbourne
System: NetBSD 1.5_BETA NetBSD 1.5_BETA (GATEWAY) #2: Thu Oct 26 05:55:17 EST 2000 root@:/usr/src/sys/arch/i386/compile/GATEWAY i386

	vnconfig (the vnd pseudo-device) requires read-write
	access to the underlying file.   It shouldn't.


	Accidentally write an iso inage as a file into a CD, instead
	of using the image file as the CD (ie: the CD ends up containing
	a single file, file.iso) - attempt to use vnd0 to access the
	contents of the file (before writing to the CD the file could
	be accessed that way).


	mount -r -t cd9660 /dev/cd0a /cdrom
	cd /cdrom
	vnconfig -c vnd0 file.iso
	vnconfig: /dev/rvnd0d: VNDIOCSET: Read-only file system

	If the underlying file is read-only (or on a read only device)
	the vnd interface should simply make a read-only device