summaryrefslogtreecommitdiff
path: root/ipc/kdbus/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/kdbus/connection.c')
-rw-r--r--ipc/kdbus/connection.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/ipc/kdbus/connection.c b/ipc/kdbus/connection.c
index 880007724bef..02a68724c2f2 100644
--- a/ipc/kdbus/connection.c
+++ b/ipc/kdbus/connection.c
@@ -31,7 +31,6 @@
#include <linux/slab.h>
#include <linux/syscalls.h>
#include <linux/uio.h>
-#include <linux/security.h>
#include "bus.h"
#include "connection.h"
@@ -54,7 +53,7 @@
#define KDBUS_CONN_ACTIVE_NEW (INT_MIN + 1)
/* Disable internal kdbus policy - possibilities of connections to own, see and
- * talk to names are restricted by libdbuspolicy library and LSM hooks
+ * talk to names are restricted by libdbuspolicy library
*/
#define DISABLE_KDBUS_POLICY
@@ -228,10 +227,6 @@ static struct kdbus_conn *kdbus_conn_new(struct kdbus_ep *ep, bool privileged,
}
}
- ret = security_kdbus_conn_alloc(conn);
- if (ret)
- goto exit_unref;
-
if (atomic_inc_return(&conn->user->connections) > KDBUS_USER_MAX_CONN) {
/* decremented by destructor as conn->user is valid */
ret = -EMFILE;
@@ -286,7 +281,6 @@ static void __kdbus_conn_free(struct kref *kref)
kdbus_pool_free(conn->pool);
kdbus_ep_unref(conn->ep);
put_cred(conn->cred);
- security_kdbus_conn_free(conn);
kfree(conn->description);
kfree(conn->quota);
kfree(conn);
@@ -1126,10 +1120,6 @@ static int kdbus_conn_reply(struct kdbus_conn *src, struct kdbus_kmsg *kmsg)
if (ret < 0)
goto exit;
- ret = security_kdbus_talk(src, dst);
- if (ret)
- goto exit;
-
mutex_lock(&dst->lock);
reply = kdbus_reply_find(src, dst, kmsg->msg.cookie_reply);
if (reply) {
@@ -1219,12 +1209,8 @@ static struct kdbus_reply *kdbus_conn_call(struct kdbus_conn *src,
if (ret < 0)
goto exit;
- ret = security_kdbus_talk(src, dst);
- 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
+ * see and talk to well-known names are restricted by libdbuspolicy
if (!kdbus_conn_policy_talk(src, current_cred(), dst)) {
ret = -EPERM;
goto exit;
@@ -1296,10 +1282,6 @@ static int kdbus_conn_unicast(struct kdbus_conn *src, struct kdbus_kmsg *kmsg)
if (ret < 0)
goto exit;
- ret = security_kdbus_talk(src, dst);
- if (ret)
- goto exit;
-
if (is_signal) {
/* like broadcasts we eavesdrop even if the msg is dropped */
kdbus_bus_eavesdrop(bus, src, kmsg);
@@ -1308,12 +1290,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)) {