integrity.h 898 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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 int integrity_inode_alloc(struct inode *inode);
  22. extern void integrity_inode_free(struct inode *inode);
  23. #else
  24. static inline int integrity_inode_alloc(struct inode *inode)
  25. {
  26. return 0;
  27. }
  28. static inline void integrity_inode_free(struct inode *inode)
  29. {
  30. return;
  31. }
  32. #endif /* CONFIG_INTEGRITY_H */
  33. #endif /* _LINUX_INTEGRITY_H */