kdbus: add CMD_UPDATE_METADATA ioctl (reinitialize connection metadata) 74/103874/4
authorKonrad Lipinski <konrad.l@samsung.com>
Fri, 9 Dec 2016 16:21:48 +0000 (17:21 +0100)
committerInki Dae <inki.dae@samsung.com>
Thu, 12 Jan 2017 09:15:43 +0000 (01:15 -0800)
commitd07e0df0ca20a1df62100485117df3d90a1a2a80
tree4a59a966129647f40c15b7d0f6489eb3230cf1dc
parentfd9ae74878930bccb67c05bbd757b60f3c896e1c
kdbus: add CMD_UPDATE_METADATA ioctl (reinitialize connection metadata)

Added to satisfy efl/launchpad developers' request.

Tizen code routinely performs the following operation sequence:
1. create kdbus connection
2. update seclabel
3. rely on updated seclabel

CONN_INFO has always returned seclabel collected at HELLO time (behavior
consistent across all kdbus versions and documented in kdbus man). This
would break step 3 of the above sequence.

KDBUS_CMD_UPDATE_METADATA ioctl updates a connection's metadata to
reflect the current state. Metadata is collected in the exact same way
as during HELLO.

Semantics Required by efl/launchpad can be obtained by altering the
sequence like so:
1. create kdbus connection
2. update seclabel
+2b. ioctl(connection_fd, KDBUS_CMD_UPDATE_METADATA);
3. rely on updated seclabel

Change-Id: I4a4b2aea4256f8bfb3bd1c0d3df5e963d243cb52
Signed-off-by: Konrad Lipinski <konrad.l@samsung.com>
include/uapi/linux/kdbus.h
ipc/kdbus/connection.c
ipc/kdbus/connection.h
ipc/kdbus/handle.c
ipc/kdbus/metadata.c
ipc/kdbus/metadata.h