summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-07-08 21:44:22 +0200
committerLennart Poettering <lennart@poettering.net>2011-07-08 21:44:22 +0200
commit7b3afbac4d149d3e8befea1009a7b83955aeb42a (patch)
tree93ca1f5e7d755f2cd529ba00968858c06c64192c /src
parenta4c279f87451186b8beb1b8cc21c7cad561ecf4b (diff)
acl: two tag matching is not going to be available in libudev
Diffstat (limited to 'src')
-rw-r--r--src/logind-acl.c14
-rw-r--r--src/logind-dbus.c1
2 files changed, 7 insertions, 8 deletions
diff --git a/src/logind-acl.c b/src/logind-acl.c
index 59af981a5e..2aa5866ccd 100644
--- a/src/logind-acl.c
+++ b/src/logind-acl.c
@@ -229,18 +229,16 @@ int devnode_acl_all(struct udev *udev,
if (!e)
return -ENOMEM;
+ /* We can only match by one tag in libudev. We choose
+ * "uaccess" for that. If we could match for two tags here we
+ * could add the seat name as second match tag, but this would
+ * be hardly optimizable in libudev, and hence checking the
+ * second tag manually in our loop is a good solution. */
+
r = udev_enumerate_add_match_tag(e, "uaccess");
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)
goto finish;
diff --git a/src/logind-dbus.c b/src/logind-dbus.c
index 95bb07a432..a2a442ee27 100644
--- a/src/logind-dbus.c
+++ b/src/logind-dbus.c
@@ -541,6 +541,7 @@ static bool device_has_tag(struct udev_device *d, const char *tag) {
assert(d);
assert(tag);
+ /* FIXME */
udev_device_get_is_initialized(d);
first = udev_device_get_tags_list_entry(d);