integrity.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (C) 2009 IBM Corporation
  3. * Author: Mimi Zohar <zohar@us.ibm.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, version 2 of the License.
  8. */
  9. #ifndef _LINUX_INTEGRITY_H
  10. #define _LINUX_INTEGRITY_H
  11. #include <linux/fs.h>
  12. enum integrity_status {
  13. INTEGRITY_PASS = 0,
  14. INTEGRITY_FAIL,
  15. INTEGRITY_NOLABEL,
  16. INTEGRITY_NOXATTRS,
  17. INTEGRITY_UNKNOWN,
  18. };
  19. /* List of EVM protected security xattrs */
  20. #ifdef CONFIG_INTEGRITY
  21. extern struct integrity_iint_cache *integrity_inode_get(struct inode *inode);
  22. extern void integrity_inode_free(struct inode *inode);
  23. extern void __init integrity_load_keys(void);
  24. #else
  25. static inline struct integrity_iint_cache *
  26. integrity_inode_get(struct inode *inode)
  27. {
  28. return NULL;
  29. }
  30. static inline void integrity_inode_free(struct inode *inode)
  31. {
  32. return;
  33. }
  34. static inline void integrity_load_keys(void)
  35. {
  36. }
  37. #endif /* CONFIG_INTEGRITY */
  38. #endif /* _LINUX_INTEGRITY_H */