netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ethtool: allow non-netadmin to query settings
@ 2010-08-23 20:24 Stephen Hemminger
  2010-08-23 21:24 ` Ben Hutchings
  2010-08-24  3:44 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Stephen Hemminger @ 2010-08-23 20:24 UTC (permalink / raw)
  To: David Miller, Jeff Garzik; +Cc: netdev

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>

--- a/net/core/ethtool.c	2010-08-22 11:45:34.680419224 -0700
+++ b/net/core/ethtool.c	2010-08-22 11:46:17.207548950 -0700
@@ -1423,6 +1423,7 @@ int dev_ethtool(struct net *net, struct 
 
 	/* Allow some commands to be done by anyone */
 	switch (ethcmd) {
+	case ETHTOOL_GSET:
 	case ETHTOOL_GDRVINFO:
 	case ETHTOOL_GMSGLVL:
 	case ETHTOOL_GCOALESCE:

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-08-24  3:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-23 20:24 [PATCH] ethtool: allow non-netadmin to query settings Stephen Hemminger
2010-08-23 21:24 ` Ben Hutchings
2010-08-23 21:40   ` Stephen Hemminger
2010-08-24  3:44 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).