manager: add support for setting default non root profile.

This commit is contained in:
weishu
2023-06-03 23:54:08 +08:00
parent 32538c9833
commit b55c229038
7 changed files with 67 additions and 8 deletions

View File

@@ -9,14 +9,11 @@ bool become_manager(const char *);
int get_version();
bool allow_su(int uid, bool allow);
bool get_allow_list(int *uids, int *size);
bool get_deny_list(int *uids, int *size);
bool is_safe_mode();
#define KSU_APP_PROFILE_VER 1
#define KSU_MAX_PACKAGE_NAME 256
// NGROUPS_MAX for Linux is 65535 generally, but we only supports 32 groups.
#define KSU_MAX_GROUPS 32
@@ -26,6 +23,8 @@ using p_key_t = char[KSU_MAX_PACKAGE_NAME];
struct app_profile {
int32_t version;
// this is usually the package of the app, but can be other value for special apps
p_key_t key;
int32_t current_uid;