summaryrefslogtreecommitdiffstats
path: root/security/tomoyo/common.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-02-07 16:34:10 -0800
committerEric W. Biederman <ebiederm@xmission.com>2012-09-21 03:13:22 -0700
commit609fcd1b3a55f99667c61609895c83019b21baad (patch)
treef90cec33d1f1e0922c28d5528cd0f535dc235b92 /security/tomoyo/common.c
parent2db81452931eb51cc739d6e495cf1bd4860c3c99 (diff)
downloadop-kernel-dev-609fcd1b3a55f99667c61609895c83019b21baad.zip
op-kernel-dev-609fcd1b3a55f99667c61609895c83019b21baad.tar.gz
userns: Convert tomoyo to use kuid and kgid where appropriate
Acked-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'security/tomoyo/common.c')
-rw-r--r--security/tomoyo/common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c
index 2e0f12c..f89a033 100644
--- a/security/tomoyo/common.c
+++ b/security/tomoyo/common.c
@@ -925,7 +925,9 @@ static bool tomoyo_manager(void)
if (!tomoyo_policy_loaded)
return true;
- if (!tomoyo_manage_by_non_root && (task->cred->uid || task->cred->euid))
+ if (!tomoyo_manage_by_non_root &&
+ (!uid_eq(task->cred->uid, GLOBAL_ROOT_UID) ||
+ !uid_eq(task->cred->euid, GLOBAL_ROOT_UID)))
return false;
exe = tomoyo_get_exe();
if (!exe)
OpenPOWER on IntegriCloud