dst/connector: Disallow unpliviged users to configure dst
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
24836479a1
commit
5788c56891
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue