• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include <sys/cdefs.h>
25 
26 __BEGIN_DECLS
27 
28 extern avrule_block_t *avrule_block_create(void);
29 extern void avrule_block_destroy(avrule_block_t * x);
30 extern avrule_decl_t *avrule_decl_create(uint32_t decl_id);
31 extern void avrule_decl_destroy(avrule_decl_t * x);
32 extern void avrule_block_list_destroy(avrule_block_t * x);
33 extern avrule_decl_t *get_avrule_decl(policydb_t * p, uint32_t decl_id);
34 extern cond_list_t *get_decl_cond_list(policydb_t * p,
35 				       avrule_decl_t * decl,
36 				       cond_list_t * cond);
37 extern int is_id_enabled(char *id, policydb_t * p, int symbol_table);
38 extern int is_perm_enabled(char *class_id, char *perm_id, policydb_t * p);
39 
40 __END_DECLS
41 #endif
42