diff options
Diffstat (limited to 'src/libsystemd-bus')
-rw-r--r-- | src/libsystemd-bus/sd-bus.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libsystemd-bus/sd-bus.c b/src/libsystemd-bus/sd-bus.c index 3ecda17fce..89437c161c 100644 --- a/src/libsystemd-bus/sd-bus.c +++ b/src/libsystemd-bus/sd-bus.c @@ -1637,6 +1637,19 @@ _public_ int sd_bus_call( sd_bus_message_unref(incoming); return -EIO; + + } else if (incoming->header->serial == serial && + bus->unique_name && + incoming->sender && + streq(bus->unique_name, incoming->sender)) { + + /* Our own message? Somebody is trying + * to send its own client a message, + * let's not dead-lock, let's fail + * immediately. */ + + sd_bus_message_unref(incoming); + return -ELOOP; } /* There's already guaranteed to be room for |