X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fnet%2Ftun.c;h=a1ed2d9837402a31f6f46d90b4ae4c49bbd3e485;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=329d9feb9b8934717bf817c06822bb8f6f9345ce;hpb=41689045f6a3cbe0550e1d34e9cc20d2e8c432ba;p=linux-2.6.git diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 329d9feb9..a1ed2d983 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -39,6 +39,7 @@ #define DRV_DESCRIPTION "Universal TUN/TAP device driver" #define DRV_COPYRIGHT "(C) 1999-2004 Max Krasnyansky " +#include #include #include #include @@ -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 */