From 1dea3ac3046694d38847a2173edcdb6994f01744 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Wed, 26 Oct 2022 13:38:16 +0200 Subject: [PATCH] kdbus: adapt to Linux v5.15 release Change-Id: I272a0e64cd2a849366803505a291eb2d31548b7b Signed-off-by: Marek Szyprowski --- kernel/kdbus/metadata.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/kdbus/metadata.c b/kernel/kdbus/metadata.c index 274a419..3358d06 100644 --- a/kernel/kdbus/metadata.c +++ b/kernel/kdbus/metadata.c @@ -31,6 +31,7 @@ #include #include #include +#include #include "bus.h" #include "connection.h" @@ -291,7 +292,11 @@ static int kdbus_meta_proc_collect_seclabel(struct kdbus_meta_proc *mp) u32 sid, len; int ret; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0) + security_task_getsecid_subj(current, &sid); +#else security_task_getsecid(current, &sid); +#endif ret = security_secid_to_secctx(sid, &ctx, &len); if (ret < 0) { /* -- 2.34.1