summaryrefslogtreecommitdiffstats
path: root/net/decnet
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
commit012bb3e61e5eced6c610f9e036372bf0c8def2d1 (patch)
tree87efc733f9b164e8c85c0336f92c8fb7eff6d183 /net/decnet
parent625a1589d3d6464b5d90b8a0918789e3afffd220 (diff)
Merge with Linux 2.4.0-test9. Please check DECstation, I had a number
of rejects to fixup while integrating Linus patches. I also found that this kernel will only boot SMP on Origin; the UP kernel freeze soon after bootup with SCSI timeout messages. I commit this anyway since I found that the last CVS versions had the same problem.
Diffstat (limited to 'net/decnet')
-rw-r--r--net/decnet/af_decnet.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c
index 5322b3a89..348c30fce 100644
--- a/net/decnet/af_decnet.c
+++ b/net/decnet/af_decnet.c
@@ -32,6 +32,7 @@
* Patrick Caulfield: Fixes to delayed acceptance logic.
* David S. Miller: New socket locking
* Steve Whitehouse: Socket list hashing/locking
+ * Arnaldo C. Melo: use capable, not suser
*/
@@ -688,7 +689,7 @@ static int dn_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
if (dn_ntohs(saddr->sdn_nodeaddrl) && (dn_ntohs(saddr->sdn_nodeaddrl) != 2))
return -EINVAL;
- if (saddr->sdn_objnum && !suser())
+ if (saddr->sdn_objnum && !capable(CAP_NET_BIND_SERVICE))
return -EPERM;
if (dn_ntohs(saddr->sdn_objnamel) > DN_MAXOBJL)
@@ -698,7 +699,7 @@ static int dn_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
return -EINVAL;
if (saddr->sdn_flags & SDF_WILD) {
- if (!suser())
+ if (!capable(CAP_NET_BIND_SERVICE))
return -EPERM;
} else {
if (dn_ntohs(saddr->sdn_nodeaddrl)) {
@@ -1101,7 +1102,7 @@ static int dn_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
#if 0
case SIOCSIFADDR:
- if (!suser()) return -EPERM;
+ if (!capable(CAP_NET_ADMIN)) return -EPERM;
if ((err = copy_from_user(devname, ioarg->devname, 5)) != 0)
break;
@@ -1143,7 +1144,7 @@ static int dn_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
#if 0
case SIOCSNETADDR:
- if (!suser()) {
+ if (!capable(CAP_NET_ADMIN)) {
err = -EPERM;
break;
}
@@ -1174,7 +1175,7 @@ static int dn_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
break;
#endif
case OSIOCSNETADDR:
- if (!suser()) {
+ if (!capable(CAP_NET_ADMIN)) {
err = -EPERM;
break;
}
@@ -1189,8 +1190,7 @@ static int dn_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
break;
case OSIOCGNETADDR:
- if ((err = put_user(decnet_address, (unsigned short *)arg)) != 0)
- break;
+ err = put_user(decnet_address, (unsigned short *)arg);
break;
case SIOCGIFCONF:
case SIOCGIFFLAGS: