From 4aca87515a5083ae0e31ce3177189fd43b6d05ac Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 3 Jan 2015 13:58:15 +0100 Subject: patch to Vanilla Tomato 1.28 --- release/src/router/busybox/selinux/load_policy.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 release/src/router/busybox/selinux/load_policy.c (limited to 'release/src/router/busybox/selinux/load_policy.c') diff --git a/release/src/router/busybox/selinux/load_policy.c b/release/src/router/busybox/selinux/load_policy.c new file mode 100644 index 00000000..4bc873e8 --- /dev/null +++ b/release/src/router/busybox/selinux/load_policy.c @@ -0,0 +1,24 @@ +/* + * load_policy + * Author: Yuichi Nakamura + * + * Licensed under GPLv2, see file LICENSE in this tarball for details. + */ +#include "libbb.h" + +int load_policy_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; +int load_policy_main(int argc, char **argv UNUSED_PARAM) +{ + int rc; + + if (argc != 1) { + bb_show_usage(); + } + + rc = selinux_mkload_policy(1); + if (rc < 0) { + bb_perror_msg_and_die("can't load policy"); + } + + return 0; +} -- cgit v1.2.3-54-g00ecf