Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+1 -1
+1 -1
drivers/net/tehuti.c
··· 649 649 DBG("%d 0x%x 0x%x\n", data[0], data[1], data[2]); 650 650 } 651 651 652 - if (!capable(CAP_NET_ADMIN)) 652 + if (!capable(CAP_SYS_RAWIO)) 653 653 return -EPERM; 654 654 655 655 switch (data[0]) {