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

Next file: linux/net/ethernet/pe2.c
Previous file: linux/net/core/scm.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.99/linux/net/core/sock.c linux/net/core/sock.c
@@ -185,7 +185,7 @@
   	switch(optname) 
   	{
 		case SO_DEBUG:	
-			if(val && !suser())
+			if(val && !capable(CAP_NET_ADMIN))
 			{
 				ret = -EACCES;
 			}
@@ -924,7 +924,7 @@
 			 */
 			if (current->pgrp != -arg &&
 				current->pid != arg &&
-				!suser()) return(-EPERM);
+				!capable(CAP_NET_ADMIN)) return(-EPERM);
 			sk->proc = arg;
 			return(0);
 		case F_GETOWN:

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