--- data/rules/56-hpmud.rules.orig 2013-06-21 08:56:30.000000000 +0200 +++ data/rules/56-hpmud.rules 2013-07-04 15:49:33.000000000 +0200 @@ -1,18 +1,41 @@ # HPLIP udev rules file. Notify console user if plugin support is required for this device. +# SUSE changed: +# +# MODE="0660" to MODE="0664" +# because it is sufficiently secure to let any user read the device nodes +# because HPLIP opens the device nodes exclusively so that sniffing +# of print jobs or scanner image data should not be possible. +# +# Exchanged the rule to GOTO hpmud_usb_rules if SUBSYSTEM is "usb" +# with the rule if SUBSYSTEM is "ppdev" to avoid that the "ppdev" rule +# is needlessly processed when SUBSYSTEM is "usb". +# +# Added rules to skip the hpmud_usb_rules rules via GOTO hpmud_rules_end +# if SUBSYSTEM is not "usb" or if ENV{DEVTYPE} is not "usb_device" +# to avoid that the hpmud_usb_rules are needlessly processed. +# +# The rule to automatically "add the printer and install plugin" is disabled +# because automated installation of non-free proprietary third-party software +# (here the plugin from HP) should not happen and it can cause whatever kind +# of strange behaviour see for example https://bugs.launchpad.net/bugs/1197416 +# while in contrast manual printer setup via hp-setup usually "just works" +# and it is clear for the user what goes on and in case of failure what went wrong. + ACTION!="add", GOTO="hpmud_rules_end" -SUBSYSTEM=="ppdev", OWNER="root", GROUP="lp", MODE="0660" SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GOTO="hpmud_usb_rules" - +SUBSYSTEM=="ppdev", OWNER="root", GROUP="lp", MODE="0664" +SUBSYSTEM!="usb", GOTO="hpmud_rules_end" +ENV{DEVTYPE}!="usb_device", GOTO="hpmud_rules_end" LABEL="hpmud_usb_rules" # ENV{ID_HPLIP}="1" is for Ubuntu udev-acl -ATTR{idVendor}=="03f0", ATTR{idProduct}=="????", OWNER="root", GROUP="lp", MODE="0660", ENV{sane_hpaio}="yes", ENV{libsane_matched}="yes", ENV{hp_test}="yes", ENV{ID_HPLIP}="1" +ATTR{idVendor}=="03f0", ATTR{idProduct}=="????", OWNER="root", GROUP="lp", MODE="0664", ENV{sane_hpaio}="yes", ENV{libsane_matched}="yes", ENV{hp_test}="yes", ENV{ID_HPLIP}="1" # This rule will add the printer and install plugin -ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c 'if [ -f /usr/bin/systemctl ]; then /usr/bin/systemctl --no-block start hplip-printer@$env{BUSNUM}:$env{DEVNUM}.service; else /usr/bin/nohup /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM} ; fi'" +# ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c 'if [ -f /usr/bin/systemctl ]; then /usr/bin/systemctl --no-block start hplip-printer@$env{BUSNUM}:$env{DEVNUM}.service; else /usr/bin/nohup /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM} ; fi'" # If sane-bankends is installed add hpaio backend support to dll.conf if needed. ENV{sane_hpaio}=="yes", RUN+="/bin/sh -c 'grep -q ^#hpaio /etc/sane.d/dll.conf;if [ $$? -eq 0 ];then sed -i -e s/^#hpaio/hpaio/ /etc/sane.d/dll.conf;else grep -q ^hpaio /etc/sane.d/dll.conf;if [ $$? -ne 0 ];then echo hpaio >>/etc/sane.d/dll.conf;fi;fi'" @@ -22,3 +45,4 @@ ENV{libsane_matched}=="yes", RUN+="/bin/ LABEL="hpmud_rules_end" +