changeset 1762:e65b19c2baf6

Promote getenforce.
author Rob Landley <rob@landley.net>
date Fri, 27 Mar 2015 21:54:58 -0500
parents 563ec6dfc751
children 61166a30ae47
files toys/android/getenforce.c toys/pending/getenforce.c
diffstat 2 files changed, 29 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/toys/android/getenforce.c	Fri Mar 27 21:54:58 2015 -0500
@@ -0,0 +1,29 @@
+/* getenforce.c - Get the current SELinux mode
+ *
+ * Copyright 2014 The Android Open Source Project
+
+USE_GETENFORCE(NEWTOY(getenforce, "", TOYFLAG_USR|TOYFLAG_SBIN))
+
+config GETENFORCE
+  bool "getenforce"
+  default y
+  depends on TOYBOX_SELINUX
+  help
+    usage: getenforce
+
+    Shows whether SELinux is disabled, enforcing, or permissive.
+*/
+
+#define FOR_getenforce
+#include "toys.h"
+
+void getenforce_main(void)
+{
+  if (!is_selinux_enabled()) puts("Disabled");
+  else {
+    int ret = security_getenforce();
+
+    if (ret == -1) perror_exit("Couldn't get enforcing status");
+    else puts(ret ? "Enforcing" : "Permissive");
+  }
+}
--- a/toys/pending/getenforce.c	Fri Mar 27 21:52:24 2015 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/* getenforce.c - Get the current SELinux mode
- *
- * Copyright 2014 The Android Open Source Project
-
-USE_GETENFORCE(NEWTOY(getenforce, "", TOYFLAG_USR|TOYFLAG_SBIN))
-
-config GETENFORCE
-  bool "getenforce"
-  default n
-  depends on TOYBOX_SELINUX
-  help
-    usage: getenforce
-
-    Shows whether SELinux is disabled, enforcing, or permissive.
-*/
-
-#define FOR_getenforce
-#include "toys.h"
-
-void getenforce_main(void)
-{
-  if (!is_selinux_enabled()) puts("Disabled");
-  else {
-    int ret = security_getenforce();
-
-    if (ret == -1) perror_exit("Couldn't get enforcing status");
-    else puts(ret ? "Enforcing" : "Permissive");
-  }
-}