Smack: change rule cap check
[firefly-linux-kernel-4.4.55.git] / security / smack / smackfs.c
index f5a6bb8e282848e8ec1247c7d46e881b92b5a814..3198cfe1dcc69fb0bcc158940c030cd125105ed5 100644 (file)
@@ -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,