summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2012-07-30 15:00:16 -0700
committerKenny Root <kroot@google.com>2012-07-30 15:01:20 -0700
commit515087d1c586c6c24222e03bbd01af58bdf0ed8d (patch)
tree32a8c08ba2b38f4a7e4bdc9c0c458602b23a30b1 /cmds
parent47db02bad8fed67025669c41ef0c0dd9cafe7ed2 (diff)
downloadframeworks_base-515087d1c586c6c24222e03bbd01af58bdf0ed8d.zip
frameworks_base-515087d1c586c6c24222e03bbd01af58bdf0ed8d.tar.gz
frameworks_base-515087d1c586c6c24222e03bbd01af58bdf0ed8d.tar.bz2
Explicitly set lib dir permissions during unlink
The default umask changed, so we have to explicitly set the mode of the lib directory when we create it in unlinklib. Bug: 6857022 Change-Id: I06fc3f29e99d686bbbb96184d8c314d4cc57e9fe
Diffstat (limited to 'cmds')
-rw-r--r--cmds/installd/commands.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c
index 96a6438..a509156 100644
--- a/cmds/installd/commands.c
+++ b/cmds/installd/commands.c
@@ -1056,7 +1056,12 @@ int unlinklib(const char* dataDir)
rc = -errno;
goto out;
}
-
+ if (chmod(libdir, 0755) < 0) {
+ ALOGE("cannot chmod dir '%s': %s\n", libdir, strerror(errno));
+ unlink(libdir);
+ rc = -errno;
+ goto out;
+ }
if (chown(libdir, AID_SYSTEM, AID_SYSTEM) < 0) {
ALOGE("cannot chown dir '%s': %s\n", libdir, strerror(errno));
unlink(libdir);