chiark / gitweb /
core: explicitly specify credentials for direct connections, too
[elogind.git] / src / libelogind / sd-bus / bus-socket.c
index 873aede65e07e57432c0bebaf4c1d7fa3eec9bf0..6a55f9bfb48554bce9aa4701481c999e6acb3ead 100644 (file)
@@ -29,6 +29,7 @@
 #include "missing.h"
 #include "utf8.h"
 #include "sd-daemon.h"
+#include "formats-util.h"
 
 #include "sd-bus.h"
 #include "bus-socket.h"
@@ -915,7 +916,7 @@ static int bus_socket_make_message(sd_bus *bus, size_t size) {
                                     bus->rbuffer, size,
                                     bus->fds, bus->n_fds,
                                     !bus->bus_client && bus->ucred_valid ? &bus->ucred : NULL,
-                                    !bus->bus_client && bus->label[0] ? bus->label : NULL,
+                                    !bus->bus_client && !isempty(bus->label) ? bus->label : NULL,
                                     &t);
         if (r < 0) {
                 free(b);