Skip to content

Commit 65e08d2

Browse files
Amith YamasaniAndroid (Google) Code Review
authored andcommitted
Merge "Fix permissions on cloned data dirs" into jb-mr1-dev
2 parents 1552586 + 794d62f commit 65e08d2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmds/installd/commands.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,11 @@ int make_user_data(const char *pkgname, uid_t uid, uid_t persona)
194194
ALOGE("cannot create dir '%s': %s\n", pkgdir, strerror(errno));
195195
return -errno;
196196
}
197+
if (chmod(pkgdir, 0751) < 0) {
198+
ALOGE("cannot chmod dir '%s': %s\n", pkgdir, strerror(errno));
199+
unlink(pkgdir);
200+
return -errno;
201+
}
197202
if (chown(pkgdir, uid, uid) < 0) {
198203
ALOGE("cannot chown dir '%s': %s\n", pkgdir, strerror(errno));
199204
unlink(pkgdir);

0 commit comments

Comments
 (0)