The commit is pushed to "branch-rh7-3.10.0-229.7.2.vz7.8.x-ovz" and will appear 
at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-229.7.2.vz7.6.8
------>
commit bf95a05ce5971fa899e169aa27e869f34ac91b72
Author: Andrew Vagin <ava...@openvz.org>
Date:   Tue Sep 8 12:50:37 2015 +0400

    Revert "ve/net/ioctl: allow change net-device name with CAP_VE_NET_ADMIN"
    
    This reverts commit 9118029490d75eee8ea1c8513412b55b94be92d9.
    
    https://jira.sw.ru/browse/PSBM-39077
    
    Signed-off-by: Andrew Vagin <ava...@virtuozzo.com>
    Reviewed-by: Vladimir Davydov <vdavy...@virtuozzo.com>
---
 net/core/dev_ioctl.c | 5 +----
 1 file changed, 1 insertion(+), 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();
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to