patch-2.3.99-pre1 linux/drivers/net/hamradio/hdlcdrv.c
Next file: linux/drivers/net/hamradio/pi2.c
Previous file: linux/drivers/net/hamradio/bpqether.c
Back to the patch index
Back to the overall index
- Lines: 27
- Date:
Mon Mar 13 09:50:16 2000
- Orig file:
v2.3.51/linux/drivers/net/hamradio/hdlcdrv.c
- Orig date:
Sun Feb 20 21:12:39 2000
diff -u --recursive --new-file v2.3.51/linux/drivers/net/hamradio/hdlcdrv.c linux/drivers/net/hamradio/hdlcdrv.c
@@ -635,7 +635,7 @@
break;
case HDLCDRVCTL_SETCHANNELPAR:
- if (!suser())
+ if (!capable(CAP_NET_ADMIN))
return -EACCES;
s->ch_params.tx_delay = bi.data.cp.tx_delay;
s->ch_params.tx_tail = bi.data.cp.tx_tail;
@@ -656,7 +656,7 @@
break;
case HDLCDRVCTL_SETMODEMPAR:
- if ((!suser()) || netif_running(dev))
+ if ((!capable(CAP_SYS_RAWIO)) || netif_running(dev))
return -EACCES;
dev->base_addr = bi.data.mp.iobase;
dev->irq = bi.data.mp.irq;
@@ -684,6 +684,8 @@
break;
case HDLCDRVCTL_CALIBRATE:
+ if(!capable(CAP_SYS_RAWIO))
+ return -EPERM;
s->hdlctx.calibrate = bi.data.calibrate * s->par.bitrate / 16;
return 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)