From ccfbb4433365ba195a4c1a274bcd1547c6df8fee Mon Sep 17 00:00:00 2001 From: Mimi Zohar Date: Tue, 17 Jan 2012 22:11:28 -0500 Subject: [PATCH] --- yaml --- r: 286539 b: refs/heads/master c: 3db59dd93309710c40aaf1571c607cb0feef3ecb h: refs/heads/master i: 286537: e18b79a9deabc986c5c179ac6542ef0a7d415b52 286535: d01ade202a20aba6ad141bf5dfc7417a0241a00d v: v3 --- [refs] | 2 +- trunk/security/integrity/ima/ima_policy.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 4fbeaad0479d..2f9910904a31 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4bf1924c008dffdc154f82507b4052e49263a6f4 +refs/heads/master: 3db59dd93309710c40aaf1571c607cb0feef3ecb diff --git a/trunk/security/integrity/ima/ima_policy.c b/trunk/security/integrity/ima/ima_policy.c index d661afbe474c..d45061d02fee 100644 --- a/trunk/security/integrity/ima/ima_policy.c +++ b/trunk/security/integrity/ima/ima_policy.c @@ -99,6 +99,7 @@ static bool ima_match_rules(struct ima_measure_rule_entry *rule, struct inode *inode, enum ima_hooks func, int mask) { struct task_struct *tsk = current; + const struct cred *cred = current_cred(); int i; if ((rule->flags & IMA_FUNC) && rule->func != func) @@ -108,7 +109,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->cred->uid) + if ((rule->flags & IMA_UID) && rule->uid != cred->uid) return false; for (i = 0; i < MAX_LSM_RULES; i++) { int rc = 0;