]> err.no Git - linux-2.6/blobdiff - drivers/net/tun.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
[linux-2.6] / drivers / net / tun.c
index a1ed2d9837402a31f6f46d90b4ae4c49bbd3e485..6c62d5c882683f09267e06e9dade80f1cfb9482d 100644 (file)
@@ -490,6 +490,9 @@ 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 */