From: Lennart Poettering Date: Wed, 22 Apr 2015 22:37:47 +0000 (+0200) Subject: core: explicitly specify credentials for direct connections, too X-Git-Tag: v226.4~1^2~435 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=18ecad86637d1caff5486ce8f8dcfa49996e3f07;p=elogind.git core: explicitly specify credentials for direct connections, too 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. --- diff --git a/src/libelogind/sd-bus/bus-socket.c b/src/libelogind/sd-bus/bus-socket.c index f97e15d5d..6a55f9bfb 100644 --- a/src/libelogind/sd-bus/bus-socket.c +++ b/src/libelogind/sd-bus/bus-socket.c @@ -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);