chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sd-bus: catch up with current kdbus, don't do matches on kdbus monitor connections
[elogind.git]
/
src
/
libsystemd
/
sd-bus
/
bus-control.c
diff --git
a/src/libsystemd/sd-bus/bus-control.c
b/src/libsystemd/sd-bus/bus-control.c
index 6a9e9b296ad2df56277b415b9845381e8e946688..261cf0d0447e73d51d3ce4f92c67daee62f0af60 100644
(file)
--- a/
src/libsystemd/sd-bus/bus-control.c
+++ b/
src/libsystemd/sd-bus/bus-control.c
@@
-1180,6
+1180,10
@@
int bus_add_match_internal_kernel(
assert(bus);
assert(bus);
+ /* Monitor streams don't support matches, make this a NOP */
+ if (bus->hello_flags & KDBUS_HELLO_MONITOR)
+ return 0;
+
bloom = alloca0(bus->bloom_size);
sz = ALIGN8(offsetof(struct kdbus_cmd_match, items));
bloom = alloca0(bus->bloom_size);
sz = ALIGN8(offsetof(struct kdbus_cmd_match, items));
@@
-1392,6
+1396,10
@@
int bus_remove_match_internal_kernel(
assert(bus);
assert(bus);
+ /* Monitor streams don't support matches, make this a NOP */
+ if (bus->hello_flags & KDBUS_HELLO_MONITOR)
+ return 0;
+
zero(m);
m.size = offsetof(struct kdbus_cmd_match, items);
m.cookie = cookie;
zero(m);
m.size = offsetof(struct kdbus_cmd_match, items);
m.cookie = cookie;