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

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

index 880007724befae8772d7e76aec0d7afe8c31c8e0..2d54105d6f20b0c98e65d376af732df212492a89 100644 (file)
@@ -1223,13 +1223,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)) {
@@ -1308,12 +1305,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);