diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2008-02-08 12:18:45 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 17:22:25 (GMT) |
commit | 4129a6454dd925560bf3f46a12eb9f01cf8d5e7e (patch) | |
tree | 1bbd53a877bdfda744697c09ab44ec8db0420edf /drivers/char/rocket.c | |
parent | 6df3526b6649e57a414ba6b4179655341affcf46 (diff) | |
download | linux-4129a6454dd925560bf3f46a12eb9f01cf8d5e7e.tar.xz |
rocket: don't let random users reset the controller
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>
Diffstat (limited to 'drivers/char/rocket.c')
-rw-r--r-- | drivers/char/rocket.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c index cbee71b..72f2892 100644 --- 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) |