module.h revision 255e72915d4cbddceb435e13d81601755714e9f3
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
33struct sepol_module_package {
34	sepol_policydb_t *policy;
35	uint32_t version;
36	char *file_contexts;
37	size_t file_contexts_len;
38	char *seusers;
39	size_t seusers_len;
40	char *user_extra;
41	size_t user_extra_len;
42	char *netfilter_contexts;
43	size_t netfilter_contexts_len;
44};
45
46extern int sepol_module_package_init(sepol_module_package_t * p);
47
48#endif
49