mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] rocket: Don't let random users reset the controller
@ 2007-11-19 14:57 Alan Cox
  0 siblings, 0 replies; only message in thread
From: Alan Cox @ 2007-11-19 14:57 UTC (permalink / raw)
  To: linux-kernel, akpm

Signed-off-by: Alan Cox <alan@redhat.com>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.24-rc2-mm1/drivers/char/rocket.c linux-2.6.24-rc2-mm1/drivers/char/rocket.c
--- linux.vanilla-2.6.24-rc2-mm1/drivers/char/rocket.c	2007-11-16 17:55:11.000000000 +0000
+++ linux-2.6.24-rc2-mm1/drivers/char/rocket.c	2007-11-16 18:20:23.000000000 +0000
@@ -1401,6 +1399,9 @@
 {
 	int reset;
 
+	if (!capable(CAP_SYS_ADMIN))
+		return -EPERM;
+
 	if (copy_from_user(&reset, arg, sizeof (int)))
 		return -EFAULT;
 	if (reset)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-11-19 14:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-19 14:57 [PATCH] rocket: Don't let random users reset the controller Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®