提交 a20aa95f 编写于 作者: J John Johansen

apparmor: fail task profile update if current_cred isn't real_cred

Trying to update the task cred while the task current cred is not the
real cred will result in an error at the cred layer. Avoid this by
failing early and delaying the update.
Signed-off-by: NJohn Johansen <john.johansen@canonical.com>
上级 b7fd2c03
......@@ -100,6 +100,9 @@ int aa_replace_current_profile(struct aa_profile *profile)
if (cxt->profile == profile)
return 0;
if (current_cred() != current_real_cred())
return -EBUSY;
new = prepare_creds();
if (!new)
return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册