diff options
author | Amith Yamasani <yamasani@google.com> | 2012-08-24 12:58:27 -0700 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2012-08-24 12:58:27 -0700 |
commit | 794d62f6078d23ff32f098f9d472f492be01b72f (patch) | |
tree | 1217fe0b7a7ce88e1c7fbf8efb0e98e6ea864b17 /cmds | |
parent | 2c1dfa29b40a988e3ea8f6922768465743aafddc (diff) | |
download | frameworks_base-794d62f6078d23ff32f098f9d472f492be01b72f.zip frameworks_base-794d62f6078d23ff32f098f9d472f492be01b72f.tar.gz frameworks_base-794d62f6078d23ff32f098f9d472f492be01b72f.tar.bz2 |
Fix permissions on cloned data dirs
This makes the downloaded apk visible to the package installer
Change-Id: I0f60cf279a3c6a08c7479f93ef9135d7428f2385
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/installd/commands.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c index c16e6fb..a52f74a 100644 --- a/cmds/installd/commands.c +++ b/cmds/installd/commands.c @@ -194,6 +194,11 @@ int make_user_data(const char *pkgname, uid_t uid, uid_t persona) ALOGE("cannot create dir '%s': %s\n", pkgdir, strerror(errno)); return -errno; } + if (chmod(pkgdir, 0751) < 0) { + ALOGE("cannot chmod dir '%s': %s\n", pkgdir, strerror(errno)); + unlink(pkgdir); + return -errno; + } if (chown(pkgdir, uid, uid) < 0) { ALOGE("cannot chown dir '%s': %s\n", pkgdir, strerror(errno)); unlink(pkgdir); |