patch-2.0.36 linux/net/core/sock.c

Next file: linux/net/ipv4/arp.c
Previous file: linux/net/core/skbuff.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.35/linux/net/core/sock.c linux/net/core/sock.c
@@ -241,6 +241,10 @@
  			/* Bind this socket to a particular device like "eth0",
  			 * as specified in an ifreq structure.  If the device 
  			 * is "", socket is NOT bound to a device. */
+ 			 
+ 			if(!suser())
+ 				return -EPERM;
+ 				
  			if (!valbool) {
  				sk->bound_device = NULL;
  			} else {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov