diff options
Diffstat (limited to 'meta/packages/udev/udev-124/permissions.rules')
-rw-r--r-- | meta/packages/udev/udev-124/permissions.rules | 62 |
1 files changed, 46 insertions, 16 deletions
diff --git a/meta/packages/udev/udev-124/permissions.rules b/meta/packages/udev/udev-124/permissions.rules index 99e03b103..205b73329 100644 --- a/meta/packages/udev/udev-124/permissions.rules +++ b/meta/packages/udev/udev-124/permissions.rules @@ -1,38 +1,56 @@ ACTION!="add", GOTO="permissions_end" # workarounds needed to synchronize with sysfs -DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" -SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt" +# only needed for kernels < v2.6.18-rc1 +ENV{PHYSDEVPATH}!="?*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" +SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", WAIT_FOR_SYSFS="ioerr_cnt" # only needed for kernels < 2.6.16 SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" # only needed for kernels < 2.6.17 -SUBSYSTEM=="net", ENV{PHYSDEVDRIVER}=="?*", WAIT_FOR_SYSFS="device/driver" +SUBSYSTEM=="net", ENV{DRIVER}=="?*", WAIT_FOR_SYSFS="device/driver" + +# devices needed to load the drivers providing them +KERNEL=="tun", OPTIONS+="ignore_remove" +KERNEL=="ppp", OPTIONS+="ignore_remove" +KERNEL=="loop[0-9]*", OPTIONS+="ignore_remove" # default permissions for block devices SUBSYSTEM=="block", GROUP="disk" -SUBSYSTEM=="block", SYSFS{removable}=="1", GROUP="floppy" +# the aacraid driver is broken and reports that disks removable (see #404927) +SUBSYSTEM=="block", ATTRS{removable}=="1", \ + DRIVERS!="aacraid", GROUP="floppy" +# all block devices on these buses are "removable" +SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394|mmc|pcmcia", GROUP="floppy" # IDE devices -BUS=="ide", KERNEL=="hd[a-z]|pcd[0-9]*", DRIVER=="ide-cdrom|pcd", \ +KERNEL=="hd[a-z]|pcd[0-9]*", DRIVERS=="ide-cdrom|pcd", \ IMPORT{program}="cdrom_id --export $tempnode" ENV{ID_CDROM}=="?*", GROUP="cdrom" -BUS=="ide", KERNEL=="ht[0-9]*", GROUP="tape" -BUS=="ide", KERNEL=="nht[0-9]*", GROUP="tape" +KERNEL=="ht[0-9]*", GROUP="tape" +KERNEL=="nht[0-9]*", GROUP="tape" # SCSI devices -BUS=="scsi", SYSFS{type}=="1", GROUP="tape" -BUS=="scsi", SYSFS{type}=="5", GROUP="cdrom" +KERNEL=="sr[0-9]*", IMPORT{program}="cdrom_id --export $tempnode" +SUBSYSTEMS=="scsi", ATTRS{type}=="1", GROUP="tape" +SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="HP", GROUP="scanner" +SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="Epson", GROUP="scanner" +SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", GROUP="scanner" +SUBSYSTEMS=="scsi", ATTRS{type}=="4", GROUP="cdrom" +SUBSYSTEMS=="scsi", ATTRS{type}=="5", GROUP="cdrom" +SUBSYSTEMS=="scsi", ATTRS{type}=="6", GROUP="scanner" +SUBSYSTEMS=="scsi", ATTRS{type}=="8", GROUP="tape" # USB devices -BUS=="usb", KERNEL=="legousbtower*", MODE="0666" -BUS=="usb", KERNEL=="lp[0-9]*", GROUP="lp" +KERNEL=="legousbtower*", MODE="0666" +KERNEL=="lp[0-9]*", SUBSYSTEMS=="usb", GROUP="lp" # usbfs-like devices -SUBSYSTEM=="usb_device", MODE="0664" +SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \ + MODE="0664" # iRiver music players -SUBSYSTEM=="usb_device", GROUP="plugdev", \ - SYSFS{idVendor}=="4102", SYSFS{idProduct}=="10[01][135789]" +SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="plugdev", \ + ATTRS{idVendor}=="4102", ATTRS{idProduct}=="10[01][135789]" # serial devices SUBSYSTEM=="tty", GROUP="dialout" @@ -68,15 +86,26 @@ KERNEL=="inotify", MODE="0666" KERNEL=="sgi_fetchop", MODE="0666" KERNEL=="sonypi", MODE="0666" KERNEL=="agpgart", GROUP="video" -KERNEL=="rtc", GROUP="audio" +KERNEL=="nvram", GROUP="nvram" +KERNEL=="rtc|rtc[0-9]*", GROUP="audio" +KERNEL=="tpm*", MODE="0600", OWNER="tss", GROUP="tss" +KERNEL=="fuse", GROUP="fuse" +KERNEL=="kqemu", MODE="0666" +KERNEL=="kvm", GROUP="kvm" +KERNEL=="tun", MODE="0666", KERNEL=="cdemu[0-9]*", GROUP="cdrom" KERNEL=="pktcdvd[0-9]*", GROUP="cdrom" KERNEL=="pktcdvd", MODE="0644" +KERNEL=="uverbs*", GROUP="rdma" +KERNEL=="ucm*", GROUP="rdma" +KERNEL=="rdma_ucm", GROUP="rdma" + # printers and parallel devices SUBSYSTEM=="printer", GROUP="lp" SUBSYSTEM=="ppdev", GROUP="lp" +KERNEL=="irlpt*", GROUP="lp" KERNEL=="pt[0-9]*", GROUP="tape" KERNEL=="pht[0-9]*", GROUP="tape" @@ -89,9 +118,10 @@ KERNEL=="dv1394*", GROUP="video" KERNEL=="video1394*", GROUP="video" # input devices -KERNEL=="event[0-9]*", SYSFS{name}=="*dvb*|*DVB*|* IR *" \ +KERNEL=="event[0-9]*", ATTRS{name}=="*dvb*|*DVB*|* IR *" \ MODE="0664", GROUP="video" KERNEL=="js[0-9]*", MODE="0664" +KERNEL=="lirc[0-9]*", GROUP="video" # AOE character devices SUBSYSTEM=="aoe", MODE="0220", GROUP="disk" |