patch-2.1.129 linux/drivers/net/syncppp.c
Next file: linux/drivers/net/yellowfin.c
Previous file: linux/drivers/net/sunhme.h
Back to the patch index
Back to the overall index
- Lines: 22
- Date:
Fri Nov 13 10:29:44 1998
- Orig file:
v2.1.128/linux/drivers/net/syncppp.c
- Orig date:
Fri Oct 23 22:01:21 1998
diff -u --recursive --new-file v2.1.128/linux/drivers/net/syncppp.c linux/drivers/net/syncppp.c
@@ -859,6 +859,9 @@
if(dev->flags&IFF_UP)
return -EBUSY;
+ if(!capable(CAP_NET_ADMIN))
+ return -EPERM;
+
switch(cmd)
{
case SPPPIOCCISCO:
@@ -872,11 +875,7 @@
case SPPPIOCDEBUG:
sp->pp_flags&=~PP_DEBUG;
if(ifr->ifr_flags)
- {
- if(!capable(CAP_NET_ADMIN))
- return -EPERM;
sp->pp_flags|=PP_DEBUG;
- }
break;
default:
return -EINVAL;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov