summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMimi Zohar <zohar@linux.vnet.ibm.com>2011-08-11 00:22:52 -0400
committerJames Morris <jmorris@namei.org>2011-08-11 17:42:41 +1000
commit5a4730ba9517cf2793175991243436a24b1db18f (patch)
tree2c9c26d4662a31c851aed525d4d032d08e54e297
parente1c9b23adbe86c725738402857397d7a29f9d6ef (diff)
downloadop-kernel-dev-5a4730ba9517cf2793175991243436a24b1db18f.zip
op-kernel-dev-5a4730ba9517cf2793175991243436a24b1db18f.tar.gz
evm: fix evm_inode_init_security return code
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>
-rw-r--r--include/linux/evm.h2
-rw-r--r--security/integrity/evm/evm_main.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/evm.h b/include/linux/evm.h
index 62deb65..ea603c9 100644
--- a/include/linux/evm.h
+++ b/include/linux/evm.h
@@ -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 */
diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c
index 8fc5b5d..f0127e5 100644
--- a/security/integrity/evm/evm_main.c
+++ b/security/integrity/evm/evm_main.c
@@ -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)
OpenPOWER on IntegriCloud