summaryrefslogtreecommitdiffstats
path: root/cmds/installd/installd.c
diff options
context:
space:
mode:
authorStephen Smalley <sds@tycho.nsa.gov>2013-12-17 16:04:20 -0500
committerStephen Smalley <sds@tycho.nsa.gov>2013-12-17 16:04:20 -0500
commit47a351834f202386b01a27d42ec41ceb1f17b754 (patch)
tree141f1d9957de65895b5e52a4db3edc6f576cf2a1 /cmds/installd/installd.c
parentde8c80692b0b2fcef705ba9b417477d2bba81e75 (diff)
downloadframeworks_native-47a351834f202386b01a27d42ec41ceb1f17b754.zip
frameworks_native-47a351834f202386b01a27d42ec41ceb1f17b754.tar.gz
frameworks_native-47a351834f202386b01a27d42ec41ceb1f17b754.tar.bz2
restorecon /data/media when re-creating it for multi-user upgrade.
Change-Id: I112c61863f2104d1962697c54cff25106e9b48a0 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Diffstat (limited to 'cmds/installd/installd.c')
-rw-r--r--cmds/installd/installd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmds/installd/installd.c b/cmds/installd/installd.c
index f52cee0..0c80dac 100644
--- a/cmds/installd/installd.c
+++ b/cmds/installd/installd.c
@@ -392,6 +392,10 @@ int initialize_directories() {
goto fail;
}
+ if (selinux_android_restorecon(android_media_dir.path)) {
+ goto fail;
+ }
+
// /data/media/0
char owner_media_dir[PATH_MAX];
snprintf(owner_media_dir, PATH_MAX, "%s0", android_media_dir.path);