Skip to content

Commit

Permalink
drivers/net/tehuti: use proper capability check for raw IO access
Browse files Browse the repository at this point in the history
Yeah, in practice they both mean "root", but Alan correctly points out
that anybody who gets to do raw IO space accesses should really be using
CAP_SYS_RAWIO rather than CAP_NET_ADMIN.

Pointed-out-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Linus Torvalds committed Apr 29, 2008
1 parent 9781db7 commit 6203554
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/tehuti.c
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ 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))
if (!capable(CAP_SYS_RAWIO))
return -EPERM;

switch (data[0]) {
Expand Down

0 comments on commit 6203554

Please sign in to comment.