chiark / gitweb /
acl: properly handle if devices are tagged as uaccess but do not have a device node
authorLennart Poettering <lennart@poettering.net>
Thu, 25 Aug 2011 14:50:49 +0000 (16:50 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 25 Aug 2011 14:50:49 +0000 (16:50 +0200)
src/73-seat-late.rules.in
src/logind-acl.c

index e93a0e6..0847932 100644 (file)
@@ -12,6 +12,6 @@ ENV{ID_SEAT}=="", IMPORT{parent}="ID_SEAT"
 
 ENV{ID_SEAT}!="", TAG+="$env{ID_SEAT}"
 
-TAG=="uaccess", RUN+="@rootlibexecdir@/systemd-uaccess $env{DEVNAME} $env{ID_SEAT}"
+TAG=="uaccess", ENV{MAJOR}!="", RUN+="@rootlibexecdir@/systemd-uaccess $env{DEVNAME} $env{ID_SEAT}"
 
 LABEL="seat_late_end"
index 7f9b0ca..7a06b50 100644 (file)
@@ -265,9 +265,9 @@ int devnode_acl_all(struct udev *udev,
 
                 node = udev_device_get_devnode(d);
                 if (!node) {
+                        /* In case people mistag devices with nodes, we need to ignore this */
                         udev_device_unref(d);
-                        r = -ENOMEM;
-                        goto finish;
+                        continue;
                 }
 
                 log_debug("Fixing up %s for seat %s...", node, sn);