selinux: use grep to check api supports (#402)
This checks `selinux_state` and `current_sid` supports in a raw way. Feels more reliable than the version checks. Supersedes #401, fixes #280, fixes #400.
This commit is contained in:
@@ -2,6 +2,11 @@
|
||||
#define __KSU_H_SELINUX
|
||||
|
||||
#include "linux/types.h"
|
||||
#include "linux/version.h"
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)) || defined(KSU_COMPAT_HAS_SELINUX_STATE)
|
||||
#define KSU_COMPAT_USE_SELINUX_STATE
|
||||
#endif
|
||||
|
||||
void setup_selinux();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user