[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit

Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/app/busybox/src/selinux/setsebool.c b/ap/app/busybox/src/selinux/setsebool.c
new file mode 100644
index 0000000..ec682e5
--- /dev/null
+++ b/ap/app/busybox/src/selinux/setsebool.c
@@ -0,0 +1,41 @@
+/*
+ * setsebool
+ * Simple setsebool
+ * NOTE: -P option requires libsemanage, so this feature is
+ * omitted in this version
+ * Yuichi Nakamura <ynakam@hitachisoft.jp>
+ *
+ * Licensed under GPLv2, see file LICENSE in this source tree.
+ */
+
+//usage:#define setsebool_trivial_usage
+//usage:       "boolean value"
+//usage:#define setsebool_full_usage "\n\n"
+//usage:       "Change boolean setting"
+
+#include "libbb.h"
+
+int setsebool_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int setsebool_main(int argc, char **argv)
+{
+	char *p;
+	int value;
+
+	if (argc != 3)
+		bb_show_usage();
+
+	p = argv[2];
+
+	if (LONE_CHAR(p, '1') || strcasecmp(p, "true") == 0 || strcasecmp(p, "on") == 0) {
+		value = 1;
+	} else if (LONE_CHAR(p, '0') || strcasecmp(p, "false") == 0 || strcasecmp(p, "off") == 0) {
+		value = 0;
+	} else {
+		bb_show_usage();
+	}
+
+	if (security_set_boolean(argv[1], value) < 0)
+		bb_error_msg_and_die("can't set boolean");
+
+	return 0;
+}