Merge "resolved conflicts for merge of 40f2f751 to jb-mr1-dev-plus-aosp" into jb-mr1-dev-plus-aosp
This commit is contained in:
@@ -71,13 +71,20 @@ int install(const char *pkgname, uid_t uid, gid_t gid)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (selinux_android_setfilecon(libsymlink, pkgname, uid) < 0) {
|
||||
if (selinux_android_setfilecon(libsymlink, pkgname, AID_SYSTEM) < 0) {
|
||||
ALOGE("cannot setfilecon dir '%s': %s\n", libsymlink, strerror(errno));
|
||||
unlink(libsymlink);
|
||||
unlink(pkgdir);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (selinux_android_setfilecon(pkgdir, pkgname, uid) < 0) {
|
||||
ALOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno));
|
||||
unlink(libsymlink);
|
||||
unlink(pkgdir);
|
||||
return -errno;
|
||||
}
|
||||
|
||||
if (chown(pkgdir, uid, gid) < 0) {
|
||||
ALOGE("cannot chown dir '%s': %s\n", pkgdir, strerror(errno));
|
||||
unlink(libsymlink);
|
||||
|
||||
Reference in New Issue
Block a user