Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93128
b: refs/heads/master
c: f946dff
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Garzik authored and Jeff Garzik committed Apr 25, 2008
1 parent 3b23796 commit c22f910
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d4f73c8e459d355e10051174d859ffd0ef5764c0
refs/heads/master: f946dffed6334f08da065a89ed65026ebf8b33b4
5 changes: 3 additions & 2 deletions trunk/drivers/net/tehuti.c
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,9 @@ static int bdx_ioctl_priv(struct net_device *ndev, struct ifreq *ifr, int cmd)
DBG("%d 0x%x 0x%x\n", data[0], data[1], data[2]);
}

if (!capable(CAP_NET_ADMIN))
return -EPERM;

switch (data[0]) {

case BDX_OP_READ:
Expand All @@ -664,8 +667,6 @@ static int bdx_ioctl_priv(struct net_device *ndev, struct ifreq *ifr, int cmd)
break;

case BDX_OP_WRITE:
if (!capable(CAP_NET_ADMIN))
return -EPERM;
error = bdx_range_check(priv, data[1]);
if (error < 0)
return error;
Expand Down

0 comments on commit c22f910

Please sign in to comment.