tomoyo: Swicth from cred->security to task_struct->security.

TOMOYO security module is designed to use "struct task_struct"->security
in order to allow per "struct task_struct" tracking without being disturbed
by unable to update "struct cred"->security due to override mechanism.

Now that infrastructure-managed security blob is ready, this patch updates
TOMOYO to use "struct task_struct"->security.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <james.morris@microsoft.com>
This commit is contained in:
Tetsuo Handa
2019-01-19 23:11:40 +09:00
committed by James Morris
parent 23711df7f4
commit 8c6cb983cd
5 changed files with 110 additions and 124 deletions

View File

@@ -986,7 +986,7 @@ static bool tomoyo_select_domain(struct tomoyo_io_buffer *head,
else
p = find_task_by_vpid(pid);
if (p)
domain = tomoyo_real_domain(p);
domain = tomoyo_task(p)->domain_info;
rcu_read_unlock();
} else if (!strncmp(data, "domain=", 7)) {
if (tomoyo_domain_def(data + 7))
@@ -1668,7 +1668,7 @@ static void tomoyo_read_pid(struct tomoyo_io_buffer *head)
else
p = find_task_by_vpid(pid);
if (p)
domain = tomoyo_real_domain(p);
domain = tomoyo_task(p)->domain_info;
rcu_read_unlock();
if (!domain)
return;