* [PATCH net-next] ethtool: Make more commands available to unprivileged processes
@ 2012-06-12 23:05 Ben Hutchings
2012-06-13 1:52 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Ben Hutchings @ 2012-06-12 23:05 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-net-drivers
'Get' commands should generally not require CAP_NET_ADMIN, with
the exception of those that expose internal state.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
The one command I'm not sure about is ETHTOOL_STATS. It might reveal
too much detail about network traffic. That said, /proc/net/dev and
/sys/class/net/*/statistics are already world-readable.
Ben.
net/core/ethtool.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index c73d0a5..cbf033d 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -1443,6 +1443,7 @@ int dev_ethtool(struct net *net, struct ifreq *ifr)
case ETHTOOL_GSET:
case ETHTOOL_GDRVINFO:
case ETHTOOL_GMSGLVL:
+ case ETHTOOL_GLINK:
case ETHTOOL_GCOALESCE:
case ETHTOOL_GRINGPARAM:
case ETHTOOL_GPAUSEPARAM:
@@ -1451,6 +1452,7 @@ int dev_ethtool(struct net *net, struct ifreq *ifr)
case ETHTOOL_GSG:
case ETHTOOL_GSSET_INFO:
case ETHTOOL_GSTRINGS:
+ case ETHTOOL_GSTATS:
case ETHTOOL_GTSO:
case ETHTOOL_GPERMADDR:
case ETHTOOL_GUFO:
@@ -1463,8 +1465,11 @@ int dev_ethtool(struct net *net, struct ifreq *ifr)
case ETHTOOL_GRXCLSRLCNT:
case ETHTOOL_GRXCLSRULE:
case ETHTOOL_GRXCLSRLALL:
+ case ETHTOOL_GRXFHINDIR:
case ETHTOOL_GFEATURES:
+ case ETHTOOL_GCHANNELS:
case ETHTOOL_GET_TS_INFO:
+ case ETHTOOL_GEEE:
break;
default:
if (!capable(CAP_NET_ADMIN))
--
1.7.7.6
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] ethtool: Make more commands available to unprivileged processes
2012-06-12 23:05 [PATCH net-next] ethtool: Make more commands available to unprivileged processes Ben Hutchings
@ 2012-06-13 1:52 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-06-13 1:52 UTC (permalink / raw)
To: bhutchings; +Cc: netdev, linux-net-drivers
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Wed, 13 Jun 2012 00:05:41 +0100
> 'Get' commands should generally not require CAP_NET_ADMIN, with
> the exception of those that expose internal state.
>
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
> ---
> The one command I'm not sure about is ETHTOOL_STATS. It might reveal
> too much detail about network traffic. That said, /proc/net/dev and
> /sys/class/net/*/statistics are already world-readable.
Applied, it just means we need to scrutinize what people put into the
stats a little bit more.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-13 1:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-12 23:05 [PATCH net-next] ethtool: Make more commands available to unprivileged processes Ben Hutchings
2012-06-13 1:52 ` 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).