summaryrefslogtreecommitdiffstats
path: root/twrp.cpp
diff options
context:
space:
mode:
authorDees Troy <dees_troy@teamw.in>2013-11-26 22:39:14 +0100
committerDees Troy <dees_troy@teamw.in>2013-11-26 22:39:14 +0100
commit995e88cfbe90f451359c20cf8f54172a90749a5c (patch)
tree4cdbc42689093b54e5b61de70c660c0720d83e0e /twrp.cpp
parentUpdate partition sizes after sideload (diff)
downloadandroid_bootable_recovery-995e88cfbe90f451359c20cf8f54172a90749a5c.tar
android_bootable_recovery-995e88cfbe90f451359c20cf8f54172a90749a5c.tar.gz
android_bootable_recovery-995e88cfbe90f451359c20cf8f54172a90749a5c.tar.bz2
android_bootable_recovery-995e88cfbe90f451359c20cf8f54172a90749a5c.tar.lz
android_bootable_recovery-995e88cfbe90f451359c20cf8f54172a90749a5c.tar.xz
android_bootable_recovery-995e88cfbe90f451359c20cf8f54172a90749a5c.tar.zst
android_bootable_recovery-995e88cfbe90f451359c20cf8f54172a90749a5c.zip
Diffstat (limited to '')
-rw-r--r--twrp.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/twrp.cpp b/twrp.cpp
index 82704b51d..3a8dd8205 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -120,6 +120,18 @@ int main(int argc, char **argv) {
printf("No file contexts for SELinux\n");
else
printf("SELinux contexts loaded from /file_contexts\n");
+ { // Check to ensure SELinux can be supported by the kernel
+ char *contexts = NULL;
+ lgetfilecon("/sbin/teamwin", &contexts);
+ if (!contexts) {
+ gui_print("Kernel does not have support for reading SELinux contexts.\n");
+ } else {
+ free(contexts);
+ gui_print("Full SELinux support is present.\n");
+ }
+ }
+#else
+ gui_print("No SELinux support (no libselinux).\n");
#endif
PartitionManager.Mount_By_Path("/cache", true);