Hi,
Can anyone of the veterans please help me out with a
small code curiosity
Why does the SIOCETHTOOL ioctl need
CAP_NET_ADMIN even for harmless commands like
GSET ?
Some sample drivers that I managed to download over the net
that supports SIOCETHTOOL has comments like
"no need to check for CAP_NET_ADMIN since that is already
present in net/core/dev.c". (And sure enough it was there)
Why would such a blanket checking be present when this ioctl
is only an entry point for many sub commands ?
I have used SIOCGMIIPHY before and it seemed not to require
any su rights or capabilities. What's then the difference between these
2 ioctls that require more capabilities for SIOCETHTOOL ?
arun
|