[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1348187330-6616-6-git-send-email-ebiederm@xmission.com>
Date: Thu, 20 Sep 2012 17:28:42 -0700
From: "Eric W. Biederman" <ebiederm@...ssion.com>
To: <linux-security-module@...r.kernel.org>
Cc: <linux-kernel@...r.kernel.org>, Serge Hallyn <serge@...lyn.com>,
Linux Containers <containers@...ts.linux-foundation.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Mimi Zohar <zohar@...ibm.com>
Subject: [PATCH 06/14] userns: Convert EVM to deal with kuids and kgids in it's hmac computation
From: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: Mimi Zohar <zohar@...ibm.com>
Acked-by: Serge Hallyn <serge.hallyn@...onical.com>
Signed-off-by: Eric W. Biederman <ebiederm@...ssion.com>
---
init/Kconfig | 1 -
security/integrity/evm/evm_crypto.c | 4 ++--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/init/Kconfig b/init/Kconfig
index 8450442..96ee3f3 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -926,7 +926,6 @@ config UIDGID_CONVERTED
# List of kernel pieces that need user namespace work
# Features
depends on IMA = n
- depends on EVM = n
# Networking
depends on NET_9P = n
diff --git a/security/integrity/evm/evm_crypto.c b/security/integrity/evm/evm_crypto.c
index 49a464f..dfb2691 100644
--- a/security/integrity/evm/evm_crypto.c
+++ b/security/integrity/evm/evm_crypto.c
@@ -106,8 +106,8 @@ static void hmac_add_misc(struct shash_desc *desc, struct inode *inode,
memset(&hmac_misc, 0, sizeof hmac_misc);
hmac_misc.ino = inode->i_ino;
hmac_misc.generation = inode->i_generation;
- hmac_misc.uid = inode->i_uid;
- hmac_misc.gid = inode->i_gid;
+ hmac_misc.uid = from_kuid(&init_user_ns, inode->i_uid);
+ hmac_misc.gid = from_kgid(&init_user_ns, inode->i_gid);
hmac_misc.mode = inode->i_mode;
crypto_shash_update(desc, (const u8 *)&hmac_misc, sizeof hmac_misc);
crypto_shash_final(desc, digest);
--
1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists