kernel: bump format version to force clear allowlist, prepare to release a new version

This commit is contained in:
weishu
2023-06-06 20:49:39 +08:00
parent 1408175a35
commit 5db7075432
2 changed files with 8 additions and 3 deletions

View File

@@ -18,7 +18,7 @@
#include "allowlist.h"
#define FILE_MAGIC 0x7f4b5355 // ' KSU', u32
#define FILE_FORMAT_VERSION 2 // u32
#define FILE_FORMAT_VERSION 3 // u32
#define KSU_APP_PROFILE_PRESERVE_UID 9999 // NOBODY_UID
@@ -108,6 +108,11 @@ static bool profile_valid(struct app_profile *profile)
return false;
}
if (profile->version < KSU_APP_PROFILE_VER) {
pr_info("Unsupported profile version: %d\n", profile->version);
return false;
}
if (profile->allow_su) {
if (profile->rp_config.profile.groups_count > KSU_MAX_GROUPS) {
return false;