projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
19dbaf6
)
[PATCH] moxa serial: add proper capability check
author
Alan Cox
<alan@redhat.com>
Mon, 9 Jan 2006 14:35:28 +0000
(09:35 -0500)
committer
Linus Torvalds
<torvalds@g5.osdl.org>
Tue, 10 Jan 2006 17:45:36 +0000
(09:45 -0800)
This requires the proper capabilities for the moxa bios update ioctl's.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/char/moxa.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/char/moxa.c
b/drivers/char/moxa.c
index 5e3ef5522194d441758c006eb99ff34ef12b1703..f43c2e04eadd3878d57126b154afa2b4cbdc74aa 100644
(file)
--- a/
drivers/char/moxa.c
+++ b/
drivers/char/moxa.c
@@
-1649,6
+1649,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;
}