0001
0002
0003
0004
0005
0006
0007 #ifndef _LINUX_INTEGRITY_H
0008 #define _LINUX_INTEGRITY_H
0009
0010 #include <linux/fs.h>
0011
0012 enum integrity_status {
0013 INTEGRITY_PASS = 0,
0014 INTEGRITY_PASS_IMMUTABLE,
0015 INTEGRITY_FAIL,
0016 INTEGRITY_FAIL_IMMUTABLE,
0017 INTEGRITY_NOLABEL,
0018 INTEGRITY_NOXATTRS,
0019 INTEGRITY_UNKNOWN,
0020 };
0021
0022
0023 #ifdef CONFIG_INTEGRITY
0024 extern struct integrity_iint_cache *integrity_inode_get(struct inode *inode);
0025 extern void integrity_inode_free(struct inode *inode);
0026 extern void __init integrity_load_keys(void);
0027
0028 #else
0029 static inline struct integrity_iint_cache *
0030 integrity_inode_get(struct inode *inode)
0031 {
0032 return NULL;
0033 }
0034
0035 static inline void integrity_inode_free(struct inode *inode)
0036 {
0037 return;
0038 }
0039
0040 static inline void integrity_load_keys(void)
0041 {
0042 }
0043 #endif
0044
0045 #ifdef CONFIG_INTEGRITY_ASYMMETRIC_KEYS
0046
0047 extern int integrity_kernel_module_request(char *kmod_name);
0048
0049 #else
0050
0051 static inline int integrity_kernel_module_request(char *kmod_name)
0052 {
0053 return 0;
0054 }
0055
0056 #endif
0057
0058 #endif