handle: allow KDBUS_CMD_CONN_UPDATE ioctl for policy holders
authorDjalal Harouni <tixxdz@opendz.org>
Tue, 5 Aug 2014 01:46:06 +0000 (02:46 +0100)
committerKay Sievers <kay@vrfy.org>
Tue, 5 Aug 2014 07:24:26 +0000 (09:24 +0200)
Allow KDBUS_CMD_CONN_UPDATE for KDBUS_CONN_POLICY_HOLDER connections.

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
handle.c

index 2e6502b5356e47fdc406586f59d4367372fe5dfb..ac6868133280d1c037cd3f4f986d7929349d51a5 100644 (file)
--- a/handle.c
+++ b/handle.c
@@ -636,8 +636,8 @@ static long kdbus_handle_ioctl_ep_connected(struct file *file, unsigned int cmd,
 
        case KDBUS_CMD_CONN_UPDATE:
                /* update the properties of a connection */
-
-               if (conn->type != KDBUS_CONN_CONNECTED) {
+               if (conn->type != KDBUS_CONN_CONNECTED &&
+                   conn->type != KDBUS_CONN_POLICY_HOLDER) {
                        ret = -EOPNOTSUPP;
                        break;
                }