aboutsummaryrefslogtreecommitdiff
path: root/toys/pending
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-03-27 21:54:58 -0500
committerRob Landley <rob@landley.net>2015-03-27 21:54:58 -0500
commit3fd794f7416380417cc75d075a26559b80d3059a (patch)
treee0689b342302c458de7f0345510800a3bf8150fc /toys/pending
parente3a2ab391d8946f458d6f0b3a4332bf0c0e13161 (diff)
downloadtoybox-3fd794f7416380417cc75d075a26559b80d3059a.tar.gz
Promote getenforce.
Diffstat (limited to 'toys/pending')
-rw-r--r--toys/pending/getenforce.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/toys/pending/getenforce.c b/toys/pending/getenforce.c
deleted file mode 100644
index 71ae2032..00000000
--- a/toys/pending/getenforce.c
+++ /dev/null
@@ -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");
- }
-}