summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-control.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-11-11 14:54:58 +0100
committerTom Gundersen <teg@jklm.no>2015-11-11 14:54:58 +0100
commita2e6fbf5c047314db036000203b42c6aac1e3511 (patch)
tree0075e2354fce27e2d7c5963bcaa41758db9cfa86 /src/libsystemd/sd-bus/bus-control.c
parenta5642c7ee3dbd9aae07b531a81c0f02b3c2e1103 (diff)
parent91d0f17e03e3975cac95c418e101f5266b56e897 (diff)
Merge pull request #1848 from poettering/journal-sync
add journalctl --sync command and other stuff
Diffstat (limited to 'src/libsystemd/sd-bus/bus-control.c')
-rw-r--r--src/libsystemd/sd-bus/bus-control.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libsystemd/sd-bus/bus-control.c b/src/libsystemd/sd-bus/bus-control.c
index d5bc32e757..ddd3a55b6c 100644
--- a/src/libsystemd/sd-bus/bus-control.c
+++ b/src/libsystemd/sd-bus/bus-control.c
@@ -981,8 +981,12 @@ static int bus_get_owner_creds_kdbus(sd_bus *bus, uint64_t mask, sd_bus_creds **
static int bus_get_owner_creds_dbus1(sd_bus *bus, uint64_t mask, sd_bus_creds **ret) {
_cleanup_bus_creds_unref_ sd_bus_creds *c = NULL;
pid_t pid = 0;
+ bool do_label;
int r;
- bool do_label = bus->label && (mask & SD_BUS_CREDS_SELINUX_CONTEXT);
+
+ assert(bus);
+
+ do_label = bus->label && (mask & SD_BUS_CREDS_SELINUX_CONTEXT);
/* Avoid allocating anything if we have no chance of returning useful data */
if (!bus->ucred_valid && !do_label)