aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2005-01-08 03:59:53 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-08 03:59:53 -0800
commit0f1d4813a4a65296e1131f320a60741732bc068f (patch)
tree4168d08a60e95ce2d5eec123abf8fd5cc7d53ff7
parent489d609299dd28c6a06d8cef554c06ae6ac05575 (diff)
downloadhistory-0f1d4813a4a65296e1131f320a60741732bc068f.tar.gz
[PATCH] SDLA firmware upgrade should require CAP_SYS_RAWIO (not just CAP_NET_ADMIN)
There were a few variants on the list trying to work out what the valid ranges to verify for write are but they sort of missed the point, if you can load new firmware you can have fun anyway.
-rw-r--r--drivers/net/wan/sdla.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wan/sdla.c b/drivers/net/wan/sdla.c
index f0ed00ef06fee1..71f95462d58571 100644
--- a/drivers/net/wan/sdla.c
+++ b/drivers/net/wan/sdla.c
@@ -1306,6 +1306,8 @@ NOTE: This is rather a useless action right now, as the
case SDLA_WRITEMEM:
case SDLA_READMEM:
+ if(!capable(CAP_SYS_RAWIO))
+ return -EPERM;
return(sdla_xfer(dev, ifr->ifr_data, cmd == SDLA_READMEM));
case SDLA_START: