16cd6a6acSopenharmony_ci/* Authors: Jason Tang <jtang@tresys.com> 26cd6a6acSopenharmony_ci * 36cd6a6acSopenharmony_ci * Copyright (C) 2005 Tresys Technology, LLC 46cd6a6acSopenharmony_ci * 56cd6a6acSopenharmony_ci * This library is free software; you can redistribute it and/or 66cd6a6acSopenharmony_ci * modify it under the terms of the GNU Lesser General Public 76cd6a6acSopenharmony_ci * License as published by the Free Software Foundation; either 86cd6a6acSopenharmony_ci * version 2.1 of the License, or (at your option) any later version. 96cd6a6acSopenharmony_ci * 106cd6a6acSopenharmony_ci * This library is distributed in the hope that it will be useful, 116cd6a6acSopenharmony_ci * but WITHOUT ANY WARRANTY; without even the implied warranty of 126cd6a6acSopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 136cd6a6acSopenharmony_ci * Lesser General Public License for more details. 146cd6a6acSopenharmony_ci * 156cd6a6acSopenharmony_ci * You should have received a copy of the GNU Lesser General Public 166cd6a6acSopenharmony_ci * License along with this library; if not, write to the Free Software 176cd6a6acSopenharmony_ci * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 186cd6a6acSopenharmony_ci */ 196cd6a6acSopenharmony_ci 206cd6a6acSopenharmony_ci#ifndef _SEPOL_AVRULE_BLOCK_H_ 216cd6a6acSopenharmony_ci#define _SEPOL_AVRULE_BLOCK_H_ 226cd6a6acSopenharmony_ci 236cd6a6acSopenharmony_ci#include <sepol/policydb/policydb.h> 246cd6a6acSopenharmony_ci 256cd6a6acSopenharmony_ci#ifdef __cplusplus 266cd6a6acSopenharmony_ciextern "C" { 276cd6a6acSopenharmony_ci#endif 286cd6a6acSopenharmony_ci 296cd6a6acSopenharmony_ciextern avrule_block_t *avrule_block_create(void); 306cd6a6acSopenharmony_ciextern void avrule_block_destroy(avrule_block_t * x); 316cd6a6acSopenharmony_ciextern avrule_decl_t *avrule_decl_create(uint32_t decl_id); 326cd6a6acSopenharmony_ciextern void avrule_decl_destroy(avrule_decl_t * x); 336cd6a6acSopenharmony_ciextern void avrule_block_list_destroy(avrule_block_t * x); 346cd6a6acSopenharmony_ciextern avrule_decl_t *get_avrule_decl(policydb_t * p, uint32_t decl_id); 356cd6a6acSopenharmony_ciextern cond_list_t *get_decl_cond_list(policydb_t * p, 366cd6a6acSopenharmony_ci avrule_decl_t * decl, 376cd6a6acSopenharmony_ci cond_list_t * cond); 386cd6a6acSopenharmony_ciextern int is_id_enabled(char *id, policydb_t * p, int symbol_table); 396cd6a6acSopenharmony_ciextern int is_perm_enabled(char *class_id, char *perm_id, policydb_t * p); 406cd6a6acSopenharmony_ci 416cd6a6acSopenharmony_ci#ifdef __cplusplus 426cd6a6acSopenharmony_ci} 436cd6a6acSopenharmony_ci#endif 446cd6a6acSopenharmony_ci 456cd6a6acSopenharmony_ci#endif 46