From 55471dcd0f843e79d8665c63165720eca6a9c980 Mon Sep 17 00:00:00 2001 From: Alex Light Date: Wed, 27 Aug 2014 15:39:17 -0700 Subject: Change /dalvik-cache to be owned by root. Bug: 16875245 (cherry picked from commit 79bf4007f559e194205f632b23d2bfb6f8d1e7ba) Change-Id: I29a70215a2207bc4e0db02ab751d32a68edf4b66 --- cmds/app_process/app_main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cmds/app_process') diff --git a/cmds/app_process/app_main.cpp b/cmds/app_process/app_main.cpp index 74ccbc2..6e77e13 100644 --- a/cmds/app_process/app_main.cpp +++ b/cmds/app_process/app_main.cpp @@ -161,17 +161,17 @@ static void maybeCreateDalvikCache() { LOG_ALWAYS_FATAL_IF((numChars >= PATH_MAX || numChars < 0), "Error constructing dalvik cache : %s", strerror(errno)); - int result = mkdir(dalvikCacheDir, 0771); + int result = mkdir(dalvikCacheDir, 0711); LOG_ALWAYS_FATAL_IF((result < 0 && errno != EEXIST), "Error creating cache dir %s : %s", dalvikCacheDir, strerror(errno)); // We always perform these steps because the directory might // already exist, with wider permissions and a different owner // than we'd like. - result = chown(dalvikCacheDir, AID_SYSTEM, AID_SYSTEM); + result = chown(dalvikCacheDir, AID_ROOT, AID_ROOT); LOG_ALWAYS_FATAL_IF((result < 0), "Error changing dalvik-cache ownership : %s", strerror(errno)); - result = chmod(dalvikCacheDir, 0771); + result = chmod(dalvikCacheDir, 0711); LOG_ALWAYS_FATAL_IF((result < 0), "Error changing dalvik-cache permissions : %s", strerror(errno)); } -- cgit v1.1