[systemd-commits] src/99-systemd.rules

Kay Sievers kay at kemper.freedesktop.org
Tue Nov 2 10:30:37 PDT 2010


 src/99-systemd.rules |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 1e85f63615d0b592686fba810157d6b5963b2af9
Author: Andrey Borzenkov <arvidjaar at gmail.com>
Date:   Tue Nov 2 19:45:43 2010 +0300

    do not overwrite other udev tags
    
    Systemd was unconditionally replacing all tags with own.
    The net effect was udev-acl tag was lost and devices were
    not given proper ACLs, making them inaccessible.
    
    Before:
    
    {pts/0}% udevadm info --query property --name sr0
    DEVNAME=/dev/sr0
    [...]
    TAGS=:systemd:
    {pts/0}% getfacl /dev/sr0
    getfacl: Removing leading '/' from absolute path names
    # file: dev/sr0
    # owner: root
    # group: cdrom
    user::rw-
    group::rw-
    other::---
    
    After:
    
    {pts/0}% udevadm info --query property --name sr0
    DEVNAME=/dev/sr0
    [...]
    TAGS=:udev-acl:systemd:
    {pts/0}% getfacl /dev/sr0
    getfacl: Removing leading '/' from absolute path names
    # file: dev/sr0
    # owner: root
    # group: cdrom
    user::rw-
    user:bor:rw-
    group::rw-
    mask::rw-
    other::---
    
    Signed-off-by: Andrey Borzenkov <arvidjaar at gmail.com>

diff --git a/src/99-systemd.rules b/src/99-systemd.rules
index 634bb9a..470b1a0 100644
--- a/src/99-systemd.rules
+++ b/src/99-systemd.rules
@@ -7,10 +7,10 @@
 
 ACTION!="add|change", GOTO="systemd_end"
 
-KERNEL=="tty[0-9]|tty1[0-2]", TAG="systemd"
-KERNEL=="ttyS*", TAG="systemd"
+KERNEL=="tty[0-9]|tty1[0-2]", TAG+="systemd"
+KERNEL=="ttyS*", TAG+="systemd"
 
-SUBSYSTEM=="block", KERNEL!="ram*|loop*", TAG="systemd"
+SUBSYSTEM=="block", KERNEL!="ram*|loop*", TAG+="systemd"
 
 # We need a hardware independent way to identify network devices. We
 # use the /sys/subsystem path for this. Current vanilla kernels don't
@@ -23,11 +23,11 @@ SUBSYSTEM=="block", KERNEL!="ram*|loop*", TAG="systemd"
 #
 # http://git.kernel.org/?p=linux/hotplug/udev.git;a=blob;f=libudev/libudev-enumerate.c;h=da831449dcaf5e936a14409e8e68ab12d30a98e2;hb=HEAD#l742
 
-SUBSYSTEM=="net", KERNEL!="lo", TAG="systemd", ENV{SYSTEMD_ALIAS}="/sys/subsystem/net/devices/%k"
-SUBSYSTEM=="bluetooth", TAG="systemd", ENV{SYSTEMD_ALIAS}="/sys/subsystem/bluetooth/devices/%k"
+SUBSYSTEM=="net", KERNEL!="lo", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/sys/subsystem/net/devices/%k"
+SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/sys/subsystem/bluetooth/devices/%k"
 
-SUBSYSTEM=="bluetooth", TAG="systemd", ENV{SYSTEMD_WANTS}="bluetooth.target"
-SUBSYSTEM=="printer", TAG="systemd", ENV{SYSTEMD_WANTS}="printer.target"
-ENV{ID_SMARTCARD_READER}=="*?", TAG="systemd", ENV{SYSTEMD_WANTS}="smartcard.target"
+SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_WANTS}="bluetooth.target"
+SUBSYSTEM=="printer", TAG+="systemd", ENV{SYSTEMD_WANTS}="printer.target"
+ENV{ID_SMARTCARD_READER}=="*?", TAG+="systemd", ENV{SYSTEMD_WANTS}="smartcard.target"
 
 LABEL="systemd_end"



More information about the systemd-commits mailing list