summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2012-09-07 15:58:43 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-09-07 15:58:44 -0700
commitcd620591b764cd999f18878985444fba01d5b710 (patch)
tree4e5da1d1ca16e8e45e5e89d5b6123b3f98a418a8 /cmds
parent1275abd013eee87b3fec5b704a799440cb1c71fe (diff)
parent7de350a91301985b7f2d9f28edde5aade8495d9b (diff)
downloadframeworks_base-cd620591b764cd999f18878985444fba01d5b710.zip
frameworks_base-cd620591b764cd999f18878985444fba01d5b710.tar.gz
frameworks_base-cd620591b764cd999f18878985444fba01d5b710.tar.bz2
Merge "installd: fix forward locking symlink" into jb-mr1-dev
Diffstat (limited to 'cmds')
-rw-r--r--cmds/installd/commands.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c
index 9e83a67..697d8ec 100644
--- a/cmds/installd/commands.c
+++ b/cmds/installd/commands.c
@@ -420,7 +420,7 @@ int protect(char *pkgname, gid_t gid)
return -1;
}
if (chmod(pkgpath, S_IRUSR|S_IWUSR|S_IRGRP) < 0) {
- ALOGE("failed to chmod '%s': %s\n", pkgpath, strerror(errno));
+ ALOGE("protect(): failed to chmod '%s': %s\n", pkgpath, strerror(errno));
return -1;
}
@@ -1014,13 +1014,13 @@ int linklib(const char* dataDir, const char* asecLibDir)
if (stat(dataDir, &s) < 0) return -1;
- if (chown(dataDir, 0, 0) < 0) {
+ if (chown(dataDir, AID_INSTALL, AID_INSTALL) < 0) {
ALOGE("failed to chown '%s': %s\n", dataDir, strerror(errno));
return -1;
}
if (chmod(dataDir, 0700) < 0) {
- ALOGE("failed to chmod '%s': %s\n", dataDir, strerror(errno));
+ ALOGE("linklib() 1: failed to chmod '%s': %s\n", dataDir, strerror(errno));
rc = -1;
goto out;
}
@@ -1058,7 +1058,7 @@ int linklib(const char* dataDir, const char* asecLibDir)
out:
if (chmod(dataDir, s.st_mode) < 0) {
- ALOGE("failed to chmod '%s': %s\n", dataDir, strerror(errno));
+ ALOGE("linklib() 2: failed to chmod '%s': %s\n", dataDir, strerror(errno));
rc = -errno;
}
@@ -1091,13 +1091,13 @@ int unlinklib(const char* dataDir)
return -1;
}
- if (chown(dataDir, 0, 0) < 0) {
+ if (chown(dataDir, AID_INSTALL, AID_INSTALL) < 0) {
ALOGE("failed to chown '%s': %s\n", dataDir, strerror(errno));
return -1;
}
if (chmod(dataDir, 0700) < 0) {
- ALOGE("failed to chmod '%s': %s\n", dataDir, strerror(errno));
+ ALOGE("unlinklib() 1: failed to chmod '%s': %s\n", dataDir, strerror(errno));
rc = -1;
goto out;
}
@@ -1140,7 +1140,7 @@ int unlinklib(const char* dataDir)
out:
if (chmod(dataDir, s.st_mode) < 0) {
- ALOGE("failed to chmod '%s': %s\n", dataDir, strerror(errno));
+ ALOGE("unlinklib() 2: failed to chmod '%s': %s\n", dataDir, strerror(errno));
rc = -1;
}