Skip to content

Commit

Permalink
dst/connector: Disallow unpliviged users to configure dst
Browse files Browse the repository at this point in the history
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Philipp Reisner authored and David S. Miller committed Oct 2, 2009
1 parent 2483647 commit 5788c56
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/staging/dst/dcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5788c56

Please sign in to comment.