From: Thomas Graf Date: Tue, 24 Jan 2006 20:46:33 +0000 (-0800) Subject: [BONDING]: Remove CAP_NET_ADMIN requirement for INFOQUERY ioctl X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cabcac0b296cd9683bc168d60839729b720dc2b7;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [BONDING]: Remove CAP_NET_ADMIN requirement for INFOQUERY ioctl This information is already available via /proc/net/bonding/* therefore it doesn't make sense to require CAP_NET_ADMIN privileges. Original patch by Laurent Deniel Signed-off-by: Thomas Graf Signed-off-by: David S. Miller --- diff --git a/net/core/dev.c b/net/core/dev.c index fd070a098f20..ffb82073056e 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2543,13 +2543,14 @@ int dev_ioctl(unsigned int cmd, void __user *arg) case SIOCBONDENSLAVE: case SIOCBONDRELEASE: case SIOCBONDSETHWADDR: - case SIOCBONDSLAVEINFOQUERY: - case SIOCBONDINFOQUERY: case SIOCBONDCHANGEACTIVE: case SIOCBRADDIF: case SIOCBRDELIF: if (!capable(CAP_NET_ADMIN)) return -EPERM; + /* fall through */ + case SIOCBONDSLAVEINFOQUERY: + case SIOCBONDINFOQUERY: dev_load(ifr.ifr_name); rtnl_lock(); ret = dev_ifsioc(&ifr, cmd);