Revert "kdbus: disable internal kdbus policy"
authorKonrad Lipinski <konrad.l@samsung.com>
Thu, 8 Sep 2016 14:47:29 +0000 (16:47 +0200)
committerKonrad Lipinski <konrad.l@samsung.com>
Fri, 9 Sep 2016 11:26:21 +0000 (13:26 +0200)
This reverts commit 00f9d63df02b74553422b8c78c0bad56e6feeb7a.

ipc/kdbus/connection.c
ipc/kdbus/names.c

index b3b081c272976f21663daafb694950d9f58158ad..a67d0f32cc41fd64572a6e293ed3fd3b0683df61 100644 (file)
@@ -1218,13 +1218,10 @@ static struct kdbus_reply *kdbus_conn_call(struct kdbus_conn *src,
        if (ret)
                goto exit;
 
-       /* Disable internal kdbus policy - possibilities of connections to own,
-        * see and talk to well-known names are restricted by LSM hooks
        if (!kdbus_conn_policy_talk(src, current_cred(), dst)) {
                ret = -EPERM;
                goto exit;
        }
-       */
 
        wait = kdbus_reply_new(dst, src, &kmsg->msg, name, true);
        if (IS_ERR(wait)) {
@@ -1303,12 +1300,9 @@ static int kdbus_conn_unicast(struct kdbus_conn *src, struct kdbus_kmsg *kmsg)
                if (!kdbus_match_db_match_kmsg(dst->match_db, src, kmsg) ||
                    !kdbus_conn_policy_talk(dst, NULL, src))
                        goto exit;
-        /* Disable internal kdbus policy - possibilities of connections to own,
-         * see and talk to well-known names are restricted by LSM hooks
        } else if (!kdbus_conn_policy_talk(src, current_cred(), dst)) {
                ret = -EPERM;
                goto exit;
-       */
        } else if (kmsg->msg.flags & KDBUS_MSG_EXPECT_REPLY) {
                wait = kdbus_reply_new(dst, src, &kmsg->msg, name, false);
                if (IS_ERR(wait)) {
index 90e0c016f66e90d083b6f507fec6bc7aabaa75b4..df99e4df815b2e678ebc648bdf963b1940fdc56d 100644 (file)
@@ -290,13 +290,10 @@ int kdbus_name_acquire(struct kdbus_name_registry *reg,
 
        down_write(&reg->rwlock);
 
-        /* Disable internal kdbus policy - possibilities of connections to own,
-         * see and talk to well-known names are restricted by LSM hooks
        if (!kdbus_conn_policy_own_name(conn, current_cred(), name)) {
                ret = -EPERM;
                goto exit_unlock;
        }
-       */
 
        hash = kdbus_strhash(name);
        e = kdbus_name_find(reg, hash, name);