Skip to content

Commit

Permalink
evm: fix evm_inode_init_security return code
Browse files Browse the repository at this point in the history
evm_inode_init_security() should return 0, when EVM is not enabled.
(Returning an error is a remnant of evm_inode_post_init_security.)

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
  • Loading branch information
Mimi Zohar authored and James Morris committed Aug 11, 2011
1 parent e1c9b23 commit 5a4730b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/linux/evm.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static inline int evm_inode_init_security(struct inode *inode,
const struct xattr *xattr_array,
struct xattr *evm)
{
return -EOPNOTSUPP;
return 0;
}

#endif /* CONFIG_EVM_H */
Expand Down
2 changes: 1 addition & 1 deletion security/integrity/evm/evm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ int evm_inode_init_security(struct inode *inode,
int rc;

if (!evm_initialized || !evm_protected_xattr(lsm_xattr->name))
return -EOPNOTSUPP;
return 0;

xattr_data = kzalloc(sizeof(*xattr_data), GFP_NOFS);
if (!xattr_data)
Expand Down

0 comments on commit 5a4730b

Please sign in to comment.