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

Commit 4afde48b authored by Casey Schaufler's avatar Casey Schaufler
Browse files

Smack: change rule cap check

smk_write_change_rule() is calling capable rather than
the more correct smack_privileged(). This allows for setting
rules in violation of the onlycap facility. This is the
simple repair.

Targeted for git://git.gitorious.org/smack-next/kernel.git



Signed-off-by: default avatarCasey Schaufler <casey@schaufler-ca.com>
parent 00f84f3f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2152,7 +2152,7 @@ static ssize_t smk_write_change_rule(struct file *file, const char __user *buf,
	/*
	 * Must have privilege.
	 */
	if (!capable(CAP_MAC_ADMIN))
	if (!smack_privileged(CAP_MAC_ADMIN))
		return -EPERM;

	return smk_write_rules_list(file, buf, count, ppos, NULL, NULL,