]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
rocket: don't let random users reset the controller
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 8 Feb 2008 12:18:45 +0000 (04:18 -0800)
committerLinus 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

index cbee71bab01787102245fc8fa86a74a797898b11..72f289279d8ff0af1c2601d0fb68197faaede9f4 100644 (file)
@@ -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)