1 #include "perm.h" 2 permissive_usage()3void permissive_usage() { 4 fprintf(stderr, "\tpermissive\n"); 5 } 6 list_permissive(policydb_t * policydb)7static int list_permissive(policydb_t * policydb) 8 { 9 struct ebitmap_node *n; 10 unsigned int bit; 11 12 /* 13 * iterate over all domains and check if domain is in permissive 14 */ 15 ebitmap_for_each_bit(&policydb->permissive_map, n, bit) 16 { 17 if (ebitmap_node_get_bit(n, bit)) { 18 printf("%s\n", policydb->p_type_val_to_name[bit -1]); 19 } 20 } 21 return 0; 22 } 23 permissive_func(int argc,char ** argv,policydb_t * policydb)24int permissive_func (int argc, __attribute__ ((unused)) char **argv, policydb_t *policydb) { 25 if (argc != 1) { 26 USAGE_ERROR = true; 27 return -1; 28 } 29 return list_permissive(policydb); 30 } 31