ima.h 984 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright (C) 2008 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_IMA_H
  10. #define _LINUX_IMA_H
  11. #include <linux/fs.h>
  12. struct linux_binprm;
  13. #ifdef CONFIG_IMA
  14. extern int ima_bprm_check(struct linux_binprm *bprm);
  15. extern int ima_file_check(struct file *file, int mask);
  16. extern void ima_file_free(struct file *file);
  17. extern int ima_file_mmap(struct file *file, unsigned long prot);
  18. #else
  19. static inline int ima_bprm_check(struct linux_binprm *bprm)
  20. {
  21. return 0;
  22. }
  23. static inline int ima_file_check(struct file *file, int mask)
  24. {
  25. return 0;
  26. }
  27. static inline void ima_file_free(struct file *file)
  28. {
  29. return;
  30. }
  31. static inline int ima_file_mmap(struct file *file, unsigned long prot)
  32. {
  33. return 0;
  34. }
  35. #endif /* CONFIG_IMA_H */
  36. #endif /* _LINUX_IMA_H */