]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ethtool: allow non-netadmin to query settings
authorstephen hemminger <shemminger@vyatta.com>
Mon, 23 Aug 2010 10:24:18 +0000 (10:24 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Aug 2010 03:43:16 +0000 (20:43 -0700)
The SNMP daemon uses ethtool to determine the speed of
network interfaces. This fails on Debian (and probably elsewhere)
because for security SNMP daemon runs as non-root user (snmp).

Note: A similar patch was rejected previously because of a concern about
the possibility that on some hardware querying the ethtool settings
requires access to the PHY and could slow the machine down.  But the
security risk of requiring SNMP daemon (and related services)
to run as root far out weighs the risk of denial-of-service.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/ethtool.c

index d2c4da5a6a4f3fafa21e75c23892b391385f2223..970eb9817bbcc912b21c2823e2a377b1bd304a25 100644 (file)
@@ -1423,6 +1423,7 @@ int dev_ethtool(struct net *net, struct ifreq *ifr)
 
        /* Allow some commands to be done by anyone */
        switch (ethcmd) {
+       case ETHTOOL_GSET:
        case ETHTOOL_GDRVINFO:
        case ETHTOOL_GMSGLVL:
        case ETHTOOL_GCOALESCE: