mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
net: change return values from -EACCES to -EPERM
Change return value from -EACCES to -EPERM when the permission check fails. Signed-off-by: Zhao Hongjiang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
e0c7a4a1a6
commit
bf5b30b8a4
6 changed files with 17 additions and 17 deletions
|
|
@ -725,7 +725,7 @@ int devinet_ioctl(struct net *net, unsigned int cmd, void __user *arg)
|
|||
break;
|
||||
|
||||
case SIOCSIFFLAGS:
|
||||
ret = -EACCES;
|
||||
ret = -EPERM;
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
goto out;
|
||||
break;
|
||||
|
|
@ -733,7 +733,7 @@ int devinet_ioctl(struct net *net, unsigned int cmd, void __user *arg)
|
|||
case SIOCSIFBRDADDR: /* Set the broadcast address */
|
||||
case SIOCSIFDSTADDR: /* Set the destination address */
|
||||
case SIOCSIFNETMASK: /* Set the netmask for the interface */
|
||||
ret = -EACCES;
|
||||
ret = -EPERM;
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
goto out;
|
||||
ret = -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue