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 enum integrity_status
evm_verifyxattr(struct dentry
*dentry
,
18 const char *xattr_name
,
20 size_t xattr_value_len
,
21 struct integrity_iint_cache
*iint
);
22 extern int evm_inode_setattr(struct dentry
*dentry
, struct iattr
*attr
);
23 extern void evm_inode_post_setattr(struct dentry
*dentry
, int ia_valid
);
24 extern int evm_inode_setxattr(struct dentry
*dentry
, const char *name
,
25 const void *value
, size_t size
);
26 extern void evm_inode_post_setxattr(struct dentry
*dentry
,
27 const char *xattr_name
,
28 const void *xattr_value
,
29 size_t xattr_value_len
);
30 extern int evm_inode_removexattr(struct dentry
*dentry
, const char *xattr_name
);
31 extern void evm_inode_post_removexattr(struct dentry
*dentry
,
32 const char *xattr_name
);
33 extern int evm_inode_init_security(struct inode
*inode
,
34 const struct xattr
*xattr_array
,
36 #ifdef CONFIG_FS_POSIX_ACL
37 extern int posix_xattr_acl(const char *xattrname
);
39 static inline int posix_xattr_acl(const char *xattrname
)
45 #ifdef CONFIG_INTEGRITY
46 static inline enum integrity_status
evm_verifyxattr(struct dentry
*dentry
,
47 const char *xattr_name
,
49 size_t xattr_value_len
,
50 struct integrity_iint_cache
*iint
)
52 return INTEGRITY_UNKNOWN
;
56 static inline int evm_inode_setattr(struct dentry
*dentry
, struct iattr
*attr
)
61 static inline void evm_inode_post_setattr(struct dentry
*dentry
, int ia_valid
)
66 static inline int evm_inode_setxattr(struct dentry
*dentry
, const char *name
,
67 const void *value
, size_t size
)
72 static inline void evm_inode_post_setxattr(struct dentry
*dentry
,
73 const char *xattr_name
,
74 const void *xattr_value
,
75 size_t xattr_value_len
)
80 static inline int evm_inode_removexattr(struct dentry
*dentry
,
81 const char *xattr_name
)
86 static inline void evm_inode_post_removexattr(struct dentry
*dentry
,
87 const char *xattr_name
)
92 static inline int evm_inode_init_security(struct inode
*inode
,
93 const struct xattr
*xattr_array
,
99 #endif /* CONFIG_EVM_H */
100 #endif /* LINUX_EVM_H */