2006-03-29 14:19:21 +04:00
ACTION!="add", GOTO="permissions_end"
# workarounds needed to synchronize with sysfs
2006-08-23 03:20:56 +04:00
# only needed for kernels < v2.6.18-rc1
2006-08-27 04:28:31 +04:00
ENV{PHYSDEVPATH}!="?*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus"
2006-03-29 14:19:21 +04:00
SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"
# only needed for kernels < 2.6.16
SUBSYSTEM=="net", WAIT_FOR_SYSFS="address"
2006-05-01 05:32:30 +04:00
# only needed for kernels < 2.6.17
2006-08-27 04:28:31 +04:00
SUBSYSTEM=="net", ENV{DRIVER}=="?*", WAIT_FOR_SYSFS="device/driver"
2005-11-25 21:35:26 +03:00
2005-04-10 23:19:51 +04:00
# default permissions for block devices
2005-07-07 00:09:05 +04:00
SUBSYSTEM=="block", GROUP="disk"
2006-08-27 04:28:31 +04:00
SUBSYSTEM=="block", ATTR{removable}=="1", GROUP="floppy"
2005-04-10 23:19:51 +04:00
# IDE devices
2006-08-23 03:20:56 +04:00
KERNEL=="hd[a-z]|pcd[0-9]*", DRIVERS=="ide-cdrom|pcd", \
2006-03-29 14:19:21 +04:00
IMPORT{program}="cdrom_id --export $tempnode"
2005-09-18 07:34:05 +04:00
ENV{ID_CDROM}=="?*", GROUP="cdrom"
2006-08-23 03:20:56 +04:00
KERNEL=="ht[0-9]*", GROUP="tape"
KERNEL=="nht[0-9]*", GROUP="tape"
2005-04-10 23:19:51 +04:00
# SCSI devices
2006-08-27 04:28:31 +04:00
KERNEL=="sr[0-9]*", IMPORT{program}="cdrom_id --export $tempnode"
2006-08-23 03:20:56 +04:00
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}=="5", GROUP="cdrom"
SUBSYSTEMS=="scsi", ATTRS{type}=="6", GROUP="scanner"
2005-04-10 23:19:51 +04:00
# USB devices
2006-08-23 03:20:56 +04:00
KERNEL=="legousbtower*", MODE="0666"
KERNEL=="lp[0-9]*", SUBSYSTEMS=="usb", GROUP="lp"
2005-04-10 23:19:51 +04:00
2005-11-25 21:35:26 +03:00
# usbfs-like devices
2006-03-29 14:19:21 +04:00
SUBSYSTEM=="usb_device", MODE="0664"
# iRiver music players
SUBSYSTEM=="usb_device", GROUP="plugdev", \
2006-08-23 03:20:56 +04:00
ATTRS{idVendor}=="4102", ATTRS{idProduct}=="10[01][135789]"
2005-11-25 21:35:26 +03:00
2005-04-10 23:19:51 +04:00
# serial devices
2006-03-29 14:19:21 +04:00
SUBSYSTEM=="tty", GROUP="dialout"
SUBSYSTEM=="capi", GROUP="dialout"
SUBSYSTEM=="slamr", GROUP="dialout"
SUBSYSTEM=="zaptel", GROUP="dialout"
2005-04-10 23:19:51 +04:00
# vc devices (all members of the tty subsystem)
2006-03-29 14:19:21 +04:00
KERNEL=="ptmx", MODE="0666", GROUP="root"
KERNEL=="console", MODE="0600", GROUP="root"
KERNEL=="tty", MODE="0666", GROUP="root"
KERNEL=="tty[0-9]*", GROUP="root"
KERNEL=="pty*", MODE="0666", GROUP="tty"
2005-04-10 23:19:51 +04:00
# video devices
2006-03-29 14:19:21 +04:00
SUBSYSTEM=="video4linux", GROUP="video"
SUBSYSTEM=="drm", GROUP="video"
SUBSYSTEM=="dvb", GROUP="video"
SUBSYSTEM=="em8300", GROUP="video"
SUBSYSTEM=="graphics", GROUP="video"
SUBSYSTEM=="nvidia", GROUP="video"
2005-04-10 23:19:51 +04:00
# misc devices
2006-03-29 14:19:21 +04:00
KERNEL=="random", MODE="0666"
KERNEL=="urandom", MODE="0666"
KERNEL=="mem", MODE="0640", GROUP="kmem"
KERNEL=="kmem", MODE="0640", GROUP="kmem"
KERNEL=="port", MODE="0640", GROUP="kmem"
KERNEL=="full", MODE="0666"
KERNEL=="null", MODE="0666"
KERNEL=="zero", MODE="0666"
KERNEL=="inotify", MODE="0666"
KERNEL=="sgi_fetchop", MODE="0666"
KERNEL=="sonypi", MODE="0666"
KERNEL=="agpgart", GROUP="video"
KERNEL=="nvram", GROUP="nvram"
KERNEL=="rtc", GROUP="audio"
KERNEL=="tpm*", MODE="0600", OWNER="tss", GROUP="tss"
KERNEL=="fuse", GROUP="fuse"
2006-08-23 03:20:56 +04:00
KERNEL=="kqemu", MODE="0666"
2006-03-29 14:19:21 +04:00
KERNEL=="cdemu[0-9]*", GROUP="cdrom"
KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
KERNEL=="pktcdvd", MODE="0644"
KERNEL=="uverbs*", GROUP="rdma"
KERNEL=="ucm*", GROUP="rdma"
2005-11-25 21:35:26 +03:00
2005-04-10 23:19:51 +04:00
# printers and parallel devices
2006-03-29 14:19:21 +04:00
SUBSYSTEM=="printer", GROUP="lp"
SUBSYSTEM=="ppdev", GROUP="lp"
2006-08-23 03:20:56 +04:00
KERNEL=="irlpt*", GROUP="lp"
2006-03-29 14:19:21 +04:00
KERNEL=="pt[0-9]*", GROUP="tape"
KERNEL=="pht[0-9]*", GROUP="tape"
2005-04-10 23:19:51 +04:00
# sound devices
2006-03-29 14:19:21 +04:00
SUBSYSTEM=="sound", GROUP="audio"
2005-07-07 00:09:05 +04:00
# ieee1394 devices
2006-03-29 14:19:21 +04:00
KERNEL=="raw1394", GROUP="disk"
KERNEL=="dv1394*", GROUP="video"
KERNEL=="video1394*", GROUP="video"
2005-04-10 23:19:51 +04:00
# input devices
2006-08-23 03:20:56 +04:00
KERNEL=="event[0-9]*", ATTRS{name}=="*dvb*|*DVB*|* IR *" \
2006-03-29 14:19:21 +04:00
MODE="0664", GROUP="video"
KERNEL=="js[0-9]*", MODE="0664"
2005-04-10 23:19:51 +04:00
# AOE character devices
2006-03-29 14:19:21 +04:00
SUBSYSTEM=="aoe", MODE="0220", GROUP="disk"
SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440"
LABEL="permissions_end"
2005-04-10 23:19:51 +04:00