diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-11-30 04:14:10 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-11-30 14:46:14 +0100 |
commit | 49b832c5b810f4d8bb59249ff25472fd670503dc (patch) | |
tree | ff71bd5e8318578db77f85d21843a273b60fce4b /src/libsystemd-bus/bus-message.c | |
parent | 2377ae1ff6ee2987a300d4df17320c2d9c61d23d (diff) |
bus: include unique and well known names in credentials object
Diffstat (limited to 'src/libsystemd-bus/bus-message.c')
-rw-r--r-- | src/libsystemd-bus/bus-message.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c index 56bf88c394..639b9a6214 100644 --- a/src/libsystemd-bus/bus-message.c +++ b/src/libsystemd-bus/bus-message.c @@ -3826,6 +3826,12 @@ int bus_message_parse_fields(sd_bus_message *m) { return -EBADMSG; r = message_peek_field_string(m, service_name_is_valid, &ri, &m->sender); + + if (r >= 0 && m->sender[0] == ':' && m->bus && m->bus->bus_client && !m->bus->is_kernel) { + m->creds.unique_name = (char*) m->sender; + m->creds.mask |= SD_BUS_CREDS_UNIQUE_NAME & m->bus->creds_mask; + } + break; |