summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2014-08-28 23:17:04 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-08-28 23:17:04 +0000
commit7d86375b1e02bff726911ed20070bc8e0553daaa (patch)
treedba5c625b9c74e7dd9bdc3d7dc9e87b4df104157
parent2d3571cc17a5a6b1072951227d889ce14a3f88cf (diff)
parent79bf4007f559e194205f632b23d2bfb6f8d1e7ba (diff)
downloadbase-7d86375b1e02bff726911ed20070bc8e0553daaa.tar.gz
Merge "Change /dalvik-cache to be owned by root."
-rw-r--r--cmds/app_process/app_main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmds/app_process/app_main.cpp b/cmds/app_process/app_main.cpp
index 74ccbc2b9220..6e77e1324e03 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));
}