16cd6a6acSopenharmony_ci/* Author: Karl MacMillan <kmacmillan@tresys.com>
26cd6a6acSopenharmony_ci *
36cd6a6acSopenharmony_ci * Copyright (C) 2004-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_POLICYDB_MODULE_H_
216cd6a6acSopenharmony_ci#define _SEPOL_POLICYDB_MODULE_H_
226cd6a6acSopenharmony_ci
236cd6a6acSopenharmony_ci#include <stdlib.h>
246cd6a6acSopenharmony_ci#include <stddef.h>
256cd6a6acSopenharmony_ci
266cd6a6acSopenharmony_ci#include <sepol/module.h>
276cd6a6acSopenharmony_ci
286cd6a6acSopenharmony_ci#include <sepol/policydb/policydb.h>
296cd6a6acSopenharmony_ci#include <sepol/policydb/conditional.h>
306cd6a6acSopenharmony_ci
316cd6a6acSopenharmony_ci#define SEPOL_MODULE_PACKAGE_MAGIC 0xf97cff8f
326cd6a6acSopenharmony_ci
336cd6a6acSopenharmony_ci#ifdef __cplusplus
346cd6a6acSopenharmony_ciextern "C" {
356cd6a6acSopenharmony_ci#endif
366cd6a6acSopenharmony_ci
376cd6a6acSopenharmony_cistruct sepol_module_package {
386cd6a6acSopenharmony_ci	sepol_policydb_t *policy;
396cd6a6acSopenharmony_ci	uint32_t version;
406cd6a6acSopenharmony_ci	char *file_contexts;
416cd6a6acSopenharmony_ci	size_t file_contexts_len;
426cd6a6acSopenharmony_ci	char *seusers;
436cd6a6acSopenharmony_ci	size_t seusers_len;
446cd6a6acSopenharmony_ci	char *user_extra;
456cd6a6acSopenharmony_ci	size_t user_extra_len;
466cd6a6acSopenharmony_ci	char *netfilter_contexts;
476cd6a6acSopenharmony_ci	size_t netfilter_contexts_len;
486cd6a6acSopenharmony_ci};
496cd6a6acSopenharmony_ci
506cd6a6acSopenharmony_ciextern int sepol_module_package_init(sepol_module_package_t * p);
516cd6a6acSopenharmony_ci
526cd6a6acSopenharmony_ci#ifdef __cplusplus
536cd6a6acSopenharmony_ci}
546cd6a6acSopenharmony_ci#endif
556cd6a6acSopenharmony_ci
566cd6a6acSopenharmony_ci#endif
57