Commit 49cd619c69d643b30a24029e40eb5364c7a26b2e

Authored by Alan Cox
Committed by Linus Torvalds
1 parent 19dbaf6f6f

[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>

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

... ... @@ -1649,6 +1649,8 @@
1649 1649 case MOXA_FIND_BOARD:
1650 1650 case MOXA_LOAD_C320B:
1651 1651 case MOXA_LOAD_CODE:
  1652 + if (!capable(CAP_SYS_RAWIO))
  1653 + return -EPERM;
1652 1654 break;
1653 1655 }
1654 1656