diff mbox

net: ethtool: don't require CAP_NET_ADMIN for ETHTOOL_GLINKSETTINGS

Message ID 20161124095506.25791-1-mlichvar@redhat.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Miroslav Lichvar Nov. 24, 2016, 9:55 a.m. UTC
The ETHTOOL_GLINKSETTINGS command is deprecating the ETHTOOL_GSET
command and likewise it shouldn't require the CAP_NET_ADMIN capability.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
---
 net/core/ethtool.c | 1 +
 1 file changed, 1 insertion(+)

Comments

David Miller Nov. 26, 2016, 1:23 a.m. UTC | #1
From: Miroslav Lichvar <mlichvar@redhat.com>
Date: Thu, 24 Nov 2016 10:55:06 +0100

> The ETHTOOL_GLINKSETTINGS command is deprecating the ETHTOOL_GSET
> command and likewise it shouldn't require the CAP_NET_ADMIN capability.
> 
> Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>

Good catch, applied, thanks.
Vincent Bernat Dec. 25, 2016, 7:44 a.m. UTC | #2
❦ 24 novembre 2016 10:55 +0100, Miroslav Lichvar <mlichvar@redhat.com> :

> The ETHTOOL_GLINKSETTINGS command is deprecating the ETHTOOL_GSET
> command and likewise it shouldn't require the CAP_NET_ADMIN
> capability.

Could this patch be pushed to stable branches too?
David Miller Dec. 26, 2016, 5:38 p.m. UTC | #3
From: Vincent Bernat <bernat@luffy.cx>

Date: Sun, 25 Dec 2016 08:44:40 +0100

>  ❦ 24 novembre 2016 10:55 +0100, Miroslav Lichvar <mlichvar@redhat.com> :

> 

>> The ETHTOOL_GLINKSETTINGS command is deprecating the ETHTOOL_GSET

>> command and likewise it shouldn't require the CAP_NET_ADMIN

>> capability.

> 

> Could this patch be pushed to stable branches too?


Sure, queued up.
diff mbox

Patch

diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index 9774898..047a175 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -2479,6 +2479,7 @@  int dev_ethtool(struct net *net, struct ifreq *ifr)
 	case ETHTOOL_GET_TS_INFO:
 	case ETHTOOL_GEEE:
 	case ETHTOOL_GTUNABLE:
+	case ETHTOOL_GLINKSETTINGS:
 		break;
 	default:
 		if (!ns_capable(net->user_ns, CAP_NET_ADMIN))