patch-2.1.124 linux/net/ipv4/ip_gre.c
Next file: linux/net/ipv4/ip_input.c
Previous file: linux/net/ipv4/ip_fw.c
Back to the patch index
Back to the overall index
- Lines: 22
- Date:
Sun Oct 4 10:19:39 1998
- Orig file:
v2.1.123/linux/net/ipv4/ip_gre.c
- Orig date:
Sat Sep 5 16:46:42 1998
diff -u --recursive --new-file v2.1.123/linux/net/ipv4/ip_gre.c linux/net/ipv4/ip_gre.c
@@ -826,6 +826,10 @@
case SIOCADDTUNNEL:
case SIOCCHGTUNNEL:
+ err = -EPERM;
+ if (!capable(CAP_NET_ADMIN))
+ goto done;
+
err = -EFAULT;
if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p)))
goto done;
@@ -859,6 +863,10 @@
break;
case SIOCDELTUNNEL:
+ err = -EPERM;
+ if (!capable(CAP_NET_ADMIN))
+ goto done;
+
if (dev == &ipgre_fb_tunnel_dev) {
err = -EFAULT;
if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p)))
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov