]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
dst/connector: Disallow unpliviged users to configure dst
authorPhilipp Reisner <philipp.reisner@linbit.com>
Fri, 2 Oct 2009 02:40:09 +0000 (02:40 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Oct 2009 17:54:13 +0000 (10:54 -0700)
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/staging/dst/dcore.c

index 3943c91e6c96807d18b851ca0fd56687471a1d77..ee1601026fb02dd79aa97a11132300f1af022d54 100644 (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;