mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-03 07:51:54 +00:00
Migrate MagiskInit to C++
This commit is contained in:
@@ -16,6 +16,10 @@
|
||||
#define SPLIT_PRECOMPILE NONPLAT_POLICY_DIR "precompiled_sepolicy"
|
||||
#define SPLIT_NONPLAT_VER NONPLAT_POLICY_DIR "plat_sepolicy_vers.txt"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// policydb functions
|
||||
int load_policydb(const char *filename);
|
||||
int compile_split_cil();
|
||||
@@ -23,21 +27,25 @@ int dump_policydb(const char *filename);
|
||||
void destroy_policydb();
|
||||
|
||||
// Handy functions
|
||||
int sepol_allow(char *s, char *t, char *c, char *p);
|
||||
int sepol_deny(char *s, char *t, char *c, char *p);
|
||||
int sepol_auditallow(char *s, char *t, char *c, char *p);
|
||||
int sepol_auditdeny(char *s, char *t, char *c, char *p);
|
||||
int sepol_typetrans(char *s, char *t, char *c, char *d, char *o);
|
||||
int sepol_allowxperm(char *s, char *t, char *c, char *range);
|
||||
int sepol_auditallowxperm(char *s, char *t, char *c, char *range);
|
||||
int sepol_dontauditxperm(char *s, char *t, char *c, char *range);
|
||||
int sepol_create(char *s);
|
||||
int sepol_permissive(char *s);
|
||||
int sepol_enforce(char *s);
|
||||
int sepol_attradd(char *s, char *a);
|
||||
int sepol_exists(char *source);
|
||||
int sepol_allow(const char *s, const char *t, const char *c, const char *p);
|
||||
int sepol_deny(const char *s, const char *t, const char *c, const char *p);
|
||||
int sepol_auditallow(const char *s, const char *t, const char *c, const char *p);
|
||||
int sepol_auditdeny(const char *s, const char *t, const char *c, const char *p);
|
||||
int sepol_typetrans(const char *s, const char *t, const char *c, const char *d, const char *o);
|
||||
int sepol_allowxperm(const char *s, const char *t, const char *c, const char *range);
|
||||
int sepol_auditallowxperm(const char *s, const char *t, const char *c, const char *range);
|
||||
int sepol_dontauditxperm(const char *s, const char *t, const char *c, const char *range);
|
||||
int sepol_create(const char *s);
|
||||
int sepol_permissive(const char *s);
|
||||
int sepol_enforce(const char *s);
|
||||
int sepol_attradd(const char *s, const char *a);
|
||||
int sepol_exists(const char *source);
|
||||
|
||||
// Built in rules
|
||||
void sepol_magisk_rules();
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user