[Devel] [PATCH 2/7] Revert "ve/net/ioctl: allow change net-device name with CAP_VE_NET_ADMIN"

Andrew Vagin avagin at openvz.org
Wed Sep 2 07:14:57 PDT 2015


This reverts commit 9118029490d75eee8ea1c8513412b55b94be92d9.

Signed-off-by: Andrew Vagin <avagin at openvz.org>
---
 net/core/dev_ioctl.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c
index 77df687..d407219 100644
--- a/net/core/dev_ioctl.c
+++ b/net/core/dev_ioctl.c
@@ -476,11 +476,8 @@ int dev_ioctl(struct net *net, unsigned int cmd, void __user *arg)
 	 */
 	case SIOCGMIIPHY:
 	case SIOCGMIIREG:
-		if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
-			return -EPERM;
 	case SIOCSIFNAME:
-		if (!ns_capable(net->user_ns, CAP_NET_ADMIN) &&
-		    !ns_capable(net->user_ns, CAP_VE_NET_ADMIN))
+		if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
 			return -EPERM;
 		dev_load(net, ifr.ifr_name);
 		rtnl_lock();
-- 
1.7.1




More information about the Devel mailing list