policy_unpack.h 976 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * AppArmor security module
  3. *
  4. * This file contains AppArmor policy loading interface function definitions.
  5. *
  6. * Copyright (C) 1998-2008 Novell/SUSE
  7. * Copyright 2009-2010 Canonical Ltd.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation, version 2 of the
  12. * License.
  13. */
  14. #ifndef __POLICY_INTERFACE_H
  15. #define __POLICY_INTERFACE_H
  16. #include <linux/list.h>
  17. struct aa_load_ent {
  18. struct list_head list;
  19. struct aa_profile *new;
  20. struct aa_profile *old;
  21. struct aa_profile *rename;
  22. };
  23. void aa_load_ent_free(struct aa_load_ent *ent);
  24. struct aa_load_ent *aa_load_ent_alloc(void);
  25. #define PACKED_FLAG_HAT 1
  26. #define PACKED_MODE_ENFORCE 0
  27. #define PACKED_MODE_COMPLAIN 1
  28. #define PACKED_MODE_KILL 2
  29. #define PACKED_MODE_UNCONFINED 3
  30. int aa_unpack(void *udata, size_t size, struct list_head *lh, const char **ns);
  31. #endif /* __POLICY_INTERFACE_H */