Date: Thu, 23 Oct 1997 17:31:02 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: thorpej@nas.nasa.gov Cc: dk+@ua.net, freebsd-hackers@FreeBSD.ORG Subject: Re: Possible SERIOUS bug in open()? Message-ID: <199710231731.KAA26108@usr02.primenet.com> In-Reply-To: <199710222030.NAA20863@lestat.nas.nasa.gov> from "Jason Thorpe" at Oct 22, 97 01:30:28 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> For ioctls that don't change the state of the device, you absolutely want > to have it open for reading. I.e. if you have a device that can expose > sensitive information by ioctl, and you set the mode to 600, you won't > want random people opening it via the neat little open hole and performing > that read-only ioctl. What if I want to have a CDROM not mounted, allow users to mount it, but not allow users to eject it? ...and at the same time, I have a different drive that I want to allow users to both mount and eject? I need to hold a reference. The "lock against eject" operation is a side effect of an existing reference forcing the count over 1 for the device in question. So the short answer is "to obtain reference side effects without granting read/write access on the descriptor". Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710231731.KAA26108>