diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-07-09 07:36:08 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-07-09 07:36:08 +0000 |
commit | f687d5c2a49703298b8432aae67777d95e08801d (patch) | |
tree | 39bd1712eca2a32c84f373f843456f97b0c9c0c7 | |
parent | a5e5e5ff02c7f4c7019ca25dd0ecab6d2e5b3fce (diff) | |
parent | 2fff6fb036cbbb6dedd7da3d208b312a9038a5ce (diff) | |
download | e2fsprogs-f687d5c2a49703298b8432aae67777d95e08801d.tar.gz |
release-request-bf3460d4-15ec-4b2b-816a-b106ef372c4b-for-git_oc-dr1-release-4164433 snap-temp-L62100000080728136
Change-Id: I449b2fa76163ca2fa1fbae05fb659951284d98bf
-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", |