/dev/tun* are already owned by root and mode 0600 by default, so it
seems redundant to check suser() in tunopen().

ok?

Index: if_tun.c
===================================================================
RCS file: /cvs/src/sys/net/if_tun.c,v
retrieving revision 1.107
diff -u -p -r1.107 if_tun.c
--- if_tun.c    8 Jul 2010 08:40:29 -0000       1.107
+++ if_tun.c    22 Sep 2010 01:27:22 -0000
@@ -343,9 +343,6 @@ tunopen(dev_t dev, int flag, int mode, s
        struct ifnet            *ifp;
        int                      error, s;
 
-       if ((error = suser(p, 0)) != 0)
-               return (error);
-
        if ((tp = tun_lookup(minor(dev))) == NULL) {    /* create on demand */
                char    xname[IFNAMSIZ];

Reply via email to