summaryrefslogtreecommitdiff
path: root/src/logind-acl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-06-29 19:41:07 +0200
committerLennart Poettering <lennart@poettering.net>2011-06-29 19:41:07 +0200
commit539072153c0db3d91c1c59ad447d96b0e1f3cf77 (patch)
tree21831c2b2d68a86d7f1656eee53f6b838b1bcec4 /src/logind-acl.c
parentf5f32cd7adb78d390fa9050588095b3d31c8527b (diff)
acl: libudev currently doesn't handle properly enumerator matches with multiple tags, so avoid using them for now
Diffstat (limited to 'src/logind-acl.c')
-rw-r--r--src/logind-acl.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/logind-acl.c b/src/logind-acl.c
index 7571093d0e..59af981a5e 100644
--- a/src/logind-acl.c
+++ b/src/logind-acl.c
@@ -222,7 +222,7 @@ int devnode_acl_all(struct udev *udev,
assert(udev);
- if (!seat)
+ if (isempty(seat))
seat = "seat0";
e = udev_enumerate_new(udev);
@@ -233,11 +233,13 @@ int devnode_acl_all(struct udev *udev,
if (r < 0)
goto finish;
- if (!streq(seat, "seat0")) {
- r = udev_enumerate_add_match_tag(e, seat);
- if (r < 0)
- goto finish;
- }
+ /* FIXME: when libudev is able to handle multiple match tags
+ * properly, optimize the search here a bit */
+ /* if (!streq(seat, "seat0")) { */
+ /* r = udev_enumerate_add_match_tag(e, seat); */
+ /* if (r < 0) */
+ /* goto finish; */
+ /* } */
r = udev_enumerate_scan_devices(e);
if (r < 0)
@@ -254,8 +256,8 @@ int devnode_acl_all(struct udev *udev,
goto finish;
}
- sn = udev_device_get_property_value(d, "SEAT");
- if (!sn)
+ sn = udev_device_get_property_value(d, "ID_SEAT");
+ if (isempty(sn))
sn = "seat0";
if (!streq(seat, sn)) {
@@ -270,6 +272,8 @@ int devnode_acl_all(struct udev *udev,
goto finish;
}
+ log_debug("Fixing up %s for seat %s...", node, sn);
+
r = devnode_acl(node, flush, del, old_uid, add, new_uid);
udev_device_unref(d);