Since the commit
6326948f940d ("lsm: security_task_getsecid_subj() ->
security_current_getsecid_subj()"), included in kernel v5.17, the
security_task_getsecid_subj() is replaced with
security_current_getsecid_subj().
Use security_current_getsecid_subj() for v5.17 or later kernel
version.
Change-Id: I8385d67721eedb8cd0352a24fd5c8a9ee6686513
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
u32 sid, len;
int ret;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
+ security_current_getsecid_subj(&sid);
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0)
security_task_getsecid_subj(current, &sid);
#else
security_task_getsecid(current, &sid);