[PATCH] moxa serial: add proper capability check

This requires the proper capabilities for the moxa bios update ioctl's.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
This commit is contained in:
Alan Cox
2006-01-09 09:35:28 -05:00
committed by Chris Wright
parent 7abeff5a23
commit f72e024e3a
+2
View File
@@ -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;
}