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 #include <sys/cdefs.h>
31 
32 #define SEPOL_MODULE_PACKAGE_MAGIC 0xf97cff8f
33 
34 __BEGIN_DECLS
35 
36 struct sepol_module_package {
37 	sepol_policydb_t *policy;
38 	uint32_t version;
39 	char *file_contexts;
40 	size_t file_contexts_len;
41 	char *seusers;
42 	size_t seusers_len;
43 	char *user_extra;
44 	size_t user_extra_len;
45 	char *netfilter_contexts;
46 	size_t netfilter_contexts_len;
47 };
48 
49 extern int sepol_module_package_init(sepol_module_package_t * p);
50 
51 __END_DECLS
52 #endif
53