userns: Convert tomoyo to use kuid and kgid where appropriate
[sfrench/cifs-2.6.git] / security / tomoyo / common.c
index 2e0f12c629386da35b3b26fc37dfb973db57440d..f89a0333b8134b25d71e53bed63acfe3643043dd 100644 (file)
@@ -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)