mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-26 05:37:38 +00:00
Update rules
This commit is contained in:
parent
4c7e081e15
commit
c1c6f55f8f
@ -3,19 +3,7 @@
|
|||||||
* Includes all the parsing logic for the policy statements
|
* Includes all the parsing logic for the policy statements
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef INDEP_BINARY
|
|
||||||
int magiskpolicy_main(int argc, char *argv[]);
|
|
||||||
int main(int argc, char *argv[]) {
|
|
||||||
return magiskpolicy_main(argc, argv);
|
|
||||||
}
|
|
||||||
#define SELINUX_PATH "/sys/fs/selinux/"
|
|
||||||
#define SELINUX_ENFORCE SELINUX_PATH "enforce"
|
|
||||||
#define SELINUX_POLICY SELINUX_PATH "policy"
|
|
||||||
#define SELINUX_LOAD SELINUX_PATH "load"
|
|
||||||
#else
|
|
||||||
#include "magisk.h"
|
#include "magisk.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "magiskpolicy.h"
|
#include "magiskpolicy.h"
|
||||||
#include "sepolicy.h"
|
#include "sepolicy.h"
|
||||||
|
|
||||||
|
3
rules.c
3
rules.c
@ -227,6 +227,9 @@ void sepol_min_rules() {
|
|||||||
sepol_allow("su", "labeledfs", "filesystem", "unmount");
|
sepol_allow("su", "labeledfs", "filesystem", "unmount");
|
||||||
sepol_allow("kernel", "system_data_file", "file", "read");
|
sepol_allow("kernel", "system_data_file", "file", "read");
|
||||||
|
|
||||||
|
// For changing attributes
|
||||||
|
sepol_allow("rootfs", "tmpfs", "filesystem", "associate");
|
||||||
|
|
||||||
// Xposed
|
// Xposed
|
||||||
sepol_allow("untrusted_app", "untrusted_app", "capability", "setgid");
|
sepol_allow("untrusted_app", "untrusted_app", "capability", "setgid");
|
||||||
sepol_allow("system_server", "dex2oat_exec", "file", ALL);
|
sepol_allow("system_server", "dex2oat_exec", "file", ALL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user