From: Mimi Zohar <zohar@linux•vnet.ibm.com>
To: linux-security-module@vger•kernel.org
Cc: Mimi Zohar <zohar@linux•vnet.ibm.com>,
linux-next@vger•kernel.org, linux-kernel@vger•kernel.org,
James Morris <jmorris@namei•org>,
Stephen Rothwell <sfr@canb•auug.org.au>,
David Safford <safford@watson•ibm.com>,
Mimi Zohar <zohar@us•ibm.com>
Subject: [PATCH 2/2] evm: fix evm_inode_init_security return code
Date: Thu, 11 Aug 2011 00:22:52 -0400 [thread overview]
Message-ID: <1313036572-27122-2-git-send-email-zohar@linux.vnet.ibm.com> (raw)
In-Reply-To: <1313036572-27122-1-git-send-email-zohar@linux.vnet.ibm.com>
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>
---
include/linux/evm.h | 2 +-
security/integrity/evm/evm_main.c | 2 +-
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)
--
1.7.3.4
next prev parent reply other threads:[~2011-08-11 4:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-11 4:22 [PATCH 1/2] evm: building without EVM enabled fixes Mimi Zohar
2011-08-11 4:22 ` Mimi Zohar [this message]
2011-08-11 8:13 ` [PATCH 2/2] evm: fix evm_inode_init_security return code James Morris
2011-08-12 2:52 ` [PATCH 1/2] evm: building without EVM enabled fixes Stephen Rothwell
2011-08-12 4:08 ` Mimi Zohar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1313036572-27122-2-git-send-email-zohar@linux.vnet.ibm.com \
--to=zohar@linux$(echo .)vnet.ibm.com \
--cc=jmorris@namei$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=linux-security-module@vger$(echo .)kernel.org \
--cc=safford@watson$(echo .)ibm.com \
--cc=sfr@canb$(echo .)auug.org.au \
--cc=zohar@us$(echo .)ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox