From: Lennart Poettering Date: Sat, 21 Dec 2013 17:47:33 +0000 (+0100) Subject: bus: when getting credentials of a bus name that is activatable but not activated... X-Git-Tag: v209~762 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=c20733832fdfc780380f1b276655d69782057e49 bus: when getting credentials of a bus name that is activatable but not activated, say we don't have anything. --- diff --git a/src/libsystemd-bus/bus-control.c b/src/libsystemd-bus/bus-control.c index c3186a08c..f08d78a78 100644 --- a/src/libsystemd-bus/bus-control.c +++ b/src/libsystemd-bus/bus-control.c @@ -387,6 +387,10 @@ static int bus_get_owner_kdbus( conn_info = (struct kdbus_conn_info *) ((uint8_t *) bus->kdbus_buffer + cmd->offset); + /* Non-activated names are considered not available */ + if (conn_info->flags & KDBUS_HELLO_ACTIVATOR) + return name[0] == ':' ? -ENXIO : -ENOENT; + c = bus_creds_new(); if (!c) return -ENOMEM;