aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Bellavance <flintman@flintmancomputers.com>2016-08-30 09:28:06 -0400
committerMichael Bestas <mkbestas@lineageos.org>2019-12-11 19:13:17 +0200
commita859b14b35039f4ada4258d69ebac7cc7f7dccd0 (patch)
treec3aa21e2a661b31322883e40078b150779e8b945
parent29e846847ff89c39c7cb864b28b1ec6d16ac3ecf (diff)
downloadandroid_external_selinux-a859b14b35039f4ada4258d69ebac7cc7f7dccd0.tar.gz
android_external_selinux-a859b14b35039f4ada4258d69ebac7cc7f7dccd0.tar.bz2
android_external_selinux-a859b14b35039f4ada4258d69ebac7cc7f7dccd0.zip
selinux: add selinux_status_getenforce to headerstaging/lineage-17.0_merge-android-10.0.0_r9
Change-Id: I2d6c366b7498d9760cb0bc21bade9b66b20815e9
-rw-r--r--libselinux/Android.bp2
-rw-r--r--libselinux/exported.map1
-rw-r--r--libselinux/include/selinux/selinux.h2
3 files changed, 4 insertions, 1 deletions
diff --git a/libselinux/Android.bp b/libselinux/Android.bp
index 6833cba8..268fc742 100644
--- a/libselinux/Android.bp
+++ b/libselinux/Android.bp
@@ -29,6 +29,7 @@ cc_defaults {
"src/label.c",
"src/label_support.c",
"src/matchpathcon.c",
+ "src/sestatus.c",
"src/setrans_client.c",
"src/sha1.c",
],
@@ -70,7 +71,6 @@ cc_defaults {
"src/policyvers.c",
"src/procattr.c",
"src/reject_unknown.c",
- "src/sestatus.c",
"src/setenforce.c",
"src/setfilecon.c",
"src/stringrep.c",
diff --git a/libselinux/exported.map b/libselinux/exported.map
index dd742948..0cf9d96e 100644
--- a/libselinux/exported.map
+++ b/libselinux/exported.map
@@ -37,6 +37,7 @@
selinux_check_access;
selinux_log_callback;
selinux_set_callback;
+ selinux_status_getenforce;
selinux_status_open;
selinux_status_updated;
selinux_vendor_log_callback;
diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h
index a34d54fc..54b63967 100644
--- a/libselinux/include/selinux/selinux.h
+++ b/libselinux/include/selinux/selinux.h
@@ -10,6 +10,8 @@ extern "C" {
/* Return 1 if we are running on a SELinux kernel, or 0 if not or -1 if we get an error. */
extern int is_selinux_enabled(void);
+/* Return 1 if we are running on a enforced, or 0 if not or -1 if we get an error. */
+extern int selinux_status_getenforce(void);
/* Return 1 if we are running on a SELinux MLS kernel, or 0 otherwise. */
extern int is_selinux_mls_enabled(void);