* clean unused header * on_module_mounted in ksud.c * refact: use app_profile * unified hook manager * add zygote to hook target * move reboot hook to supercall.c * refactor: kernel_umount setuid_hook * update mark rules, add init mark tracker * remove reboot from check_syscall_fastpath * update setuid_hook, remove uneeded sucompat enable * log freely * kernel: Migrate kprobe hook configuration items * kernel: fix build * cli: add ksud debug mark * Fix rustfmt warning --------- Co-authored-by: Ylarod <me@ylarod.cn> Co-authored-by: Wang Han <416810799@qq.com> Co-authored-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
38 lines
1.0 KiB
C
38 lines
1.0 KiB
C
#ifndef __KSU_H_ALLOWLIST
|
|
#define __KSU_H_ALLOWLIST
|
|
|
|
#include <linux/types.h>
|
|
#include "app_profile.h"
|
|
|
|
void ksu_allowlist_init(void);
|
|
|
|
void ksu_allowlist_exit(void);
|
|
|
|
void ksu_load_allow_list(void);
|
|
|
|
void ksu_show_allow_list(void);
|
|
|
|
// Check if the uid is in allow list
|
|
bool __ksu_is_allow_uid(uid_t uid);
|
|
#define ksu_is_allow_uid(uid) unlikely(__ksu_is_allow_uid(uid))
|
|
|
|
// Check if the uid is in allow list, or current is ksu domain root
|
|
bool __ksu_is_allow_uid_for_current(uid_t uid);
|
|
#define ksu_is_allow_uid_for_current(uid) unlikely(__ksu_is_allow_uid_for_current(uid))
|
|
|
|
bool ksu_get_allow_list(int *array, int *length, bool allow);
|
|
|
|
void ksu_prune_allowlist(bool (*is_uid_exist)(uid_t, char *, void *), void *data);
|
|
|
|
bool ksu_get_app_profile(struct app_profile *);
|
|
bool ksu_set_app_profile(struct app_profile *, bool persist);
|
|
|
|
bool ksu_uid_should_umount(uid_t uid);
|
|
struct root_profile *ksu_get_root_profile(uid_t uid);
|
|
|
|
#ifdef CONFIG_KSU_MANUAL_SU
|
|
bool ksu_temp_grant_root_once(uid_t uid);
|
|
void ksu_temp_revoke_root_once(uid_t uid);
|
|
#endif
|
|
#endif
|