diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-03-19 04:17:00 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-03-19 04:17:00 +0100 |
commit | 09365592341b4ba4ceca677bb551dcde811e0333 (patch) | |
tree | 662f7de7e71fe5d05226164cc3a90088dfbf7cf6 /src/libsystemd/sd-bus/bus-kernel.c | |
parent | 4f10118016f9b2fd7e1d26c9ef7d91eb33fba694 (diff) |
sd-bus: add proper monitoring API
Diffstat (limited to 'src/libsystemd/sd-bus/bus-kernel.c')
-rw-r--r-- | src/libsystemd/sd-bus/bus-kernel.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c index 00f58114ac..af42b9f5e1 100644 --- a/src/libsystemd/sd-bus/bus-kernel.c +++ b/src/libsystemd/sd-bus/bus-kernel.c @@ -1339,9 +1339,13 @@ int bus_kernel_create_bus(const char *name, bool world, char **s) { return fd; } -static void bus_kernel_translate_policy(const BusNamePolicy *policy, struct kdbus_item *item) -{ +static void bus_kernel_translate_policy(const BusNamePolicy *policy, struct kdbus_item *item) { + + assert(policy); + assert(item); + switch (policy->type) { + case BUSNAME_POLICY_TYPE_USER: item->policy_access.type = KDBUS_POLICY_ACCESS_USER; item->policy_access.id = policy->uid; @@ -1361,6 +1365,7 @@ static void bus_kernel_translate_policy(const BusNamePolicy *policy, struct kdbu } switch (policy->access) { + case BUSNAME_POLICY_ACCESS_SEE: item->policy_access.access = KDBUS_POLICY_SEE; break; |