cut: code shrink
[busybox-git.git] / selinux / load_policy.c
blobeac6ba6c1984988f8a809d8330501e169ef6c046
1 /*
2 * load_policy
3 * Author: Yuichi Nakamura <ynakam@hitachisoft.jp>
5 * Licensed under GPLv2, see file LICENSE in this source tree.
6 */
7 //config:config LOAD_POLICY
8 //config: bool "load_policy (1.6 kb)"
9 //config: default n
10 //config: depends on SELINUX
11 //config: help
12 //config: Enable support to load SELinux policy.
14 //applet:IF_LOAD_POLICY(APPLET(load_policy, BB_DIR_USR_SBIN, BB_SUID_DROP))
16 //kbuild:lib-$(CONFIG_LOAD_POLICY) += load_policy.o
18 //usage:#define load_policy_trivial_usage NOUSAGE_STR
19 //usage:#define load_policy_full_usage ""
21 #include "libbb.h"
23 int load_policy_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
24 int load_policy_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
26 int rc;
28 if (argv[1]) {
29 bb_show_usage();
32 rc = selinux_mkload_policy(1);
33 if (rc < 0) {
34 bb_simple_perror_msg_and_die("can't load policy");
37 return 0;