* [PATCH]: fixes for strange device errors plus some improvements
@ 2009-07-25 22:24 Zbigniew Luszpinski
0 siblings, 0 replies; only message in thread
From: Zbigniew Luszpinski @ 2009-07-25 22:24 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 1302 bytes --]
Hello,
in attachment you will find patch I use for my udev to fix some strange and
stupid errors. This patch works with udev 143 and 145. The earlier versions
may need tweaking of patch.
Bugs this patch fixes:
Makefile* - by default the extra section will not install rules from packages
subdirectory. packages directory have useful rules worth installing if an user
wants extras.
50-udev-default.rules:
- ttyACM modem rule is missing
- usb_device rule access mode 664 causes userspace drivers to fail when user
is not root. Especially hplip driver for HP printers.
- sr devices like SATA CD/DVD burners will fail to work when user is not root.
Burning applications will report strange device errors hard to find and fix.
k3b application will have Start writing button inactive till sr device rights
will not be resolved.
In my opinion udev should provide easy, smart access to devices by default.
This way someone installing Linux will not end up with 'broken' devices.
Security should be tightened at later stage using for example
/etc/security/console.perms.d or other security mechanism. Finally if someone
needs extra security he/she will fine tune udev rules manually after knowing
that all devices are working well with initial configuration.
have a nice day,
Zbigniew Luszpinski
[-- Attachment #2: udev-143-rules.patch --]
[-- Type: text/x-patch, Size: 2839 bytes --]
--- rules/Makefile.am 2009-06-17 18:07:13.000000000 +0200
+++ rules/Makefile.am 2009-07-04 17:15:13.000000000 +0200
@@ -14,7 +14,17 @@
dist_udevrules_DATA += \
rules.d/75-net-description.rules \
rules.d/75-tty-description.rules \
- rules.d/78-sound-card.rules
+ rules.d/78-sound-card.rules \
+ packages/40-alsa.rules \
+ packages/40-ia64.rules \
+ packages/40-infiniband.rules \
+ packages/40-isdn.rules \
+ packages/40-pilot-links.rules \
+ packages/40-ppc.rules \
+ packages/40-s390.rules \
+ packages/40-zaptel.rules \
+ packages/64-device-mapper.rules \
+ packages/64-md-raid.rules
endif
install-data-local:
--- rules/Makefile.in 2009-06-19 19:48:59.000000000 +0200
+++ rules/Makefile.in 2009-07-04 17:15:22.000000000 +0200
@@ -37,7 +37,17 @@
@ENABLE_EXTRAS_TRUE@am__append_1 = \
@ENABLE_EXTRAS_TRUE@ rules.d/75-net-description.rules \
@ENABLE_EXTRAS_TRUE@ rules.d/75-tty-description.rules \
-@ENABLE_EXTRAS_TRUE@ rules.d/78-sound-card.rules
+@ENABLE_EXTRAS_TRUE@ rules.d/78-sound-card.rules \
+@ENABLE_EXTRAS_TRUE@ packages/40-alsa.rules \
+@ENABLE_EXTRAS_TRUE@ packages/40-ia64.rules \
+@ENABLE_EXTRAS_TRUE@ packages/40-infiniband.rules \
+@ENABLE_EXTRAS_TRUE@ packages/40-isdn.rules \
+@ENABLE_EXTRAS_TRUE@ packages/40-pilot-links.rules \
+@ENABLE_EXTRAS_TRUE@ packages/40-ppc.rules \
+@ENABLE_EXTRAS_TRUE@ packages/40-s390.rules \
+@ENABLE_EXTRAS_TRUE@ packages/40-zaptel.rules \
+@ENABLE_EXTRAS_TRUE@ packages/64-device-mapper.rules \
+@ENABLE_EXTRAS_TRUE@ packages/64-md-raid.rules
subdir = rules
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
--- rules/rules.d/50-udev-default.rules 2009-06-05 15:08:42.000000000 +0200
+++ rules/rules.d/50-udev-default.rules 2009-07-04 17:17:10.000000000 +0200
@@ -16,6 +16,7 @@
KERNEL=="ppp", MODE="0600"
KERNEL=="mwave", NAME="modems/mwave", GROUP="dialout"
KERNEL=="hvc*|hvsi*", GROUP="dialout"
+KERNEL=="ttyACM[0-9]*", MODE="0664", SYMLINK="modem"
# mem
KERNEL=="null|zero|full|random|urandom", MODE="0666"
@@ -48,7 +49,7 @@
KERNEL=="video1394-[0-9]*", NAME="video1394/%n", GROUP="video"
# libusb device nodes
-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0664"
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0666"
# printer
KERNEL=="parport[0-9]*", GROUP="lp"
@@ -67,7 +68,7 @@
KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitions"
# cdrom
-SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n", GROUP="cdrom"
+SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n", GROUP="cdrom", MODE="0666"
SUBSYSTEM=="block", KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="cdrom", GROUP="cdrom"
SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom"
KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k", GROUP="cdrom"
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-07-25 22:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-25 22:24 [PATCH]: fixes for strange device errors plus some improvements Zbigniew Luszpinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).