From 5788c56891cfb310e419c4f9ae20427851797431 Mon Sep 17 00:00:00 2001 From: Philipp Reisner Date: Fri, 2 Oct 2009 02:40:09 +0000 Subject: dst/connector: Disallow unpliviged users to configure dst Signed-off-by: Philipp Reisner Signed-off-by: David S. Miller diff --git a/drivers/staging/dst/dcore.c b/drivers/staging/dst/dcore.c index 3943c91..ee16010 100644 --- a/drivers/staging/dst/dcore.c +++ b/drivers/staging/dst/dcore.c @@ -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; -- cgit v0.10.2