diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-06-21 07:37:19 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-06-21 07:37:19 +0000 |
commit | 26bdc3ffa0adcc8e47a8f27f283880fb2c875354 (patch) | |
tree | 39bd1712eca2a32c84f373f843456f97b0c9c0c7 | |
parent | 504fd8c816b5c60e63cd80eb5ac091c152ca3e3c (diff) | |
parent | e6cf324a0a2357de9aae14ebccda21c7312683ea (diff) | |
download | e2fsprogs-26bdc3ffa0adcc8e47a8f27f283880fb2c875354.tar.gz |
release-request-d1418208-3b0b-4ef9-a2f0-a8f8ac6c24e8-for-git_oc-mr1-release-4120176 snap-temp-L55000000076156472
Change-Id: I2d2ce869905eb7cbfb17f8e5a4202d3604d331a3
-rw-r--r-- | contrib/android/perms.c | 9 | ||||
-rw-r--r-- | contrib/android/perms.h | 2 | ||||
-rw-r--r-- | misc/Android.bp | 3 |
3 files changed, 13 insertions, 1 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) { diff --git a/contrib/android/perms.h b/contrib/android/perms.h index 9955bb56..c404cb90 100644 --- a/contrib/android/perms.h +++ b/contrib/android/perms.h @@ -25,7 +25,7 @@ static inline errcode_t android_configure_fs(ext2_filsys fs, # else # include <selinux/selinux.h> # include <selinux/label.h> -# if !defined(HOST) +# if defined(__ANDROID__) # include <selinux/android.h> # endif # include <private/android_filesystem_config.h> diff --git a/misc/Android.bp b/misc/Android.bp index ad419e22..5183981f 100644 --- a/misc/Android.bp +++ b/misc/Android.bp @@ -31,6 +31,9 @@ cc_binary { "mk_hugefiles.c", "default_profile.c", ], + required: [ + "mke2fs.conf", + ], cflags: ["-W", "-Wall", "-Wno-macro-redefined"], shared_libs: [ "libext2fs", |