diff options
author | rpcraig <rpcraig@tycho.ncsc.mil> | 2012-11-14 10:04:38 -0500 |
---|---|---|
committer | rpcraig <rpcraig@tycho.ncsc.mil> | 2012-11-14 10:16:03 -0500 |
commit | 2e59369dca975092751b163b803fd27d48d9aca6 (patch) | |
tree | 91d994aae4ca4ab50e5339eea6035325214a62ff /cmds | |
parent | 4299f63e54dceeaaa44a057ba03f0881834491ec (diff) | |
download | frameworks_base-2e59369dca975092751b163b803fd27d48d9aca6.zip frameworks_base-2e59369dca975092751b163b803fd27d48d9aca6.tar.gz frameworks_base-2e59369dca975092751b163b803fd27d48d9aca6.tar.bz2 |
Bug fix on installd with SELinux enabled kernel.
setfilecon is not required on libsymlinks when target
doesn't exist. A bootloop is caused without this
change.
Change-Id: I96dbd4b1f47a752bfcaf6016c81fd43083c4a6e1
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/installd/commands.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c index 59bcda1..2a54710 100644 --- a/cmds/installd/commands.c +++ b/cmds/installd/commands.c @@ -91,13 +91,6 @@ int install(const char *pkgname, uid_t uid, gid_t gid) return -1; } - 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); @@ -252,13 +245,6 @@ int make_user_data(const char *pkgname, uid_t uid, uid_t persona) return -1; } - if (selinux_android_setfilecon(libsymlink, pkgname, AID_SYSTEM) < 0) { - ALOGE("cannot setfilecon dir '%s': %s\n", libsymlink, strerror(errno)); - unlink(libsymlink); - unlink(pkgdir); - return -errno; - } - if (selinux_android_setfilecon(pkgdir, pkgname, uid) < 0) { ALOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno)); unlink(libsymlink); |