summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-track.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-04-23 16:23:15 +0200
committerLennart Poettering <lennart@poettering.net>2015-04-23 16:23:15 +0200
commit33c62dcbd78dd42603a0d8989a150e816e0414d9 (patch)
tree07ffe18852a35381a7087a51abe3955a11f923ea /src/libsystemd/sd-bus/bus-track.c
parent8d9803b83c1f72e1bf158af4615b1c53a4749118 (diff)
sd-bus: when bus operations are to be executed on direct connections always fail
Also, don't consider this an loggable event, so that code that tries to read creds from a direct connection, doesn't generate logs.
Diffstat (limited to 'src/libsystemd/sd-bus/bus-track.c')
-rw-r--r--src/libsystemd/sd-bus/bus-track.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/bus-track.c b/src/libsystemd/sd-bus/bus-track.c
index 048178550b..6582baa8e0 100644
--- a/src/libsystemd/sd-bus/bus-track.c
+++ b/src/libsystemd/sd-bus/bus-track.c
@@ -90,6 +90,9 @@ _public_ int sd_bus_track_new(
assert_return(bus, -EINVAL);
assert_return(track, -EINVAL);
+ if (!bus->bus_client)
+ return -EINVAL;
+
t = new0(sd_bus_track, 1);
if (!t)
return -ENOMEM;