From 47a351834f202386b01a27d42ec41ceb1f17b754 Mon Sep 17 00:00:00 2001 From: Stephen Smalley Date: Tue, 17 Dec 2013 16:04:20 -0500 Subject: [PATCH] restorecon /data/media when re-creating it for multi-user upgrade. Change-Id: I112c61863f2104d1962697c54cff25106e9b48a0 Signed-off-by: Stephen Smalley --- cmds/installd/installd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmds/installd/installd.c b/cmds/installd/installd.c index f52cee036..0c80dac3b 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);