Add logic to fixup file contexts after a policy update.

Bug: 8116902
Change-Id: Ifa1785c75a24a9b3cfcb700f22ded7d16a917f79
This commit is contained in:
Geremy Condra 2013-04-10 17:51:53 -07:00
parent bf6c100a8c
commit 47677a506f
1 changed files with 6 additions and 1 deletions

View File

@ -745,7 +745,7 @@ static int bootchart_init_action(int nargs, char **args)
#endif
static const struct selinux_opt seopts_prop[] = {
{ SELABEL_OPT_PATH, "/data/security/property_contexts" },
{ SELABEL_OPT_PATH, "/data/security/current/property_contexts" },
{ SELABEL_OPT_PATH, "/property_contexts" },
{ 0, NULL }
};
@ -793,6 +793,11 @@ int selinux_reload_policy(void)
selabel_close(sehandle_prop);
selinux_init_all_handles();
selinux_android_fixcon("/data");
selinux_android_fixcon("/system");
selinux_android_fixcon("/dev");
return 0;
}