summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2009-10-02 02:40:09 +0000
committerDavid S. Miller <davem@davemloft.net>2009-10-02 10:54:13 -0700
commit5788c56891cfb310e419c4f9ae20427851797431 (patch)
tree11df79a3db80bf03d2db1cee6e8e7065a57753e3 /drivers
parent24836479a126e02be691e073c2b6cad7e7ab836a (diff)
downloadlinux-3.10-5788c56891cfb310e419c4f9ae20427851797431.tar.gz
linux-3.10-5788c56891cfb310e419c4f9ae20427851797431.tar.bz2
linux-3.10-5788c56891cfb310e419c4f9ae20427851797431.zip
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/dst/dcore.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/staging/dst/dcore.c b/drivers/staging/dst/dcore.c
index 3943c91e6c9..ee1601026fb 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;