On 09/08/2015 05:34 AM, weiyuan wrote:
> Dear All:
>
> On Android 6.0,
>
> I have a file "/sys/class/leds/red/brightness" under /sys, its parent
> directory is a symlink.
>
> "u:object_r:sysfs:s0 red ->
> ../../devices/fff34000.pmic/pmic_led.118/leds/red"
> "u:object_r:sysfs:s0 brightness"
>
> I notice that there is a patch "restorecon: only operate on canonical paths.",
> so I add some logs like "--SELINUX--:" in the function
> "selinux_android_restorecon_common", then I runs some tests.
>
> -----------test A.-----------
>
> file_contexts:
> "/sys/class/leds/red/brightness u:object_r:sysfs_led:s0"
Could you just replace this entry with one like this:
/sys/devices/.*/leds/red/brightness u:object_r:sysfs_led:s0
Then the existing restorecon_recursive("/sys") by init would label it
correctly and you wouldn't need to restorecon it from your
init.<board>.rc file.
_______________________________________________
Seandroid-list mailing list
[email protected]
To unsubscribe, send email to [email protected].
To get help, send an email containing "help" to
[email protected].