projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6df3526
)
rocket: don't let random users reset the controller
author
Alan Cox
<alan@lxorguk.ukuu.org.uk>
Fri, 8 Feb 2008 12:18:45 +0000
(
04:18
-0800)
committer
Linus Torvalds
<torvalds@woody.linux-foundation.org>
Fri, 8 Feb 2008 17:22:25 +0000
(09:22 -0800)
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/rocket.c
patch
|
blob
|
history
diff --git
a/drivers/char/rocket.c
b/drivers/char/rocket.c
index cbee71bab01787102245fc8fa86a74a797898b11..72f289279d8ff0af1c2601d0fb68197faaede9f4 100644
(file)
--- a/
drivers/char/rocket.c
+++ b/
drivers/char/rocket.c
@@
-1399,6
+1399,9
@@
static int reset_rm2(struct r_port *info, void __user *arg)
{
int reset;
+ if (!capable(CAP_SYS_ADMIN))
+ return -EPERM;
+
if (copy_from_user(&reset, arg, sizeof (int)))
return -EFAULT;
if (reset)