lkml.org 
[lkml]   [2000]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] console.c: s/suser/capable/
Linus,

Please consider applying.

- Arnaldo

--- linux-2.4.0-test8-pre1/drivers/char/console.c Thu Aug 10 10:14:23 2000
+++ linux-2.4.0-test8-pre1.acme/drivers/char/console.c Wed Aug 30 20:41:14 2000
@@ -69,6 +69,9 @@
*
* Removed old-style timers, introduced console_timer, made timer
* deletion SMP-safe. 17Jun00, Andrew Morton <andrewm@uow.edu.au>
+ *
+ * Removed the last suser calls, use capable instead
+ * August 30, 2000 - Arnaldo Carvalho de Melo <acme@conectiva.com.br>
*/

#include <linux/module.h>
@@ -2171,7 +2174,7 @@

if (tty->driver.type != TTY_DRIVER_TYPE_CONSOLE)
return -EINVAL;
- if (current->tty != tty && !suser())
+ if (current->tty != tty && !capable(CAP_SYS_ADMIN))
return -EPERM;
if (get_user(type, (char *)arg))
return -EFAULT;
@@ -2203,7 +2206,7 @@
set_vesa_blanking(arg);
return 0;
case 11: /* set kmsg redirect */
- if (!suser())
+ if (!capable(CAP_SYS_ADMIN))
return -EPERM;
if (get_user(data, (char *)arg+1))
return -EFAULT;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.025 / U:1.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site