kernel: handle optional backport for selinux_inode

* For supporting kernel 4.19 with 5.10 bpf backports.

Signed-off-by: rsuntk <rsuntk@yukiprjkt.my.id>
This commit is contained in:
rsuntk
2025-09-10 18:45:49 +07:00
committed by ShirkNeko
parent d0c3c2ada2
commit cc8cf28cbc
2 changed files with 5 additions and 2 deletions

View File

@@ -164,7 +164,7 @@ int ksu_handle_devpts(struct inode *inode)
return 0;
if (ksu_devpts_sid) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0) || defined(KSU_OPTIONAL_SELINUX_INODE)
struct inode_security_struct *sec = selinux_inode(inode);
#else
struct inode_security_struct *sec =