Denis Vlasenko | 644849a | 2007-03-24 15:38:49 +0000 | [diff] [blame] | 1 | /* |
| 2 | * load_policy |
Denis Vlasenko | 644849a | 2007-03-24 15:38:49 +0000 | [diff] [blame] | 3 | * Author: Yuichi Nakamura <ynakam@hitachisoft.jp> |
Denis Vlasenko | db12d1d | 2008-12-07 00:52:58 +0000 | [diff] [blame] | 4 | * |
| 5 | * Licensed under GPLv2, see file LICENSE in this tarball for details. |
Denis Vlasenko | 644849a | 2007-03-24 15:38:49 +0000 | [diff] [blame] | 6 | */ |
Denis Vlasenko | b6adbf1 | 2007-05-26 19:00:18 +0000 | [diff] [blame] | 7 | #include "libbb.h" |
Denis Vlasenko | 644849a | 2007-03-24 15:38:49 +0000 | [diff] [blame] | 8 | |
Denis Vlasenko | 9b49a5e | 2007-10-11 10:05:36 +0000 | [diff] [blame] | 9 | int load_policy_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
Denis Vlasenko | a60f84e | 2008-07-05 09:18:54 +0000 | [diff] [blame] | 10 | int load_policy_main(int argc, char **argv UNUSED_PARAM) |
Denis Vlasenko | 644849a | 2007-03-24 15:38:49 +0000 | [diff] [blame] | 11 | { |
Denis Vlasenko | b042bd9 | 2007-09-26 18:01:32 +0000 | [diff] [blame] | 12 | int rc; |
| 13 | |
| 14 | if (argc != 1) { |
Denis Vlasenko | 644849a | 2007-03-24 15:38:49 +0000 | [diff] [blame] | 15 | bb_show_usage(); |
| 16 | } |
| 17 | |
Denis Vlasenko | b042bd9 | 2007-09-26 18:01:32 +0000 | [diff] [blame] | 18 | rc = selinux_mkload_policy(1); |
| 19 | if (rc < 0) { |
Denis Vlasenko | 644849a | 2007-03-24 15:38:49 +0000 | [diff] [blame] | 20 | bb_perror_msg_and_die("can't load policy"); |
| 21 | } |
| 22 | |
| 23 | return 0; |
| 24 | } |