From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GYeBf-0006Hh-L7 for qemu-devel@nongnu.org; Sat, 14 Oct 2006 03:44:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GYeBb-00068i-NH for qemu-devel@nongnu.org; Sat, 14 Oct 2006 03:44:00 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GYeBa-00067j-IY for qemu-devel@nongnu.org; Sat, 14 Oct 2006 03:43:58 -0400 Received: from [212.227.126.183] (helo=moutng.kundenserver.de) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GYeKD-0007Y0-3a for qemu-devel@nongnu.org; Sat, 14 Oct 2006 03:52:53 -0400 Date: Sat, 14 Oct 2006 09:47:06 +0200 From: chris friedhoff Subject: Re: [Qemu-devel] qemu and kernel 2.6.18 Message-Id: <20061014094706.a59e3e33.chris@friedhoff.org> In-Reply-To: <9b0d5f320610131000x744ce6cagd549f4ec0e1ac9f7@mail.gmail.com> References: <9b0d5f320610131000x744ce6cagd549f4ec0e1ac9f7@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Sat__14_Oct_2006_09_47_06_+0200_egIdlqIR4w05SWQ2" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --Multipart=_Sat__14_Oct_2006_09_47_06_+0200_egIdlqIR4w05SWQ2 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hello, bringing up the tun/tap interface depends now on the capability CAP_NET_ADMIN, which usually only root has. This patch just removes this dependency, so normal user rights suffices again to bring up the tun/tap interface. diff -ruN linux-2.6.18-orig/drivers/net/tun.c linux-2.6.18/drivers/net/tun.c --- linux-2.6.18-orig/drivers/net/tun.c 2006-09-20 05:42:06.000000000 +0200 +++ linux-2.6.18/drivers/net/tun.c 2006-10-02 09:21:52.000000000 +0200 @@ -489,9 +489,6 @@ err = -EINVAL; - if (!capable(CAP_NET_ADMIN)) - return -EPERM; - /* Set dev type */ if (ifr->ifr_flags & IFF_TUN) { /* TUN device */ chris ###################################### On Fri, 13 Oct 2006 13:00:10 -0400 WaxDragon wrote: > This came up in IRC a few days ago, it seems you need to use the UML > util 'tunctl' to assign permissions to the tap device. I found this > change annoying. > > On 10/13/06, G Portokalidis wrote: > > Hello all, > > I have recently installed the latest linux kernel, and i have been > > having problems with the tap interface since. > > > > I have been getting the following cryptic message: > > warning: could not configure /dev/net/tun: no virtual network emulation > > Could not initialize device 'tap' > > > > The tun driver is loaded, and /dev/net/tun is 'rw'. > > Any ideas what this is about? Could i have misconfigured something in > > the kernel? > > > > Cheers, > > George > > > > > > _______________________________________________ > > Qemu-devel mailing list > > Qemu-devel@nongnu.org > > http://lists.nongnu.org/mailman/listinfo/qemu-devel > > > > > -- > 22:38 <@WaxDragon> false ^ true > 22:39 < false> :( > 22:39 < false> dont you think you can XOR me and get away with it! I > always return! > > > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://lists.nongnu.org/mailman/listinfo/qemu-devel -------------------- Chris Friedhoff chris@friedhoff.org --Multipart=_Sat__14_Oct_2006_09_47_06_+0200_egIdlqIR4w05SWQ2 Content-Type: application/octet-stream; name="2.6.18-tun-without-cap_net_admin-capability.patch.bz2" Content-Disposition: attachment; filename="2.6.18-tun-without-cap_net_admin-capability.patch.bz2" Content-Transfer-Encoding: base64 QlpoOTFBWSZTWTEsFNAAAIRfgAIwYX/3e28nXwC/pd9oMAD2WwinqTR4oeppppoBoyYjIyep5IMM oGoU/Qpp5NIANNNAeoDINGhoAKqnqJkyTNJtTNT1DINAAAA0xHAmnI6DoNODgfiKzJHXcmtASmA1 VAoDhI2XuqxHVLfwtXfbHFl13Z+Bmia+uTKV0slqWTcRZuthPRZDnRPlggtMrQ/L6M5vmIp0ypUN KVksVzum9NFApLyMECELeeBKEvOaABgCwUQSGXWrn4xQ6QjFTTNnmKCY0pyHSVSvbBNnEhBMDjfw MonP1YtFvMA+rzBuQAGKbs9jV5lethfUWwZKalHJ/VMJBg12E2gsMRzK9tFSvaxmD9kVfNJNIwkY pviRmL2MiovUf4u5IpwoSBiWCmgA --Multipart=_Sat__14_Oct_2006_09_47_06_+0200_egIdlqIR4w05SWQ2--