Linux Integrity Measurement development
 help / color / mirror / Atom feed
* [PATCH] evm: allow uid/gid/mode changes for inode without xattr support
@ 2017-11-03 20:17 Mikhail Kurinnoi
  0 siblings, 0 replies; only message in thread
From: Mikhail Kurinnoi @ 2017-11-03 20:17 UTC (permalink / raw)
  To: linux-integrity, Mimi Zohar

This patch provide changes in order to allow uid/gid/mode changes for
inode without xattr support.

Signed-off-by: Mikhail Kurinnoi <viewizard@viewizard.com>

 security/integrity/evm/evm_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c
index 9826c02e2db8..e365ea39a3ed 100644
--- a/security/integrity/evm/evm_main.c
+++ b/security/integrity/evm/evm_main.c
@@ -431,7 +431,8 @@ int evm_inode_setattr(struct dentry *dentry, struct iattr *attr)
 	unsigned int ia_valid = attr->ia_valid;
 	enum integrity_status evm_status;
 
-	if (!(ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID)))
+	if (!(ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID)) ||
+	    !(d_backing_inode(dentry)->i_opflags & IOP_XATTR))
 		return 0;
 	evm_status = evm_verify_current_integrity(dentry);
 	if ((evm_status == INTEGRITY_PASS) ||

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-03 20:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-03 20:17 [PATCH] evm: allow uid/gid/mode changes for inode without xattr support Mikhail Kurinnoi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox