提交 5788c568 编写于 作者: P Philipp Reisner 提交者: David S. Miller

dst/connector: Disallow unpliviged users to configure dst

Signed-off-by: NPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册