summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorGeremy Condra <gcondra@google.com>2013-04-10 17:51:53 -0700
committerGeremy Condra <gcondra@google.com>2013-04-15 13:16:38 -0700
commit47677a506febfe386d186f8f854d967f165a342f (patch)
treef03eebcd6b06275e1949091d37b0bf5a6cde6dc1 /init
parentbf6c100a8c06ec3a50669ab4d9d8c9419ca8b2e8 (diff)
downloadsystem_core-47677a506febfe386d186f8f854d967f165a342f.tar.gz
system_core-47677a506febfe386d186f8f854d967f165a342f.tar.bz2
system_core-47677a506febfe386d186f8f854d967f165a342f.zip
Add logic to fixup file contexts after a policy update.
Bug: 8116902 Change-Id: Ifa1785c75a24a9b3cfcb700f22ded7d16a917f79
Diffstat (limited to 'init')
-rwxr-xr-xinit/init.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/init/init.c b/init/init.c
index f8b21e64a..3e67192b2 100755
--- a/init/init.c
+++ b/init/init.c
@@ -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;
}