patch-2.1.100 linux/net/ipv6/af_inet6.c
Next file: linux/net/ipv6/exthdrs.c
Previous file: linux/net/ipv6/addrconf.c
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Wed May 6 10:56:08 1998
- Orig file:
v2.1.99/linux/net/ipv6/af_inet6.c
- Orig date:
Wed Apr 1 20:11:55 1998
diff -u --recursive --new-file v2.1.99/linux/net/ipv6/af_inet6.c linux/net/ipv6/af_inet6.c
@@ -89,7 +89,7 @@
prot=&udpv6_prot;
sock->ops = &inet6_dgram_ops;
} else if(sock->type == SOCK_RAW) {
- if (!suser())
+ if (!capable(CAP_NET_RAW))
goto free_and_badperm;
if (!protocol)
goto free_and_noproto;
@@ -187,7 +187,7 @@
snum = ntohs(addr->sin6_port);
if (snum == 0)
snum = sk->prot->good_socknum();
- if (snum < PROT_SOCK && !suser())
+ if (snum < PROT_SOCK && !capable(CAP_NET_BIND_SERVICE))
return(-EACCES);
addr_type = ipv6_addr_type(&addr->sin6_addr);
@@ -291,7 +291,8 @@
return err;
/* see sock_no_fcntl */
- if (current->pid != pid && current->pgrp != -pid && !suser())
+ if (current->pid != pid && current->pgrp != -pid &&
+ !capable(CAP_NET_ADMIN))
return -EPERM;
sk->proc = pid;
return(0);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov