summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDees Troy <dees_troy@teamw.in>2014-02-03 15:58:32 +0100
committerDees Troy <dees_troy@teamw.in>2014-02-03 16:08:06 +0100
commita7b8de514de8ba8fb4e8366ecf52e52dae49acd3 (patch)
treef4f0370aac30ad6ff34c1862e450b9a0c8e221b1
parentFix make file flag name for minzip (diff)
downloadandroid_bootable_recovery-a7b8de514de8ba8fb4e8366ecf52e52dae49acd3.tar
android_bootable_recovery-a7b8de514de8ba8fb4e8366ecf52e52dae49acd3.tar.gz
android_bootable_recovery-a7b8de514de8ba8fb4e8366ecf52e52dae49acd3.tar.bz2
android_bootable_recovery-a7b8de514de8ba8fb4e8366ecf52e52dae49acd3.tar.lz
android_bootable_recovery-a7b8de514de8ba8fb4e8366ecf52e52dae49acd3.tar.xz
android_bootable_recovery-a7b8de514de8ba8fb4e8366ecf52e52dae49acd3.tar.zst
android_bootable_recovery-a7b8de514de8ba8fb4e8366ecf52e52dae49acd3.zip
Diffstat (limited to '')
-rw-r--r--fixPermissions.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/fixPermissions.cpp b/fixPermissions.cpp
index fa5ef5640..40ac516b0 100644
--- a/fixPermissions.cpp
+++ b/fixPermissions.cpp
@@ -45,8 +45,10 @@ using namespace rapidxml;
int fixPermissions::restorecon(string entry, struct stat *sb) {
char *oldcontext, *newcontext;
struct selabel_handle *sehandle;
-
- sehandle = selinux_android_file_context_handle();
+ struct selinux_opt selinux_options[] = {
+ { SELABEL_OPT_PATH, "/file_contexts" }
+ };
+ sehandle = selabel_open(SELABEL_CTX_FILE, selinux_options, 1);
if (lgetfilecon(entry.c_str(), &oldcontext) < 0) {
LOGINFO("Couldn't get selinux context for %s\n", entry.c_str());
return -1;