1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-30 23:21:08 +03:00

bus: when we are talking to a bus, SCM_CREDS/SCM_SECLABEL are not very useful

This commit is contained in:
Lennart Poettering 2013-03-26 01:58:14 +01:00
parent 0a72c2bdef
commit d65ddaa40e

View File

@ -206,8 +206,8 @@ static int bus_socket_setup(sd_bus *b) {
assert(b); assert(b);
/* Enable SO_PASSCRED + SO_PASSEC. We try this on any socket, /* Enable SO_PASSCRED + SO_PASSEC. We try this on any
* just in case. This is actually irrelavant for */ * socket, just in case. */
one = 1; one = 1;
setsockopt(b->fd, SOL_SOCKET, SO_PASSCRED, &one, sizeof(one)); setsockopt(b->fd, SOL_SOCKET, SO_PASSCRED, &one, sizeof(one));
setsockopt(b->fd, SOL_SOCKET, SO_PASSSEC, &one, sizeof(one)); setsockopt(b->fd, SOL_SOCKET, SO_PASSSEC, &one, sizeof(one));
@ -467,8 +467,8 @@ static int bus_socket_make_message(sd_bus *bus, size_t size, sd_bus_message **m)
r = bus_message_from_malloc(bus->rbuffer, size, r = bus_message_from_malloc(bus->rbuffer, size,
bus->fds, bus->n_fds, bus->fds, bus->n_fds,
bus->ucred_valid ? &bus->ucred : NULL, !bus->bus_client && bus->ucred_valid ? &bus->ucred : NULL,
bus->label[0] ? bus->label : NULL, !bus->bus_client && bus->label[0] ? bus->label : NULL,
&t); &t);
if (r < 0) { if (r < 0) {
free(b); free(b);