1
0
Fork 0

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>
wifi-calibration
Philipp Reisner 2009-10-02 02:40:09 +00:00 committed by David S. Miller
parent 24836479a1
commit 5788c56891
1 changed files with 5 additions and 0 deletions

View File

@ -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;