patch-2.2.18 linux/drivers/net/bonding.c

Next file: linux/drivers/net/cops.c
Previous file: linux/drivers/net/bmac.c
Back to the patch index
Back to the overall index

diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/drivers/net/bonding.c linux/drivers/net/bonding.c
@@ -176,6 +176,9 @@
 {
 	struct device *slave = dev_get(ifr->ifr_slave);
 
+	if (!capable(CAP_NET_ADMIN))
+		return -EPERM;
+
 #ifdef BONDING_DEBUG
 	printk("master=%s, slave=%s\n", master->name, slave->name);
 #endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)