Can I modify external/libselinux/src/android.c to force the policy just
load from /data/security/current/sepolicy?
-------------------------------
This is the original file external/libselinux/src/android.c
> static char const * const seapp_contexts_file[] = {
> "/seapp_contexts",
> "/data/security/current/seapp_contexts",
> NULL };
>
> static const struct selinux_opt seopts[] = {
> { SELABEL_OPT_PATH, "/file_contexts" },
> { SELABEL_OPT_PATH, "/data/security/current/file_contexts" },
> { 0, NULL } };
>
> static const char *const sepolicy_file[] = {
> "/data/security/current/sepolicy",
> NULL };
>
> static const struct selinux_opt seopts_service[] = {
> { SELABEL_OPT_PATH, "/data/security/current/service_contexts" },
> { 0, NULL }
> };
>
-------------------------------
I want to modify android.c as follows:
> static char const * const seapp_contexts_file[] = {
> "/data/security/current/seapp_contexts",
> NULL };
>
> static const struct selinux_opt seopts[] = {
> { SELABEL_OPT_PATH, "/data/security/current/file_contexts" },
> { 0, NULL } };
>
> static const char *const sepolicy_file[] = {
> "/data/security/current/sepolicy",
> NULL };
>
> static const struct selinux_opt seopts_service[] = {
> { SELABEL_OPT_PATH, "/data/security/current/seapp_contexts" },
> { SELABEL_OPT_PATH, "/data/security/current/service_contexts" },
> { 0, NULL }
> };
>
------------------------------
I think building the whole system and rebooting the device to modify the
sepolicy is complex.
Pushing the sepolicy and related file to the /data/security/current/ always
doesn't work.
So , I want a simple way for loading and testing the policy I modified.
If I modify the android.c, could It work as I expected or not?
Please help me.
Thanks advance.
_______________________________________________
Seandroid-list mailing list
[email protected]
To unsubscribe, send email to [email protected].
To get help, send an email containing "help" to
[email protected].