summaryrefslogtreecommitdiff
path: root/ipc/kdbus/handle.c
diff options
context:
space:
mode:
authorKonrad Lipinski <konrad.l@samsung.com>2016-12-09 17:21:48 +0100
committerInki Dae <inki.dae@samsung.com>2017-01-12 01:15:43 -0800
commitd07e0df0ca20a1df62100485117df3d90a1a2a80 (patch)
tree4a59a966129647f40c15b7d0f6489eb3230cf1dc /ipc/kdbus/handle.c
parentfd9ae74878930bccb67c05bbd757b60f3c896e1c (diff)
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>
Diffstat (limited to 'ipc/kdbus/handle.c')
-rw-r--r--ipc/kdbus/handle.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ipc/kdbus/handle.c b/ipc/kdbus/handle.c
index fc60932d69c7..c5ce6cf6f8fa 100644
--- a/ipc/kdbus/handle.c
+++ b/ipc/kdbus/handle.c
@@ -498,6 +498,9 @@ static long kdbus_handle_ioctl_connected(struct file *file,
case KDBUS_CMD_UPDATE:
ret = kdbus_cmd_update(conn, buf);
break;
+ case KDBUS_CMD_UPDATE_METADATA:
+ ret = kdbus_cmd_update_metadata(conn);
+ break;
case KDBUS_CMD_MATCH_ADD:
ret = kdbus_cmd_match_add(conn, buf);
break;
@@ -576,6 +579,7 @@ static long kdbus_handle_ioctl(struct file *file, unsigned int cmd,
case KDBUS_CMD_NAME_ACQUIRE:
case KDBUS_CMD_NAME_RELEASE:
case KDBUS_CMD_LIST:
+ case KDBUS_CMD_UPDATE_METADATA:
case KDBUS_CMD_CONN_INFO:
case KDBUS_CMD_BUS_CREATOR_INFO:
case KDBUS_CMD_UPDATE: