Commit f72e024e authored by Alan Cox's avatar Alan Cox Committed by Chris Wright

[PATCH] moxa serial: add proper capability check

This requires the proper capabilities for the moxa bios update ioctl's.
Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
parent 7abeff5a
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment