On Wed, Mar 18, 2015 at 3:25 PM, M. Dietrich <m...@emdete.de> wrote: > Package: vpnc > Version: 0.5.3r550-2 > Severity: important > > the vpn can't be established with the message: > > vpnc-connect: can't initialise tunnel interface: Inappropriate ioctl > for device > > short investigation shows that in case /dev/net/tun does not exists vpnc > creates it with > > open("/dev/net/tun", O_RDWR|O_CREAT, 0666) = 3 >
Agree that what you found is bad. In vpnc code, file http://svn.unix-ag.uni-kl.de/vpnc/trunk/sysdep.c at line 439, there is if ((fd = open("/dev/net/tun", O_RDWR)) < 0) { that is correct. So the problem is somewhere else. During compile & linking, the open() with 2 arguments got the second changed to "O_RDWR|O_CREAT" and the third "0666" added. Or the Debian package adds a wrong patch to vpnc source code? I have tested on my Arch Linux box x86_64 with gcc-multilib 4.9.2-3 and glibc 2.21-2 the following code: #include <fcntl.h> int main() { return open("/dev/net/tun", O_RDWR); } Compiled then run with "strace" it correctly reports: open("/dev/net/tun", O_RDWR) = 3 Can you run the same test on your system? Antonio -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org