[PATCH] console.c: s/suser/capable/

From: Arnaldo Carvalho de Melo (acme@conectiva.com.br)
Date: Wed Aug 30 2000 - 18:43:40 EST


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/



This archive was generated by hypermail 2b29 : Thu Aug 31 2000 - 21:00:26 EST