[PATCH] moxa.c: s/suser/capable/ and micro cleanup

From: Arnaldo Carvalho de Melo (acme@conectiva.com.br)
Date: Thu Aug 24 2000 - 19:14:56 EST


Hi,
        
        Please consider applying.

                        - Arnaldo

--- linux-2.4.0-test7/drivers/char/moxa.c Wed May 3 05:45:18 2000
+++ linux-2.4.0-test7.acme/drivers/char/moxa.c Thu Aug 24 21:13:12 2000
@@ -410,7 +410,6 @@
         MoxaDriverInit();
         printk("Tty devices major number = %d, callout devices major number = %d\n", ttymajor, calloutmajor);
 
- ret1 = 0;
         ret2 = 0;
         if ((ret1 = tty_register_driver(&moxaDriver))) {
                 printk(KERN_ERR "Couldn't install MOXA Smartio family driver !\n");
@@ -2775,7 +2774,7 @@
             (new_serial.baud_base != 921600))
                 return (-EPERM);
 
- if (!suser()) {
+ if (!capable(CAP_SYS_ADMIN)) {
                 if (((new_serial.flags & ~ASYNC_USR_MASK) !=
                      (info->asyncflags & ~ASYNC_USR_MASK)))
                         return (-EPERM);
-
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:15 EST