4 * Copyright (c) 2009 IBM Corporation
5 * Author: Mimi Zohar <zohar@us.ibm.com>
11 #include <linux/integrity.h>
12 #include <linux/xattr.h>
14 struct integrity_iint_cache
;
17 extern int evm_set_key(void *key
, size_t keylen
);
18 extern enum integrity_status
evm_verifyxattr(struct dentry
*dentry
,
19 const char *xattr_name
,
21 size_t xattr_value_len
,
22 struct integrity_iint_cache
*iint
);
23 extern int evm_inode_setattr(struct dentry
*dentry
, struct iattr
*attr
);
24 extern void evm_inode_post_setattr(struct dentry
*dentry
, int ia_valid
);
25 extern int evm_inode_setxattr(struct dentry
*dentry
, const char *name
,
26 const void *value
, size_t size
);
27 extern void evm_inode_post_setxattr(struct dentry
*dentry
,
28 const char *xattr_name
,
29 const void *xattr_value
,
30 size_t xattr_value_len
);
31 extern int evm_inode_removexattr(struct dentry
*dentry
, const char *xattr_name
);
32 extern void evm_inode_post_removexattr(struct dentry
*dentry
,
33 const char *xattr_name
);
34 extern int evm_inode_init_security(struct inode
*inode
,
35 const struct xattr
*xattr_array
,
37 #ifdef CONFIG_FS_POSIX_ACL
38 extern int posix_xattr_acl(const char *xattrname
);
40 static inline int posix_xattr_acl(const char *xattrname
)
47 static inline int evm_set_key(void *key
, size_t keylen
)
52 #ifdef CONFIG_INTEGRITY
53 static inline enum integrity_status
evm_verifyxattr(struct dentry
*dentry
,
54 const char *xattr_name
,
56 size_t xattr_value_len
,
57 struct integrity_iint_cache
*iint
)
59 return INTEGRITY_UNKNOWN
;
63 static inline int evm_inode_setattr(struct dentry
*dentry
, struct iattr
*attr
)
68 static inline void evm_inode_post_setattr(struct dentry
*dentry
, int ia_valid
)
73 static inline int evm_inode_setxattr(struct dentry
*dentry
, const char *name
,
74 const void *value
, size_t size
)
79 static inline void evm_inode_post_setxattr(struct dentry
*dentry
,
80 const char *xattr_name
,
81 const void *xattr_value
,
82 size_t xattr_value_len
)
87 static inline int evm_inode_removexattr(struct dentry
*dentry
,
88 const char *xattr_name
)
93 static inline void evm_inode_post_removexattr(struct dentry
*dentry
,
94 const char *xattr_name
)
99 static inline int evm_inode_init_security(struct inode
*inode
,
100 const struct xattr
*xattr_array
,
106 #endif /* CONFIG_EVM */
107 #endif /* LINUX_EVM_H */