integrity.h 877 B

1234567891011121314151617181920212223242526272829303132333435363738
  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_UNKNOWN,
  17. };
  18. /* List of EVM protected security xattrs */
  19. #ifdef CONFIG_INTEGRITY
  20. extern int integrity_inode_alloc(struct inode *inode);
  21. extern void integrity_inode_free(struct inode *inode);
  22. #else
  23. static inline int integrity_inode_alloc(struct inode *inode)
  24. {
  25. return 0;
  26. }
  27. static inline void integrity_inode_free(struct inode *inode)
  28. {
  29. return;
  30. }
  31. #endif /* CONFIG_INTEGRITY_H */
  32. #endif /* _LINUX_INTEGRITY_H */