diff options
author | Nick Kralevich <nnk@google.com> | 2012-09-07 15:48:11 -0700 |
---|---|---|
committer | Nick Kralevich <nnk@google.com> | 2012-09-07 15:48:11 -0700 |
commit | 7de350a91301985b7f2d9f28edde5aade8495d9b (patch) | |
tree | 9db121eeed2e9d947564d465670c093f48ef0616 /cmds | |
parent | 37ee53420ce47860807eb8eaeb454c12fa46797b (diff) | |
download | frameworks_base-7de350a91301985b7f2d9f28edde5aade8495d9b.zip frameworks_base-7de350a91301985b7f2d9f28edde5aade8495d9b.tar.gz frameworks_base-7de350a91301985b7f2d9f28edde5aade8495d9b.tar.bz2 |
installd: fix forward locking symlink
installd was not creating a compatibility symlink when
installing a forward locked application. Fix.
Bug: 7121527
Change-Id: Ied507ab2b759d8658af563e6ac8f0dbb0d286cce
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/installd/commands.c | 14 |
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; } |