summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/busctl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-03-19 16:21:01 +0100
committerLennart Poettering <lennart@poettering.net>2014-03-19 16:25:11 +0100
commitd0ce77344bfb71e50da7296cd0d4f2529a109044 (patch)
treee383ee5e8727c4324d78223ac138c9c1e6eb57dc /src/libsystemd/sd-bus/busctl.c
parent6af00e06e4e9efacc5a9941eb3b9fffa1c816ee6 (diff)
busctl: when monitoring the bus, enable all credentials
Diffstat (limited to 'src/libsystemd/sd-bus/busctl.c')
-rw-r--r--src/libsystemd/sd-bus/busctl.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/busctl.c b/src/libsystemd/sd-bus/busctl.c
index b4fb364716..4e396f20c1 100644
--- a/src/libsystemd/sd-bus/busctl.c
+++ b/src/libsystemd/sd-bus/busctl.c
@@ -507,6 +507,24 @@ int main(int argc, char *argv[]) {
log_error("Failed to set monitor mode: %s", strerror(-r));
goto finish;
}
+
+ r = sd_bus_negotiate_creds(bus, _SD_BUS_CREDS_ALL);
+ if (r < 0) {
+ log_error("Failed to enable credentials: %s", strerror(-r));
+ goto finish;
+ }
+
+ r = sd_bus_negotiate_timestamp(bus, true);
+ if (r < 0) {
+ log_error("Failed to enable timestamps: %s", strerror(-r));
+ goto finish;
+ }
+
+ r = sd_bus_negotiate_fds(bus, true);
+ if (r < 0) {
+ log_error("Failed to enable fds: %s", strerror(-r));
+ goto finish;
+ }
}
if (arg_address)