diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-06-12 09:05:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-12 21:51:09 -0400 |
commit | 2da45db2bdd432a9dca825099c791f5c851f92b9 (patch) | |
tree | 8dcc0a926ba2f740c47d877f837a3dee210d1839 /net | |
parent | 95603e2293de556de7e82221649bfd7fd98b64a3 (diff) |
ethtool: Make more commands available to unprivileged processes
'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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | 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 c73d0a59212c..cbf033dcaf1f 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c | |||
@@ -1443,6 +1443,7 @@ int dev_ethtool(struct net *net, struct ifreq *ifr) | |||
1443 | case ETHTOOL_GSET: | 1443 | case ETHTOOL_GSET: |
1444 | case ETHTOOL_GDRVINFO: | 1444 | case ETHTOOL_GDRVINFO: |
1445 | case ETHTOOL_GMSGLVL: | 1445 | case ETHTOOL_GMSGLVL: |
1446 | case ETHTOOL_GLINK: | ||
1446 | case ETHTOOL_GCOALESCE: | 1447 | case ETHTOOL_GCOALESCE: |
1447 | case ETHTOOL_GRINGPARAM: | 1448 | case ETHTOOL_GRINGPARAM: |
1448 | case ETHTOOL_GPAUSEPARAM: | 1449 | case ETHTOOL_GPAUSEPARAM: |
@@ -1451,6 +1452,7 @@ int dev_ethtool(struct net *net, struct ifreq *ifr) | |||
1451 | case ETHTOOL_GSG: | 1452 | case ETHTOOL_GSG: |
1452 | case ETHTOOL_GSSET_INFO: | 1453 | case ETHTOOL_GSSET_INFO: |
1453 | case ETHTOOL_GSTRINGS: | 1454 | case ETHTOOL_GSTRINGS: |
1455 | case ETHTOOL_GSTATS: | ||
1454 | case ETHTOOL_GTSO: | 1456 | case ETHTOOL_GTSO: |
1455 | case ETHTOOL_GPERMADDR: | 1457 | case ETHTOOL_GPERMADDR: |
1456 | case ETHTOOL_GUFO: | 1458 | case ETHTOOL_GUFO: |
@@ -1463,8 +1465,11 @@ int dev_ethtool(struct net *net, struct ifreq *ifr) | |||
1463 | case ETHTOOL_GRXCLSRLCNT: | 1465 | case ETHTOOL_GRXCLSRLCNT: |
1464 | case ETHTOOL_GRXCLSRULE: | 1466 | case ETHTOOL_GRXCLSRULE: |
1465 | case ETHTOOL_GRXCLSRLALL: | 1467 | case ETHTOOL_GRXCLSRLALL: |
1468 | case ETHTOOL_GRXFHINDIR: | ||
1466 | case ETHTOOL_GFEATURES: | 1469 | case ETHTOOL_GFEATURES: |
1470 | case ETHTOOL_GCHANNELS: | ||
1467 | case ETHTOOL_GET_TS_INFO: | 1471 | case ETHTOOL_GET_TS_INFO: |
1472 | case ETHTOOL_GEEE: | ||
1468 | break; | 1473 | break; |
1469 | default: | 1474 | default: |
1470 | if (!capable(CAP_NET_ADMIN)) | 1475 | if (!capable(CAP_NET_ADMIN)) |