Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264488
b: refs/heads/master
c: 2960e6c
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Kasatkin authored and Mimi Zohar committed Jul 18, 2011
1 parent d8d0211 commit b7d9c0f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d46eb3699502ba221e81e88e6c6594e2a7818532
refs/heads/master: 2960e6cb5f7c662b8edb6b0d2edc72095b4f5672
8 changes: 6 additions & 2 deletions trunk/include/linux/evm.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@
#include <linux/integrity.h>
#include <linux/xattr.h>

struct integrity_iint_cache;

#ifdef CONFIG_EVM
extern enum integrity_status evm_verifyxattr(struct dentry *dentry,
const char *xattr_name,
void *xattr_value,
size_t xattr_value_len);
size_t xattr_value_len,
struct integrity_iint_cache *iint);
extern void evm_inode_post_setattr(struct dentry *dentry, int ia_valid);
extern int evm_inode_setxattr(struct dentry *dentry, const char *name,
const void *value, size_t size);
Expand All @@ -34,7 +37,8 @@ extern int evm_inode_init_security(struct inode *inode,
static inline enum integrity_status evm_verifyxattr(struct dentry *dentry,
const char *xattr_name,
void *xattr_value,
size_t xattr_value_len)
size_t xattr_value_len,
struct integrity_iint_cache *iint)
{
return INTEGRITY_UNKNOWN;
}
Expand Down
18 changes: 8 additions & 10 deletions trunk/security/integrity/evm/evm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,21 +127,19 @@ static int evm_protected_xattr(const char *req_xattr_name)
*/
enum integrity_status evm_verifyxattr(struct dentry *dentry,
const char *xattr_name,
void *xattr_value, size_t xattr_value_len)
void *xattr_value, size_t xattr_value_len,
struct integrity_iint_cache *iint)
{
struct inode *inode = dentry->d_inode;
struct integrity_iint_cache *iint;
enum integrity_status status;

if (!evm_initialized || !evm_protected_xattr(xattr_name))
return INTEGRITY_UNKNOWN;

iint = integrity_iint_find(inode);
if (!iint)
return INTEGRITY_UNKNOWN;
status = evm_verify_hmac(dentry, xattr_name, xattr_value,
if (!iint) {
iint = integrity_iint_find(dentry->d_inode);
if (!iint)
return INTEGRITY_UNKNOWN;
}
return evm_verify_hmac(dentry, xattr_name, xattr_value,
xattr_value_len, iint);
return status;
}
EXPORT_SYMBOL_GPL(evm_verifyxattr);

Expand Down

0 comments on commit b7d9c0f

Please sign in to comment.