linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / net / tun.c
index 329d9fe..a1ed2d9 100644 (file)
@@ -39,6 +39,7 @@
 #define DRV_DESCRIPTION        "Universal TUN/TAP device driver"
 #define DRV_COPYRIGHT  "(C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>"
 
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
@@ -489,9 +490,6 @@ static int tun_set_iff(struct file *file, struct ifreq *ifr)
 
                err = -EINVAL;
 
-               if (!capable(CAP_NET_ADMIN))
-                       return -EPERM;
-
                /* Set dev type */
                if (ifr->ifr_flags & IFF_TUN) {
                        /* TUN device */
@@ -779,6 +777,7 @@ static struct miscdevice tun_miscdev = {
        .minor = TUN_MINOR,
        .name = "tun",
        .fops = &tun_fops,
+       .devfs_name = "net/tun",
 };
 
 /* ethtool interface */