chiark / gitweb /
core: explicitly specify credentials for direct connections, too
authorLennart Poettering <lennart@poettering.net>
Wed, 22 Apr 2015 22:37:47 +0000 (00:37 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 07:11:16 +0000 (08:11 +0100)
So far we authenticate direct connections primarily at connection time,
but let's also do this for each method individually, by attaching the
creds we need for that right away.

src/libelogind/sd-bus/bus-socket.c

index f97e15d5d2c8b8a2ca82462098eb1520625eb131..6a55f9bfb48554bce9aa4701481c999e6acb3ead 100644 (file)
@@ -916,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);