Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4129a6454dd925560bf3f46a12eb9f01cf8d5e7e Commit: 4129a6454dd925560bf3f46a12eb9f01cf8d5e7e Parent: 6df3526b6649e57a414ba6b4179655341affcf46 Author: Alan Cox <[EMAIL PROTECTED]> AuthorDate: Fri Feb 8 04:18:45 2008 -0800 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Fri Feb 8 09:22:25 2008 -0800
rocket: don't let random users reset the controller Signed-off-by: Alan Cox <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- 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) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html