diff options
Diffstat (limited to 'contrib/android/perms.c')
-rw-r--r-- | contrib/android/perms.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/android/perms.c b/contrib/android/perms.c index 9a7a93f5..9ae8e586 100644 --- a/contrib/android/perms.c +++ b/contrib/android/perms.c @@ -297,6 +297,7 @@ errcode_t android_configure_fs(ext2_filsys fs, char *src_dir, char *target_out, struct selabel_handle *sehnd = NULL; /* Retrieve file contexts */ +#if !defined(__ANDROID__) if (nopt > 0) { sehnd = selabel_open(SELABEL_CTX_FILE, seopts, nopt); if (!sehnd) { @@ -306,6 +307,14 @@ errcode_t android_configure_fs(ext2_filsys fs, char *src_dir, char *target_out, return -EINVAL; } } +#else + sehnd = selinux_android_file_context_handle(); + if (!sehnd) { + com_err(__func__, -EINVAL, + _("while opening android file_contexts")); + return -EINVAL; + } +#endif /* Load the FS config */ if (fs_config_file) { |