manager: sync kernel struct and bump profile version

This commit is contained in:
weishu
2023-06-06 20:56:19 +08:00
parent 5db7075432
commit 2a5fb76f95
2 changed files with 4 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ bool uid_should_umount(int uid);
bool is_safe_mode();
#define KSU_APP_PROFILE_VER 1
#define KSU_APP_PROFILE_VER 2
#define KSU_MAX_PACKAGE_NAME 256
// NGROUPS_MAX for Linux is 65535 generally, but we only supports 32 groups.
#define KSU_MAX_GROUPS 32
@@ -29,8 +29,8 @@ struct root_profile {
int32_t uid;
int32_t gid;
int32_t groups[KSU_MAX_GROUPS];
int32_t groups_count;
int32_t groups[KSU_MAX_GROUPS];
// kernel_cap_t is u32[2] for capabilities v3
struct {

View File

@@ -14,7 +14,8 @@ object Natives {
// 10915: allowlist breaking change, add app profile
// 10931: app profile struct add 'version' field
// 10946: add capabilities
const val MINIMAL_SUPPORTED_KERNEL = 10946
// 10977: change groups_count and groups to avoid overflow write
const val MINIMAL_SUPPORTED_KERNEL = 10977
init {
System.loadLibrary("kernelsu")