diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-06-10 15:52:14 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-06-10 15:52:52 +0200 |
commit | aa0d0ed6b87d41367fd6c4401472df7d45dd1b13 (patch) | |
tree | 4be14c93b59c648063462a6564d43698e2ba5ccb /src | |
parent | 3c42e8b281b092b4d10f24c80e21d69b0f232b96 (diff) |
sd-bus: remove ucred parameter from bus_message_from_header() since we don't use it anymore
Diffstat (limited to 'src')
-rw-r--r-- | src/libsystemd/sd-bus/bus-kernel.c | 1 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/bus-message.c | 21 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/bus-message.h | 2 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/bus-socket.c | 1 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/test-bus-gvariant.c | 2 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/test-bus-marshal.c | 2 |
6 files changed, 3 insertions, 26 deletions
diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c index 572a9c6e64..3aaaabf4ed 100644 --- a/src/libsystemd/sd-bus/bus-kernel.c +++ b/src/libsystemd/sd-bus/bus-kernel.c @@ -498,7 +498,6 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) { footer, footer_size, n_bytes, fds, n_fds, - NULL, seclabel, 0, &m); if (r < 0) return r; diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c index 6ee209dd1b..c38b2a5fa5 100644 --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c @@ -435,7 +435,6 @@ int bus_message_from_header( size_t message_size, int *fds, unsigned n_fds, - const struct ucred *ucred, const char *label, size_t extra, sd_bus_message **ret) { @@ -528,23 +527,6 @@ int bus_message_from_header( m->fds = fds; m->n_fds = n_fds; - if (ucred) { - m->creds.pid = ucred->pid; - m->creds.euid = ucred->uid; - m->creds.egid = ucred->gid; - - /* Due to namespace translations some data might be - * missing from this ucred record. */ - if (m->creds.pid > 0) - m->creds.mask |= SD_BUS_CREDS_PID; - - if (m->creds.euid != UID_INVALID) - m->creds.mask |= SD_BUS_CREDS_EUID; - - if (m->creds.egid != GID_INVALID) - m->creds.mask |= SD_BUS_CREDS_EGID; - } - if (label) { m->creds.label = (char*) m + ALIGN(sizeof(sd_bus_message)) + ALIGN(extra); memcpy(m->creds.label, label, label_sz + 1); @@ -565,7 +547,6 @@ int bus_message_from_malloc( size_t length, int *fds, unsigned n_fds, - const struct ucred *ucred, const char *label, sd_bus_message **ret) { @@ -579,7 +560,7 @@ int bus_message_from_malloc( buffer, length, length, fds, n_fds, - ucred, label, + label, 0, &m); if (r < 0) return r; diff --git a/src/libsystemd/sd-bus/bus-message.h b/src/libsystemd/sd-bus/bus-message.h index d784e603dd..088d5b1109 100644 --- a/src/libsystemd/sd-bus/bus-message.h +++ b/src/libsystemd/sd-bus/bus-message.h @@ -205,7 +205,6 @@ int bus_message_from_header( size_t message_size, int *fds, unsigned n_fds, - const struct ucred *ucred, const char *label, size_t extra, sd_bus_message **ret); @@ -216,7 +215,6 @@ int bus_message_from_malloc( size_t length, int *fds, unsigned n_fds, - const struct ucred *ucred, const char *label, sd_bus_message **ret); diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c index 93ebe80b07..5209db8c4d 100644 --- a/src/libsystemd/sd-bus/bus-socket.c +++ b/src/libsystemd/sd-bus/bus-socket.c @@ -915,7 +915,6 @@ static int bus_socket_make_message(sd_bus *bus, size_t size) { bus->rbuffer, size, bus->fds, bus->n_fds, NULL, - NULL, &t); if (r < 0) { free(b); diff --git a/src/libsystemd/sd-bus/test-bus-gvariant.c b/src/libsystemd/sd-bus/test-bus-gvariant.c index 992edacb28..22ea00c2fb 100644 --- a/src/libsystemd/sd-bus/test-bus-gvariant.c +++ b/src/libsystemd/sd-bus/test-bus-gvariant.c @@ -198,7 +198,7 @@ static void test_marshal(void) { } #endif - assert_se(bus_message_from_malloc(bus, blob, sz, NULL, 0, NULL, NULL, &n) >= 0); + assert_se(bus_message_from_malloc(bus, blob, sz, NULL, 0, NULL, &n) >= 0); blob = NULL; assert_se(bus_message_dump(n, NULL, BUS_MESSAGE_DUMP_WITH_HEADER) >= 0); diff --git a/src/libsystemd/sd-bus/test-bus-marshal.c b/src/libsystemd/sd-bus/test-bus-marshal.c index f8ecadf499..a866a56179 100644 --- a/src/libsystemd/sd-bus/test-bus-marshal.c +++ b/src/libsystemd/sd-bus/test-bus-marshal.c @@ -212,7 +212,7 @@ int main(int argc, char *argv[]) { m = sd_bus_message_unref(m); - r = bus_message_from_malloc(bus, buffer, sz, NULL, 0, NULL, NULL, &m); + r = bus_message_from_malloc(bus, buffer, sz, NULL, 0, NULL, &m); assert_se(r >= 0); bus_message_dump(m, stdout, BUS_MESSAGE_DUMP_WITH_HEADER); |