kdbus: add policy database implementation
authorDaniel Mack <daniel@zonque.org>
Thu, 11 Sep 2014 17:00:43 +0000 (19:00 +0200)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 4 Apr 2016 01:12:27 +0000 (10:12 +0900)
commit56b156b29f3acefb5daf544dc5df5681f4fe69b5
tree2ce1689549884fa158cab197192d13af8c7e26f2
parent3a09a9739eca72c948cc44ff9601a9d8ebd16680
kdbus: add policy database implementation

This patch adds the policy database implementation.

A policy database restricts the possibilities of connections to own,
see and talk to well-known names. It can be associated with a bus
(through a policy holder connection) or a custom endpoint.

By default, buses have an empty policy database that is augmented on
demand when a policy holder connection is instantiated.

Policies are set through KDBUS_CMD_HELLO (when creating a policy
holder connection), KDBUS_CMD_CONN_UPDATE (when updating a policy
holder connection), KDBUS_CMD_EP_MAKE (creating a custom endpoint)
or KDBUS_CMD_EP_UPDATE (updating a custom endpoint). In all cases,
the name and policy access information is stored in items of type
KDBUS_ITEM_NAME and KDBUS_ITEM_POLICY_ACCESS.

See kdbus.policy(7) for more details.

Change-Id: I99ebd6dbec9ca7c4b8bd9609c40a0dea71d20a62
Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paul Osmialowski <p.osmialowsk@samsung.com>
ipc/kdbus/policy.c [new file with mode: 0644]
ipc/kdbus/policy.h [new file with mode: 0644]