blob: d0d2c7a389643c39ed86812cc8d8a957a178a29d [file] [log] [blame]
Joshua Brindle13cd4c82008-08-19 15:30:36 -04001/* 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
Stephen Smalleycf8625b2016-11-29 10:57:48 -050033#ifdef __cplusplus
34extern "C" {
35#endif
dcashmaned7a6ba2014-12-16 11:44:41 -080036
Joshua Brindle13cd4c82008-08-19 15:30:36 -040037struct 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
50extern int sepol_module_package_init(sepol_module_package_t * p);
51
Stephen Smalleycf8625b2016-11-29 10:57:48 -050052#ifdef __cplusplus
53}
54#endif
55
Joshua Brindle13cd4c82008-08-19 15:30:36 -040056#endif