diff options
author | Zhao Hongjiang <zhaohongjiang@huawei.com> | 2012-09-20 22:37:25 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-09-21 13:58:08 -0400 |
commit | bf5b30b8a4416de04f1ac1196281ddb318669464 (patch) | |
tree | a96a8280047830630b54aa82c568f7a22e8f0ba1 /net/ipv4 | |
parent | e0c7a4a1a6c4ace4a176b95cb5089f55452c625e (diff) | |
download | linux-bf5b30b8a4416de04f1ac1196281ddb318669464.tar.gz linux-bf5b30b8a4416de04f1ac1196281ddb318669464.tar.bz2 linux-bf5b30b8a4416de04f1ac1196281ddb318669464.zip |
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 <zhaohongjiang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/devinet.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 9b55b6f5a585..e12fad773852 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -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; |