Blame view
include/linux/evm.h
2.48 KB
3e1be52d6
|
1 2 3 4 5 6 7 8 9 10 11 |
/* * evm.h * * Copyright (c) 2009 IBM Corporation * Author: Mimi Zohar <zohar@us.ibm.com> */ #ifndef _LINUX_EVM_H #define _LINUX_EVM_H #include <linux/integrity.h> |
cb7231806
|
12 |
#include <linux/xattr.h> |
3e1be52d6
|
13 |
|
2960e6cb5
|
14 |
struct integrity_iint_cache; |
3e1be52d6
|
15 16 17 18 |
#ifdef CONFIG_EVM extern enum integrity_status evm_verifyxattr(struct dentry *dentry, const char *xattr_name, void *xattr_value, |
2960e6cb5
|
19 20 |
size_t xattr_value_len, struct integrity_iint_cache *iint); |
817b54aa4
|
21 |
extern int evm_inode_setattr(struct dentry *dentry, struct iattr *attr); |
975d29437
|
22 |
extern void evm_inode_post_setattr(struct dentry *dentry, int ia_valid); |
3e1be52d6
|
23 24 25 26 27 28 29 |
extern int evm_inode_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size); extern void evm_inode_post_setxattr(struct dentry *dentry, const char *xattr_name, const void *xattr_value, size_t xattr_value_len); extern int evm_inode_removexattr(struct dentry *dentry, const char *xattr_name); |
c7b87de23
|
30 31 |
extern void evm_inode_post_removexattr(struct dentry *dentry, const char *xattr_name); |
cb7231806
|
32 33 34 |
extern int evm_inode_init_security(struct inode *inode, const struct xattr *xattr_array, struct xattr *evm); |
bf6d0f5dc
|
35 36 37 38 39 40 41 42 |
#ifdef CONFIG_FS_POSIX_ACL extern int posix_xattr_acl(const char *xattrname); #else static inline int posix_xattr_acl(const char *xattrname) { return 0; } #endif |
3e1be52d6
|
43 44 45 46 47 |
#else #ifdef CONFIG_INTEGRITY static inline enum integrity_status evm_verifyxattr(struct dentry *dentry, const char *xattr_name, void *xattr_value, |
2960e6cb5
|
48 49 |
size_t xattr_value_len, struct integrity_iint_cache *iint) |
3e1be52d6
|
50 51 52 53 |
{ return INTEGRITY_UNKNOWN; } #endif |
e1c9b23ad
|
54 |
static inline int evm_inode_setattr(struct dentry *dentry, struct iattr *attr) |
817b54aa4
|
55 56 57 |
{ return 0; } |
975d29437
|
58 59 60 61 |
static inline void evm_inode_post_setattr(struct dentry *dentry, int ia_valid) { return; } |
3e1be52d6
|
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
static inline int evm_inode_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size) { return 0; } static inline void evm_inode_post_setxattr(struct dentry *dentry, const char *xattr_name, const void *xattr_value, size_t xattr_value_len) { return; } static inline int evm_inode_removexattr(struct dentry *dentry, const char *xattr_name) { return 0; } |
c7b87de23
|
81 82 83 84 85 86 |
static inline void evm_inode_post_removexattr(struct dentry *dentry, const char *xattr_name) { return; } |
cb7231806
|
87 88 89 90 |
static inline int evm_inode_init_security(struct inode *inode, const struct xattr *xattr_array, struct xattr *evm) { |
5a4730ba9
|
91 |
return 0; |
cb7231806
|
92 |
} |
e05a4f4fc
|
93 |
#endif /* CONFIG_EVM */ |
3e1be52d6
|
94 |
#endif /* LINUX_EVM_H */ |