[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CDIOREADTOCENTRIES and CDIOCPLAYTRACKS and ioctl ignore write permission (was: cdplay and no audio)
On Wed, 23 Apr 2008, Michael van Elst wrote:
> >Also, how come cdplay status will show it is playing and you can hear
> >the CDROM hardware after "cdplay play" without "write" permission?
> The ioctl probably doesn't check for write permission.
To me it seems wrong to able to write to device without write permissions.
In my case the CD device is not read-only. Using cdrecord I did need to
have write permission for the device file to burn to it. (I didn't check
cdrecord source to see how or if that is checked by it.)
I tried looking at sys/dev/scsipi/cd.c and sys/sys/cdio.h but don't see
any kauth checks. Can someone share an example of an ioctl also using
kauth or other mechanism to make sure it has write permission before
writing to hardware.
Or if this is no big deal for CDs, please point me to the documentation.
Main Index |
Thread Index |