Package: nbd-server Version: 1:3.1.1-1 Severity: important Tags: patch X-Debbugs-CC: alk...@gmail.com
I just checked an nbd bug report by Alkis Georgopoulos in launchpad, and figured I'd confirm it on Debian: https://bugs.launchpad.net/ubuntu/+source/nbd/+bug/1009393 Yup. Same problem on Debian. When specifying authfile in /etc/nbd-server/conf.d/ltsp_i386.conf: [/opt/ltsp/i386] exportname = /opt/ltsp/images/i386.img readonly = true authfile = /etc/ltsp/nbd-server.allow Where /etc/ltsp-nbd-server.allow contains: 10.0.0.0/8 169.254.0.0/16 172.16.0.0/12 192.168.0.0/16 I get a refused connection in /var/log/syslog: Jun 8 11:06:53 mule nbd_server[29817]: connect from 192.168.67.103, assigned file is /opt/ltsp/images/i386.img Jun 8 11:06:53 mule nbd_server[29817]: Unauthorized client With the following patch from Alkis, it works fine as far as I can tell: === modified file 'nbd-server.c' --- nbd-server.c 2012-06-08 18:11:43 +0000 +++ nbd-server.c 2012-06-08 18:12:01 +0000 @@ -335,11 +335,11 @@ return 0; } len=strtol(tmp, NULL, 0); + addr.s_addr<<=32-len; addr.s_addr>>=32-len; - addr.s_addr<<=32-len; memcpy(&cltemp,&client,sizeof(client)); + cltemp.s_addr<<=32-len; cltemp.s_addr>>=32-len; - cltemp.s_addr<<=32-len; if(addr.s_addr == cltemp.s_addr) { return 1; } live well, vagrant -- System Information: Debian Release: wheezy/sid APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'testing'), (500, 'stable'), (120, 'unstable'), (110, 'experimental') Architecture: i386 (i686) Kernel: Linux 3.2.0-2-686-pae (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages nbd-server depends on: ii adduser 3.113+nmu2 ii debconf [debconf-2.0] 1.5.43 ii libc6 2.13-32 ii libglib2.0-0 2.32.3-1 ii ucf 3.0025+nmu3 nbd-server recommends no packages. nbd-server suggests no packages. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org