summaryrefslogtreecommitdiff
path: root/selinux/selinuxenabled.c (plain)
blob: b80c4e71b39f6fcc15b28f4b615c8dd4c59b1244
1/*
2 * selinuxenabled
3 *
4 * Based on libselinux 1.33.1
5 * Port to BusyBox Hiroshi Shinji <shiroshi@my.email.ne.jp>
6 *
7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */
9//config:config SELINUXENABLED
10//config: bool "selinuxenabled"
11//config: default n
12//config: depends on SELINUX
13//config: help
14//config: Enable support for this command to be used within shell scripts
15//config: to determine if selinux is enabled.
16
17//applet:IF_SELINUXENABLED(APPLET(selinuxenabled, BB_DIR_USR_SBIN, BB_SUID_DROP))
18
19//kbuild:lib-$(CONFIG_SELINUXENABLED) += selinuxenabled.o
20
21//usage:#define selinuxenabled_trivial_usage NOUSAGE_STR
22//usage:#define selinuxenabled_full_usage ""
23
24#include "libbb.h"
25
26int selinuxenabled_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
27int selinuxenabled_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
28{
29 return !is_selinux_enabled();
30}
31