Commit 5788c568 authored by Philipp Reisner's avatar Philipp Reisner Committed by David S. Miller

dst/connector: Disallow unpliviged users to configure dst

Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 24836479
......@@ -855,6 +855,11 @@ static void cn_dst_callback(struct cn_msg *msg, struct netlink_skb_parms *nsp)
struct dst_node *n = NULL, *tmp;
unsigned int hash;
if (!cap_raised(nsp->eff_cap, CAP_SYS_ADMIN)) {
err = -EPERM;
goto out;
}
if (msg->len < sizeof(struct dst_ctl)) {
err = -EBADMSG;
goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment