module.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. #ifndef _SEPOL_POLICYDB_MODULE_H_
  20. #define _SEPOL_POLICYDB_MODULE_H_
  21. #include <stdlib.h>
  22. #include <stddef.h>
  23. #include <sepol/module.h>
  24. #include <sepol/policydb/policydb.h>
  25. #include <sepol/policydb/conditional.h>
  26. #define SEPOL_MODULE_PACKAGE_MAGIC 0xf97cff8f
  27. struct sepol_module_package {
  28. sepol_policydb_t *policy;
  29. uint32_t version;
  30. char *file_contexts;
  31. size_t file_contexts_len;
  32. char *seusers;
  33. size_t seusers_len;
  34. char *user_extra;
  35. size_t user_extra_len;
  36. char *netfilter_contexts;
  37. size_t netfilter_contexts_len;
  38. };
  39. extern int sepol_module_package_init(sepol_module_package_t * p);
  40. #endif