summaryrefslogtreecommitdiffstats
path: root/drivers/char/moxa.c
diff options
context:
space:
mode:
authorAlan Cox2006-01-09 15:35:28 +0100
committerLinus Torvalds2006-01-10 18:45:36 +0100
commit49cd619c69d643b30a24029e40eb5364c7a26b2e (patch)
tree77d181378b85210b3b32a9b22e3363408ebe786a /drivers/char/moxa.c
parent[PATCH] m68knommu: save reg a5 on context change (diff)
downloadkernel-qcow2-linux-49cd619c69d643b30a24029e40eb5364c7a26b2e.tar.gz
kernel-qcow2-linux-49cd619c69d643b30a24029e40eb5364c7a26b2e.tar.xz
kernel-qcow2-linux-49cd619c69d643b30a24029e40eb5364c7a26b2e.zip
[PATCH] moxa serial: add proper capability check
This requires the proper capabilities for the moxa bios update ioctl's. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/moxa.c')
-rw-r--r--drivers/char/moxa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index 5e3ef5522194..f43c2e04eadd 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -1649,6 +1649,8 @@ int MoxaDriverIoctl(unsigned int cmd, unsigned long arg, int port)
case MOXA_FIND_BOARD:
case MOXA_LOAD_C320B:
case MOXA_LOAD_CODE:
+ if (!capable(CAP_SYS_RAWIO))
+ return -EPERM;
break;
}