diff options
author | Nick Kralevich <nnk@google.com> | 2014-02-12 23:09:44 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-02-12 23:09:45 +0000 |
commit | 2044ac43e53b517526b3c70dc4fbc60ffc01693f (patch) | |
tree | 5a259e9a1bd973a55b3299179903594fe2a9670a | |
parent | 6c14f0ad82be418c742e56fe586657ea0f394b05 (diff) | |
parent | 26288202e7bdf2e897a11bf31a15685d7c20945f (diff) | |
download | frameworks_native-2044ac43e53b517526b3c70dc4fbc60ffc01693f.zip frameworks_native-2044ac43e53b517526b3c70dc4fbc60ffc01693f.tar.gz frameworks_native-2044ac43e53b517526b3c70dc4fbc60ffc01693f.tar.bz2 |
Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API."
-rw-r--r-- | cmds/dumpstate/utils.c | 2 | ||||
-rw-r--r-- | cmds/installd/commands.c | 4 | ||||
-rw-r--r-- | cmds/installd/installd.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/cmds/dumpstate/utils.c b/cmds/dumpstate/utils.c index fe716ac..670e09c 100644 --- a/cmds/dumpstate/utils.c +++ b/cmds/dumpstate/utils.c @@ -469,7 +469,7 @@ const char *dump_traces() { if (!mkdir(anr_traces_dir, 0775)) { chown(anr_traces_dir, AID_SYSTEM, AID_SYSTEM); 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)); } } else if (errno != EEXIST) { diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c index e4f63e2..ef063e7 100644 --- a/cmds/installd/commands.c +++ b/cmds/installd/commands.c @@ -91,7 +91,7 @@ int install(const char *pkgname, uid_t uid, gid_t gid, const char *seinfo) 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)); unlink(libsymlink); unlink(pkgdir); @@ -245,7 +245,7 @@ int make_user_data(const char *pkgname, uid_t uid, userid_t userid, const char* 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)); unlink(libsymlink); unlink(pkgdir); diff --git a/cmds/installd/installd.c b/cmds/installd/installd.c index 9c66f2d..549aaab 100644 --- a/cmds/installd/installd.c +++ b/cmds/installd/installd.c @@ -398,7 +398,7 @@ int initialize_directories() { goto fail; } - if (selinux_android_restorecon(android_media_dir.path)) { + if (selinux_android_restorecon(android_media_dir.path, 0)) { goto fail; } |