From 49cd619c69d643b30a24029e40eb5364c7a26b2e Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 9 Jan 2006 09:35:28 -0500 Subject: [PATCH] moxa serial: add proper capability check This requires the proper capabilities for the moxa bios update ioctl's. Signed-off-by: Linus Torvalds --- drivers/char/moxa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c index 5e3ef552219..f43c2e04ead 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; } -- cgit v1.2.3-70-g09d2