am 0e4d2885: am 2044ac43: Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API."

* commit '0e4d2885a34d31f5dbe5a08bdb654953abaf82a2':
  Convert all selinux_android_restorecon and _setfilecon calls to new API.
This commit is contained in:
Nick Kralevich 2014-02-13 00:16:04 +00:00 committed by Android Git Automerger
commit 165c8bdfb5
3 changed files with 4 additions and 4 deletions

View File

@ -508,7 +508,7 @@ const char *dump_traces() {
if (!mkdir(anr_traces_dir, 0775)) { if (!mkdir(anr_traces_dir, 0775)) {
chown(anr_traces_dir, AID_SYSTEM, AID_SYSTEM); chown(anr_traces_dir, AID_SYSTEM, AID_SYSTEM);
chmod(anr_traces_dir, 0775); chmod(anr_traces_dir, 0775);
if (selinux_android_restorecon(anr_traces_dir) == -1) { if (selinux_android_restorecon(anr_traces_dir, 0) == -1) {
fprintf(stderr, "restorecon failed for %s: %s\n", anr_traces_dir, strerror(errno)); fprintf(stderr, "restorecon failed for %s: %s\n", anr_traces_dir, strerror(errno));
} }
} else if (errno != EEXIST) { } else if (errno != EEXIST) {

View File

@ -91,7 +91,7 @@ int install(const char *pkgname, uid_t uid, gid_t gid, const char *seinfo)
return -1; return -1;
} }
if (selinux_android_setfilecon2(pkgdir, pkgname, seinfo, uid) < 0) { if (selinux_android_setfilecon(pkgdir, pkgname, seinfo, uid) < 0) {
ALOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno)); ALOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno));
unlink(libsymlink); unlink(libsymlink);
unlink(pkgdir); unlink(pkgdir);
@ -245,7 +245,7 @@ int make_user_data(const char *pkgname, uid_t uid, userid_t userid, const char*
return -1; return -1;
} }
if (selinux_android_setfilecon2(pkgdir, pkgname, seinfo, uid) < 0) { if (selinux_android_setfilecon(pkgdir, pkgname, seinfo, uid) < 0) {
ALOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno)); ALOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno));
unlink(libsymlink); unlink(libsymlink);
unlink(pkgdir); unlink(pkgdir);

View File

@ -398,7 +398,7 @@ int initialize_directories() {
goto fail; goto fail;
} }
if (selinux_android_restorecon(android_media_dir.path)) { if (selinux_android_restorecon(android_media_dir.path, 0)) {
goto fail; goto fail;
} }