From: Linus Torvalds Date: Tue, 29 Apr 2008 18:45:16 +0000 (-0700) Subject: drivers/net/tehuti: use proper capability check for raw IO access X-Git-Tag: upstream/snapshot3+hdmi~25525 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6203554207728f43cfb9fd48585cd6500da73d42;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git drivers/net/tehuti: use proper capability check for raw IO access 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 Signed-off-by: Linus Torvalds --- diff --git a/drivers/net/tehuti.c b/drivers/net/tehuti.c index e83b166..432e837 100644 --- a/drivers/net/tehuti.c +++ b/drivers/net/tehuti.c @@ -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]) {