diff options
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; |