Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 794d62f6 authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Fix permissions on cloned data dirs

This makes the downloaded apk visible to the package installer

Change-Id: I0f60cf279a3c6a08c7479f93ef9135d7428f2385
parent 2c1dfa29
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);