Go to file
2017-02-04 17:30:34 +08:00
Android.mk Project restructure 2017-02-01 00:51:45 +08:00
main.c Improve main 2017-02-04 17:30:34 +08:00
README.txt Update README 2015-11-14 17:02:09 +01:00
rules.c Add parser for all commands and complete usage 2017-02-04 06:38:57 +08:00
sepolicy-inject.h Improve main 2017-02-04 17:30:34 +08:00
sepolicy.c Improve main 2017-02-04 17:30:34 +08:00
utils.c Add parser for all commands and complete usage 2017-02-04 06:38:57 +08:00

Injects allow rules into binary SELinux kernel policies

Injecting a rule:
$ ./sepolicy-inject -s shell -t system -c file -p read -P sepolicy

Injecting multiple permissions:
$ ./sepolicy-inject -s shell -t system -c file -p read,write,open -P sepolicy

Add a type_attribute to a domain:
$ ./sepolicy-inject -s su -a mlstrustedsubject -P sepolicy

Injecting a permissive domain:
$ ./sepolicy-inject -Z shell -P sepolicy

Change a permissive domain to non-permissive:
$ ./sepolicy-inject -z shell -P sepolicy 

Test a SELinux type exists:
$ ./sepolicy-inject -e -s shell -P sepolicy 

Test a SELinux class exists:
$ ./sepolicy-inject -e -c service_manager -P sepolicy 

Add a transition:
$ ./sepolicy-inject -s su_daemon -f device -c file -t su_device -P sepolicy

Add a filename transition:
$ ./sepolicy-inject -s su_daemon -f device -c file -g "socket" -t su_device -P sepolicy