mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-04-12 12:18:02 +07:00
[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>
This commit is contained in:
parent
19dbaf6f6f
commit
49cd619c69
@ -1649,6 +1649,8 @@ int MoxaDriverIoctl(unsigned int cmd, unsigned long arg, int port)
|
|||||||
case MOXA_FIND_BOARD:
|
case MOXA_FIND_BOARD:
|
||||||
case MOXA_LOAD_C320B:
|
case MOXA_LOAD_C320B:
|
||||||
case MOXA_LOAD_CODE:
|
case MOXA_LOAD_CODE:
|
||||||
|
if (!capable(CAP_SYS_RAWIO))
|
||||||
|
return -EPERM;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user