Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d15d9fad authored by Rafal Krypa's avatar Rafal Krypa Committed by Casey Schaufler
Browse files

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.git



Signed-off-by: default avatarRafal Krypa <r.krypa@samsung.com>
parent 921f3ac4
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -2035,10 +2035,8 @@ static ssize_t smk_write_revoke_subj(struct file *file, const char __user *buf,
	}

	skp = smk_find_entry(cp);
	if (skp == NULL) {
		rc = -EINVAL;
	if (skp == NULL)
		goto free_out;
	}

	rule_list = &skp->smk_rules;
	rule_lock = &skp->smk_rules_lock;