From: Alan Cox Date: Fri, 8 Feb 2008 12:18:45 +0000 (-0800) Subject: rocket: don't let random users reset the controller X-Git-Tag: v2.6.25-rc1~249 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=4129a6454dd925560bf3f46a12eb9f01cf8d5e7e;p=linux-2.6-omap-h63xx.git rocket: don't let random users reset the controller Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c index cbee71bab01..72f289279d8 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)