From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrey Borzenkov Date: Fri, 13 Jan 2006 20:01:33 +0000 Subject: cdroms lost permissions Message-Id: <200601132301.35006.arvidjaar@mail.ru> MIME-Version: 1 Content-Type: multipart/mixed; boundary="nextPart6320822.KRzo5s5V7N" List-Id: To: linux-hotplug@vger.kernel.org --nextPart6320822.KRzo5s5V7N Content-Type: multipart/mixed; boundary="Boundary-01=_ecAyDTrXSvrWE9R" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_ecAyDTrXSvrWE9R Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Mandriva is using pam_console; CD-ROMs permissions were set by /dev/cdrom*= =20 key; after last update removed /dev/cdrom%e (due ot deprecated status) cdro= m=20 devices are belonged to root. The suggested pathc creates persistent entries for CD-ROMs in /dev/cd=20 (actually $ID_TYPE). This allows easy matching by using /dev/cd/*/* as key. This also clearly separates HDDs from CD-ROMs maing it easier to search for= =20 all available CD-ROM drives or HDDs (OK, with HAL it is irrelevant, but not= =20 every script is easy to convert to HAL interface). =2Dandrey --Boundary-01=_ecAyDTrXSvrWE9R Content-Type: text/x-diff; charset="us-ascii"; name="udev-use_id_type_for_persistent_link.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="udev-use_id_type_for_persistent_link.patch" diff --git a/etc/udev/persistent-disk.rules b/etc/udev/persistent-disk.rules index 3515bb1..852574d 100644 =2D-- a/etc/udev/persistent-disk.rules +++ b/etc/udev/persistent-disk.rules @@ -12,8 +12,8 @@ BUS=3D=3D"ide", DRIVER!=3D"ide-cdrom", SYSFS{r =20 # by-id (hardware serial number) KERNEL=3D=3D"hd*[!0-9]", IMPORT{program}=3D"/sbin/ata_id --export $tempnod= e" =2DKERNEL=3D=3D"hd*[!0-9]", ENV{ID_SERIAL}=3D=3D"?*", SYMLINK+=3D"disk/by-i= d/ata-$env{ID_MODEL}_$env{ID_SERIAL}" =2DKERNEL=3D=3D"hd*[0-9]", IMPORT{parent}=3D=3D"ID_*", SYMLINK+=3D"disk/by-= id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n" +KERNEL=3D=3D"hd*[!0-9]", ENV{ID_SERIAL}=3D=3D"?*", SYMLINK+=3D"$env{ID_TYP= E}/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}" +KERNEL=3D=3D"hd*[0-9]", IMPORT{parent}=3D=3D"ID_*", SYMLINK+=3D"$env{ID_TY= PE}/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n" =20 KERNEL=3D=3D"sd*[!0-9]|sr*", SYSFS{ieee1394_id}=3D=3D"*", ENV{ID_SERIAL}= =3D"$sysfs{ieee1394_id}", ENV{ID_BUS}=3D"ieee1394" KERNEL=3D=3D"sd*[!0-9]|sr*", ENV{ID_SERIAL}=3D=3D"", IMPORT{program}=3D"/s= bin/usb_id -x" @@ -27,7 +27,7 @@ KERNEL=3D=3D"sd*[0-9]|dasd*[0-9]", IMPORT{pa KERNEL=3D=3D"sd*[0-9]|dasd*[0-9]", ENV{ID_SERIAL}=3D=3D"?*", SYMLINK+=3D"d= isk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" =20 # by-path (shortest physical path) =2DKERNEL=3D=3D"*[!0-9]|sr*", ENV{ID_TYPE}=3D=3D"?*", IMPORT{program}=3D"/s= bin/path_id %p", SYMLINK+=3D"disk/by-path/$env{ID_PATH}" +KERNEL=3D=3D"*[!0-9]|sr*", ENV{ID_TYPE}=3D=3D"?*", IMPORT{program}=3D"/sbi= n/path_id %p", SYMLINK+=3D"$env{ID_TYPE}/by-path/$env{ID_PATH}" KERNEL=3D=3D"sr*", GOTO=3D"persistent_end" KERNEL=3D=3D"*[0-9]", IMPORT{parent}=3D=3D"ID_*" KERNEL=3D=3D"*[0-9]", ENV{ID_PATH}=3D=3D"?*", SYMLINK+=3D"disk/by-path/$en= v{ID_PATH}-part%n" --Boundary-01=_ecAyDTrXSvrWE9R-- --nextPart6320822.KRzo5s5V7N Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBDyAceR6LMutpd94wRAg5+AKDBimJXDpkgqGU54GfrIW57YYRlZwCfadXf FbZaSRwegx3ijbKWgDcpKi8= =szAF -----END PGP SIGNATURE----- --nextPart6320822.KRzo5s5V7N-- ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel