patch-2.1.100 linux/net/appletalk/ddp.c

Next file: linux/net/core/dev.c
Previous file: linux/mm/vmscan.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.99/linux/net/appletalk/ddp.c linux/net/appletalk/ddp.c
@@ -719,7 +719,7 @@
 	switch(cmd)
 	{
 		case SIOCSIFADDR:
-			if(!suser())
+			if(!capable(CAP_NET_ADMIN))
 				return (-EPERM);
 			if(sa->sat_family != AF_APPLETALK)
 				return (-EINVAL);
@@ -830,7 +830,7 @@
 
 	        case SIOCATALKDIFADDR:
 	        case SIOCDIFADDR:
-			if(!suser())
+			if(!capable(CAP_NET_ADMIN))
 				return (-EPERM);
 			if(sa->sat_family != AF_APPLETALK)
 				return (-EINVAL);
@@ -1809,7 +1809,7 @@
 		 */
 		case SIOCADDRT:
 		case SIOCDELRT:
-			if(!suser())
+			if(!capable(CAP_NET_ADMIN))
 				return -EPERM;
 			return (atrtr_ioctl(cmd,(void *)arg));
 

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