1 /* Authors: Jason Tang <jtang@tresys.com> 2 * 3 * Copyright (C) 2005 Tresys Technology, LLC 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2.1 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 */ 19 20 #ifndef _SEPOL_AVRULE_BLOCK_H_ 21 #define _SEPOL_AVRULE_BLOCK_H_ 22 23 #include <sepol/policydb/policydb.h> 24 25 #ifdef __cplusplus 26 extern "C" { 27 #endif 28 29 extern avrule_block_t *avrule_block_create(void); 30 extern void avrule_block_destroy(avrule_block_t * x); 31 extern avrule_decl_t *avrule_decl_create(uint32_t decl_id); 32 extern void avrule_decl_destroy(avrule_decl_t * x); 33 extern void avrule_block_list_destroy(avrule_block_t * x); 34 extern avrule_decl_t *get_avrule_decl(policydb_t * p, uint32_t decl_id); 35 extern cond_list_t *get_decl_cond_list(policydb_t * p, 36 avrule_decl_t * decl, 37 cond_list_t * cond); 38 extern int is_id_enabled(char *id, policydb_t * p, int symbol_table); 39 extern int is_perm_enabled(char *class_id, char *perm_id, policydb_t * p); 40 41 #ifdef __cplusplus 42 } 43 #endif 44 45 #endif 46