diff options
| author | Philipp Reisner <philipp.reisner@linbit.com> | 2009-10-01 22:40:09 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2009-10-02 13:54:13 -0400 |
| commit | 5788c56891cfb310e419c4f9ae20427851797431 (patch) | |
| tree | 11df79a3db80bf03d2db1cee6e8e7065a57753e3 | |
| parent | 24836479a126e02be691e073c2b6cad7e7ab836a (diff) | |
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>
| -rw-r--r-- | drivers/staging/dst/dcore.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/staging/dst/dcore.c b/drivers/staging/dst/dcore.c index 3943c91e6c96..ee1601026fb0 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) | |||
| 855 | struct dst_node *n = NULL, *tmp; | 855 | struct dst_node *n = NULL, *tmp; |
| 856 | unsigned int hash; | 856 | unsigned int hash; |
| 857 | 857 | ||
| 858 | if (!cap_raised(nsp->eff_cap, CAP_SYS_ADMIN)) { | ||
| 859 | err = -EPERM; | ||
| 860 | goto out; | ||
| 861 | } | ||
| 862 | |||
| 858 | if (msg->len < sizeof(struct dst_ctl)) { | 863 | if (msg->len < sizeof(struct dst_ctl)) { |
| 859 | err = -EBADMSG; | 864 | err = -EBADMSG; |
| 860 | goto out; | 865 | goto out; |
