Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 56590 - udev permissions broke on ide cdroms
Summary: udev permissions broke on ide cdroms
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal
Assignee: Greg Kroah-Hartman (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-10 01:01 UTC by Jordan
Modified: 2004-09-10 14:10 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jordan 2004-07-10 01:01:55 UTC
In the udev permissions file there's this:

sr*:root:cdrom:660
scd*:root:cdrom:660
pcd*:root:cdrom:0660
cdrom*:root:cdrom:0660
dvd:root:cdrom:0660
rdvd:root:cdrom:0660
cdroms/*:root:cdrom:0660

When I load ide-cd (or if it's compiled in the kernel I'd assume) I get the devices /dev/hdc and /dev/hdd, which are symlinked to /dev/cdroms/cdrom0 and /dev/cdroms/cdrom1 accordingly. The last line of above would be the one that worked with this, that is if the actual nodes were /dev/cdroms/cdrom0 and /dev/cdroms/cdrom1 linked back to /dev/hdc and /dev/hdd, which they aren't. It's trying to change the permissions of the symlinks, not the actual devices, and thus the permissions are root:disk when they should be root:cdrom.

ls -l output:

brw-rw----  1 root disk 22,  0 Jul 10 03:41 /dev/hdc
brw-rw----  1 root disk 22, 64 Jul 10 03:41 /dev/hdd
lrwxrwxrwx  1 root root 6 Jul 10 03:46 /dev/cdroms/cdrom0 -> ../hdc
lrwxrwxrwx  1 root root 6 Jul 10 03:46 /dev/cdroms/cdrom1 -> ../hdd

and here's my cdroms using ide-scsi instead of ide-cd, being properly permissioned, just for the heck of it:

brw-rw----  1 root cdrom 11, 0 Jul 10 03:41 sr0
brw-rw----  1 root cdrom 11, 1 Jul 10 03:41 sr1

I'm not really sure how to go about fixing this, as putting the actual nodes in /dev/cdroms and linking back seems ugly, and the ide-devfs.sh script can't do that in it's current form anyway from what I see. And then of course there's the fact that the only thing that even puts it's cdroms into the cdroms folder is the ide cd driver which seems silly. At the same time it doesn't seem there's anyway for udev to see if /dev/hdc is a cdrom or a disk, or what not, sysfs has no reporting of this from what I can tell, though the way the ide-devfs.sh script checks would work, if a similar script for permissions were made.

I'm using udev-030 and mm-sources-2.6.7-r7.
Comment 1 Greg Kroah-Hartman (RETIRED) gentoo-dev 2004-09-10 14:10:45 UTC
I don't see a "generic" way to fix this, sorry.

I suggest you change the hdd and hdc permissions to be :cdrom.
Create a 10-permissions file in /etc/udev/permissions.d/ with this in it.