From f72e024e3a4705336b04109756bc619e7ae62fdb 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: Alan Cox Signed-off-by: Linus Torvalds Signed-off-by: Chris Wright --- drivers/char/moxa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c index 79e490ef2cf..68844439b59 100644 --- a/drivers/char/moxa.c +++ b/drivers/char/moxa.c @@ -1661,6 +1661,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-18-g5258