This repository was archived by the owner on Aug 14, 2020. It is now read-only.
Description After many tests, it seems the init-script issue is due to SELinux context, NOT path as mentioned in #69 .
In order to follow it, a new issue is created.
Here are the steps we tested on our own in order to debug this:
Set init-script context to u:object_r:userinit_exec:s0 doesn't help (script doesn't even seem to be called)
Set init-script context to u:r:init:s0 doesn't help (here again, script doesn't even seem to be called)
"su" binary on CM12 comes from Superuser.apk, which doesn't support "--context" option
Script doesn't find "su" binary at startup, even with an enforced PATH value
We're able to run setenforce 0 on CM12 with default "su" binary
We might want to push a custom SELinux policy in order to allow the init-script to run iptables commands
Apparently, iptables should be run in "u:r:init:s0" context, as tested by @ahf
this documentation might provide some hints: https://source.android.com/devices/tech/security/selinux/customize.html
What should the policy allow:
run "iptables" binary in the "u:r:sysinit:s0" context
This is apparently the only authorization we might need — unsure about that.
Reactions are currently unavailable
After many tests, it seems the init-script issue is due to SELinux context, NOT path as mentioned in #69.
In order to follow it, a new issue is created.
Here are the steps we tested on our own in order to debug this:
setenforce 0on CM12 with default "su" binaryWhat should the policy allow:
This is apparently the only authorization we might need — unsure about that.