aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorDmitry Kasatkin <dmitry.kasatkin@nokia.com>2011-05-06 04:34:13 -0400
committerMimi Zohar <zohar@linux.vnet.ibm.com>2011-07-18 12:29:47 -0400
commit2960e6cb5f7c662b8edb6b0d2edc72095b4f5672 (patch)
tree84e8c3378312243087089a669e4209f43d531b37 /security
parentd46eb3699502ba221e81e88e6c6594e2a7818532 (diff)
evm: additional parameter to pass integrity cache entry 'iint'
Additional iint parameter allows to skip lookup in the cache. Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@nokia.com> Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Diffstat (limited to 'security')
-rw-r--r--security/integrity/evm/evm_main.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c
index b65adb5b06c8..0fa8261c3655 100644
--- a/security/integrity/evm/evm_main.c
+++ b/security/integrity/evm/evm_main.c
@@ -127,21 +127,19 @@ static int evm_protected_xattr(const char *req_xattr_name)
127 */ 127 */
128enum integrity_status evm_verifyxattr(struct dentry *dentry, 128enum integrity_status evm_verifyxattr(struct dentry *dentry,
129 const char *xattr_name, 129 const char *xattr_name,
130 void *xattr_value, size_t xattr_value_len) 130 void *xattr_value, size_t xattr_value_len,
131 struct integrity_iint_cache *iint)
131{ 132{
132 struct inode *inode = dentry->d_inode;
133 struct integrity_iint_cache *iint;
134 enum integrity_status status;
135
136 if (!evm_initialized || !evm_protected_xattr(xattr_name)) 133 if (!evm_initialized || !evm_protected_xattr(xattr_name))
137 return INTEGRITY_UNKNOWN; 134 return INTEGRITY_UNKNOWN;
138 135
139 iint = integrity_iint_find(inode); 136 if (!iint) {
140 if (!iint) 137 iint = integrity_iint_find(dentry->d_inode);
141 return INTEGRITY_UNKNOWN; 138 if (!iint)
142 status = evm_verify_hmac(dentry, xattr_name, xattr_value, 139 return INTEGRITY_UNKNOWN;
140 }
141 return evm_verify_hmac(dentry, xattr_name, xattr_value,
143 xattr_value_len, iint); 142 xattr_value_len, iint);
144 return status;
145} 143}
146EXPORT_SYMBOL_GPL(evm_verifyxattr); 144EXPORT_SYMBOL_GPL(evm_verifyxattr);
147 145