瀏覽代碼

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 <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds 17 年之前
父節點
當前提交
6203554207
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/tehuti.c

+ 1 - 1
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]);
 		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;
 		return -EPERM;
 
 
 	switch (data[0]) {
 	switch (data[0]) {