1 /* Author: Karl MacMillan <kmacmillan@tresys.com> 2 * 3 * Copyright (C) 2004-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_POLICYDB_MODULE_H_ 21 #define _SEPOL_POLICYDB_MODULE_H_ 22 23 #include <stdlib.h> 24 #include <stddef.h> 25 26 #include <sepol/module.h> 27 28 #include <sepol/policydb/policydb.h> 29 #include <sepol/policydb/conditional.h> 30 31 #define SEPOL_MODULE_PACKAGE_MAGIC 0xf97cff8f 32 33 #ifdef __cplusplus 34 extern "C" { 35 #endif 36 37 struct sepol_module_package { 38 sepol_policydb_t *policy; 39 uint32_t version; 40 char *file_contexts; 41 size_t file_contexts_len; 42 char *seusers; 43 size_t seusers_len; 44 char *user_extra; 45 size_t user_extra_len; 46 char *netfilter_contexts; 47 size_t netfilter_contexts_len; 48 }; 49 50 extern int sepol_module_package_init(sepol_module_package_t * p); 51 52 #ifdef __cplusplus 53 } 54 #endif 55 56 #endif 57