[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <7dd0b2866a56c67b997df0eff9319383bbc775f4.1227137423.git.zohar@linux.vnet.ibm.com>
Date: Thu, 20 Nov 2008 11:43:06 -0500
From: Mimi Zohar <zohar@...ux.vnet.ibm.com>
To: linux-kernel@...r.kernel.org
Cc: Mimi Zohar <zohar@...ux.vnet.ibm.com>,
Andrew Morton <akpm@...x-foundation.org>,
James Morris <jmorris@...ei.org>,
Christoph Hellwig <hch@...radead.org>,
Al Viro <viro@...IV.linux.org.uk>,
David Safford <safford@...son.ibm.com>,
Serge Hallyn <serue@...ux.vnet.ibm.com>,
Mimi Zohar <zohar@...ibm.com>
Subject: [PATCH 4/4] integrity: replace task uid with cred uid
This patch addresses the credential merge changes in the
security-testing-2.6/next tree.
Signed-off-by: Mimi Zohar <zohar@...ibm.com>
---
diff --git a/security/integrity/ima/ima_crypto.c b/security/integrity/ima/ima_crypto.c
index f62f2b7..4d59a86 100644
--- a/security/integrity/ima/ima_crypto.c
+++ b/security/integrity/ima/ima_crypto.c
@@ -44,7 +44,7 @@ static int update_file_hash(struct file *f, struct path *path,
rc = -EINVAL;
goto out;
}
- file = dentry_open(de, mnt, O_RDONLY);
+ file = dentry_open(de, mnt, O_RDONLY, current->cred);
if (IS_ERR(file)) {
ima_info("%s dentry_open failed\n", de->d_name.name);
rc = PTR_ERR(file);
diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c
index 2e95c35..867bfaf 100644
--- a/security/integrity/ima/ima_policy.c
+++ b/security/integrity/ima/ima_policy.c
@@ -95,7 +95,7 @@ static bool ima_match_rules(struct ima_measure_rule_entry *rule,
if ((rule->flags & IMA_FSMAGIC)
&& rule->fsmagic != inode->i_sb->s_magic)
return false;
- if ((rule->flags & IMA_UID) && rule->uid != tsk->uid)
+ if ((rule->flags & IMA_UID) && rule->uid != tsk->cred->uid)
return false;
for (i = 0; i < MAX_LSM_RULES; i++) {
int rc;
diff --git a/security/integrity/integrity_audit.c b/security/integrity/integrity_audit.c
index 758e5dd..8e32d84 100644
--- a/security/integrity/integrity_audit.c
+++ b/security/integrity/integrity_audit.c
@@ -49,7 +49,7 @@ void integrity_audit_msg(int audit_msgno, struct inode *inode,
ab = audit_log_start(current->audit_context, GFP_KERNEL, audit_msgno);
audit_log_format(ab, "integrity: pid=%d uid=%u auid=%u",
- current->pid, current->uid,
+ current->pid, current->cred->uid,
audit_get_loginuid(current));
audit_log_task_context(ab);
switch (audit_msgno) {
--
1.5.6.5
--
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