OSDN Git Service

Fix installd to create /data/data/<pkgname> with appropriate permissions.
authorDavid 'Digit' Turner <digit@google.com>
Wed, 10 Feb 2010 03:02:38 +0000 (19:02 -0800)
committerDavid 'Digit' Turner <digit@google.com>
Wed, 10 Feb 2010 03:02:38 +0000 (19:02 -0800)
The directory was created with read+exec rights for others.
The patch restricts it to only exec rights.

cmds/installd/commands.c

index 1e8555b..cd0302c 100644 (file)
@@ -39,7 +39,7 @@ int install(const char *pkgname, int encrypted_fs_flag, uid_t uid, gid_t gid)
             return -1;
     }
 
-    if (mkdir(pkgdir, 0755) < 0) {
+    if (mkdir(pkgdir, 0751) < 0) {
         LOGE("cannot create dir '%s': %s\n", pkgdir, strerror(errno));
         return -errno;
     }