提交 d15d9fad 编写于 作者: R Rafal Krypa 提交者: Casey Schaufler

Smack: prevent revoke-subject from failing when unseen label is written to it

Special file /smack/revoke-subject will silently accept labels that are not
present on the subject label list. Nothing has to be done for such labels,
as there are no rules for them to revoke.

Targeted for git://git.gitorious.org/smack-next/kernel.gitSigned-off-by: NRafal Krypa <r.krypa@samsung.com>
上级 921f3ac4
...@@ -2035,10 +2035,8 @@ static ssize_t smk_write_revoke_subj(struct file *file, const char __user *buf, ...@@ -2035,10 +2035,8 @@ static ssize_t smk_write_revoke_subj(struct file *file, const char __user *buf,
} }
skp = smk_find_entry(cp); skp = smk_find_entry(cp);
if (skp == NULL) { if (skp == NULL)
rc = -EINVAL;
goto free_out; goto free_out;
}
rule_list = &skp->smk_rules; rule_list = &skp->smk_rules;
rule_lock = &skp->smk_rules_lock; rule_lock = &skp->smk_rules_lock;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册