[pkg-lighttpd] Bug#632723: fails to bind on any other port than 80 if use-ipv6.pl is enabled

Riccardo Setti giskard at debian.org
Tue Jul 5 11:08:23 UTC 2011


Package: lighttpd
Version: 1.4.28-5
Severity: important
Tags: patch

Hi,

if you specify a different port via the 'server.port' directive in lighttpd.conf
use-ipv6.pl 'shell script', enabled by default,  will overwrite it to the default value: 80.

I wrote a simple patch that should fix the problem http://paste.debian.net/121948/

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.39-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages lighttpd depends on:
ii  libattr1                1:2.4.46-2       Extended attribute shared library
ii  libbz2-1.0              1.0.5-6          high-quality block-sorting file co
ii  libc6                   2.13-10          Embedded GNU C Library: Shared lib
ii  libfam0                 2.7.0-17         Client library to control the FAM 
ii  libldap-2.4-2           2.4.25-1.1       OpenLDAP libraries
ii  libpcre3                8.12-3           Perl 5 Compatible Regular Expressi
ii  libssl1.0.0             1.0.0d-3         SSL shared libraries
ii  libterm-readline-perl-p 1.0303-1         Perl implementation of Readline li
ii  lsb-base                3.2-27           Linux Standard Base 3.2 init scrip
ii  mime-support            3.51-1           MIME files 'mime.types' & 'mailcap
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

Versions of packages lighttpd recommends:
ii  spawn-fcgi                    1.6.3-1    A fastcgi process spawner

Versions of packages lighttpd suggests:
pn  apache2-utils                 <none>     (no description available)
ii  openssl                       1.0.0d-3   Secure Socket Layer (SSL) binary a
pn  rrdtool                       <none>     (no description available)

-- Configuration Files:
/etc/lighttpd/lighttpd.conf changed:
server.port		    = 3000
server.modules = (
	"mod_access",
	"mod_alias",
	"mod_compress",
 	"mod_redirect",
)
server.document-root        = "/var/www"
server.upload-dirs          = ( "/var/cache/lighttpd/uploads" )
server.errorlog             = "/var/log/lighttpd/error.log"
server.pid-file             = "/var/run/lighttpd.pid"
server.username             = "www-data"
server.groupname            = "www-data"
index-file.names            = ( "index.php", "index.html", "index.lighttpd.html" )
url.access-deny             = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
compress.cache-dir          = "/var/cache/lighttpd/compress/"
compress.filetype           = ( "application/javascript", "text/css", "text/html", "text/plain" )
include_shell "/usr/share/lighttpd/use-ipv6.pl"
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"


-- no debconf information
-------------- next part --------------
--- /usr/share/lighttpd/use-ipv6.pl-REAL	2011-07-05 11:40:36.367505387 +0100
+++ /usr/share/lighttpd/use-ipv6.pl-GISKARD	2011-07-05 11:40:40.743927363 +0100
@@ -3,6 +3,17 @@
 use Socket;
 my $sock;
 
+open(CFG, '/etc/lighttpd/lighttpd.conf');
+while(<CFG>)
+{
+     my $line = $_;
+     chomp($line);
+     
+     if ($line =~ m/^server.port\s+=\s+(\d+)/){
+	  $port = $1;	 
+     }   
+ }
+
 if (socket($sock, AF_INET6, SOCK_STREAM, 0)) {
-    print qq/\$SERVER["socket"] == "[::]:80" { }\n/;
+    print qq/\$SERVER["socket"] == "[::]:$port" { }\n/;
 }


More information about the pkg-lighttpd-maintainers mailing list