[mythtv] qmake & makefile question

Leo Weppelman leo at wau.mis.ah.nl
Sun Jun 20 15:47:56 EDT 2004


On Sun, Jun 20, 2004 at 07:01:15AM -0400, J. Donavan Stanley wrote:
> Xavier Hervy wrote:
> 
> >With help from Leo Weppelman, i try to fix bug in madiea monito.
> >
> >What appeared is we can lock and unlock the cd drive only if we are root.
> >
> That should be able to be solved by setting the proper permissions on 
> your drive.  I was able to lock and unlock my drive without incident 
> before the BSD patches went in.

Well, it does not work here:
  ls -lL /dev/cdrom
  brw-rw-rw-    1 root     disk       3,  64 Mar 14  2002 /dev/cdrom

I also checked the kernel source and the handling in the LOCKDOOR case
for the cdrom seems to indicate that the user should be root to unlock
a drive with a mounted filesystem. This is from the 2.6.5 kernel source:
 ./drivers/cdrom/cdrom.c:
        case CDROM_LOCKDOOR: {
                cdinfo(CD_DO_IOCTL, "%socking door.\n", arg ? "L" : "Unl");
                if (!CDROM_CAN(CDC_LOCK))
                        return -EDRIVE_CANT_DO_THIS;
                keeplocked = arg ? 1 : 0;
                /* don't unlock the door on multiple opens,but allow root
                 * to do so */
                if ((cdi->use_count != 1) && !arg && !capable(CAP_SYS_ADMIN))
                        return -EBUSY;
                return cdo->lock_door(cdi, arg);


Leo.


More information about the mythtv-dev mailing list