Your message dated Mon, 16 Oct 2006 15:06:32 -0700
with message-id <[EMAIL PROTECTED]>
and subject line Bug#374092: fixed in dhttpd 1.02a-16
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--- Begin Message ---
Package: dhttpd
Version: 1.02a-15
Severity: wishlist
Tags: patch
This patch adds -b option for binding to an alternate address.
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.8-12-amd64-k8
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL
set to en_US.UTF-8)
Versions of packages dhttpd depends on:
ii libc6 2.3.6-13 GNU C Library: Shared libraries
ii libgcc1 1:4.1.0-4 GCC support library
ii libstdc++6 4.1.0-4 The GNU Standard C++ Library v3
dhttpd recommends no packages.
-- no debconf information
diff -ur dhttpd-1.02a.old/debian/default dhttpd-1.02a/debian/default
--- dhttpd-1.02a.old/debian/default 2006-06-17 11:21:50.000000000 +0200
+++ dhttpd-1.02a/debian/default 2006-06-17 11:44:10.399171928 +0200
@@ -1,2 +1,2 @@
# Change this value to set options for dhttpd startup
-#OPTIONS="-p80"
+#OPTIONS="-p80 -b 0.0.0.0"
diff -ur dhttpd-1.02a.old/src/config.hh dhttpd-1.02a/src/config.hh
--- dhttpd-1.02a.old/src/config.hh 2006-06-17 11:21:50.000000000 +0200
+++ dhttpd-1.02a/src/config.hh 2006-06-17 11:35:45.791883896 +0200
@@ -11,6 +11,9 @@
* root, you must use a value >= 1024, such as 8080. */
#define DEFAULTPORT 80
+/* Set default address to listen to. (0.0.0.0 for any) */
+#define DEFAULTBINDADDR "0.0.0.0"
+
/* This is the directory where the web pages are located. */
/* Note: buffer overflow problems may exist if WEBDIRPREFIX is *
* longer than 150 characters or so. */
diff -ur dhttpd-1.02a.old/src/main.cc dhttpd-1.02a/src/main.cc
--- dhttpd-1.02a.old/src/main.cc 2006-06-17 11:21:50.000000000 +0200
+++ dhttpd-1.02a/src/main.cc 2006-06-17 11:41:51.657263904 +0200
@@ -99,11 +99,12 @@
{
int o;
int portnum = DEFAULTPORT;
+ char *bind_addr = DEFAULTBINDADDR;
bool nofork=false;
for( ;; )
{
- o = getopt( argc, argv, "p:hdr:" );
+ o = getopt( argc, argv, "p:b:hdr:" );
if( o==-1 )
{
break;
@@ -118,6 +119,7 @@
case 'h':
printf( "usage: %s [options]\n", argv[ 0 ] );
printf( " -p (port) Use a different port than the default of %i\n", DEFAULTPORT );
+ printf( " -b Bind to this address instead of ", DEFAULTBINDADDR, "\n" );
printf( " -h Help\n" );
printf( " -d Do not fork into Background on startup\n" );
return 0;
@@ -125,6 +127,9 @@
case 'p':
sscanf( optarg, "%i", &portnum );
break;
+ case 'b':
+ bind_addr = optarg;
+ break;
case 'r':
if ( strlen(optarg) > ROOT_MAX_LEN )
{
@@ -152,7 +157,7 @@
}
}
- ListenSocket listen_socket( portnum );
+ ListenSocket listen_socket( portnum, bind_addr );
pid_t pid;
int s;
diff -ur dhttpd-1.02a.old/src/socket.cc dhttpd-1.02a/src/socket.cc
--- dhttpd-1.02a.old/src/socket.cc 2006-06-17 11:21:50.000000000 +0200
+++ dhttpd-1.02a/src/socket.cc 2006-06-17 11:40:09.404808640 +0200
@@ -29,6 +29,7 @@
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/wait.h>
+#include <arpa/inet.h> /* inet_addr */
#include "socket.hh"
@@ -77,7 +78,7 @@
* ListenSocket::ListenSocket():
* Start up the socket listening routines
*/
-ListenSocket::ListenSocket( int port )
+ListenSocket::ListenSocket( int port, char *bind_addr )
{
int status;
struct sockaddr_in s_in;
@@ -87,7 +88,7 @@
one = 1;
memset( &s_in, 0, sizeof( s_in ) );
s_in.sin_family = AF_INET;
- s_in.sin_addr.s_addr = htonl( INADDR_ANY );
+ s_in.sin_addr.s_addr = inet_addr( bind_addr );
s_in.sin_port = htons( port );
sock = socket( AF_INET, SOCK_STREAM, 0 );
diff -ur dhttpd-1.02a.old/src/socket.hh dhttpd-1.02a/src/socket.hh
--- dhttpd-1.02a.old/src/socket.hh 2006-06-17 11:21:50.000000000 +0200
+++ dhttpd-1.02a/src/socket.hh 2006-06-17 11:32:55.627752776 +0200
@@ -43,6 +43,6 @@
int newsock();
int getfd() const { return sock; }
- ListenSocket( int port );
+ ListenSocket( int port, char *bind_addr );
~ListenSocket();
};
--- End Message ---
--- Begin Message ---
Source: dhttpd
Source-Version: 1.02a-16
We believe that the bug you reported is fixed in the latest version of
dhttpd, which is due to be installed in the Debian FTP archive:
dhttpd_1.02a-16.diff.gz
to pool/main/d/dhttpd/dhttpd_1.02a-16.diff.gz
dhttpd_1.02a-16.dsc
to pool/main/d/dhttpd/dhttpd_1.02a-16.dsc
dhttpd_1.02a-16_i386.deb
to pool/main/d/dhttpd/dhttpd_1.02a-16_i386.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Ola Lundqvist <[EMAIL PROTECTED]> (supplier of updated dhttpd package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Mon, 16 Oct 2006 21:24:45 +0200
Source: dhttpd
Binary: dhttpd
Architecture: source i386
Version: 1.02a-16
Distribution: unstable
Urgency: low
Maintainer: Ola Lundqvist <[EMAIL PROTECTED]>
Changed-By: Ola Lundqvist <[EMAIL PROTECTED]>
Description:
dhttpd - minimal secure webserver without cgi-bin support
Closes: 374092
Changes:
dhttpd (1.02a-16) unstable; urgency=low
.
* Added support for -b bind addr option, closes: #374092.
Thanks to Robert Millan <[EMAIL PROTECTED]> for this new feature.
Also thanks to Jarek Kamiski <[EMAIL PROTECTED]> for proofreading.
* Updated to standards version 3.7.2.
* Changed to debhelper compatibility version 4.
Files:
c372035f85ca34d68cf42331d0c31108 555 web optional dhttpd_1.02a-16.dsc
2a1044250a5a07e29224539885d93e6e 14575 web optional dhttpd_1.02a-16.diff.gz
3726b6b90580ba9c614c9ab0603cdf20 27686 web optional dhttpd_1.02a-16_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
iD8DBQFFM91cGKGxzw/lPdkRAjpOAJwPQv6W/PgQhZJkBWf7zJCn+tx01wCePGjN
JHWEj4ZGHLRKJe5SSy0VxRU=
=lh4k
-----END PGP SIGNATURE-----
--- End Message ---