1
mirror of https://github.com/topjohnwu/Magisk synced 2024-11-13 20:54:12 +01:00
Go to file
2013-07-16 19:51:26 -04:00
Makefile initial commit 2013-06-27 21:42:09 -04:00
README.txt updates to readme 2013-06-28 11:23:25 -04:00
sepolicy-inject.c Add permissive type support 2013-07-16 19:51:26 -04:00

Injects allow rules into binary SELinux kernel policies

$ ./sepolicy-inject -s shell -t system -c file -p read -P sepolicy -o sepolicy2                                   
libsepol.policydb_index_others: security:  1 users, 2 roles, 518 types, 14 bools
libsepol.policydb_index_others: security: 1 sens, 1024 cats
libsepol.policydb_index_others: security:  84 classes, 4539 rules, 162 cond rules

$ sesearch -A -s shell -t system -c file sepolicy
Found 1 semantic av rules:
   allow appdomain domain : file { ioctl read getattr lock open } ; 

$ sesearch -A -s shell -t system -c file sepolicy2
Found 2 semantic av rules:
   allow shell system : file read ; 
   allow appdomain domain : file { ioctl read getattr lock open } ; 


TODO:

Insert multiple rules at the same time
Remove rules
Use attributes 
Add permissive domains