Your message dated Sat, 25 Jul 2009 10:47:09 +0000 with message-id <E1MUemT-0005E4-W6@ries.debian.org> and subject line Bug#536787: fixed in didiwiki 0.5-8 has caused the Debian Bug report #536787, regarding didiwiki: option to bind only to loopback or to specific ip 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 this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org immediately.) -- 536787: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=536787 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
--- Begin Message ---Package: didiwiki
- To: submit@bugs.debian.org
- Subject: didiwiki: option to bind only to loopback or to specific ip
- From: Carlo Mandelli <camandel@gmail.com>
- Date: Mon, 13 Jul 2009 16:23:09 +0200
- Message-id: <[🔎] 7749cd800907130723y206c6bd6y2c8909cbc005261a@mail.gmail.com>
Version: 0.5-6
Severity: wishlist
*** Please type your report below this line ***
didiwiki listens on any ip address (0.0.0.0). It would be useful an option to bind it only to loopback or to a specific ip address.
The patch attached adds this option:
- "-l": only to localhost
- "-l <ip>": only to specific ip
- no option (default): to any ip
Carlo
-- System Information:
Debian Release: 5.0.2
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.26-2-686 (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/bash
Versions of packages didiwiki depends on:
ii adduser 3.110 add and remove users and groups
ii libc6 2.7-18 GNU C Library: Shared libraries
didiwiki recommends no packages.
didiwiki suggests no packages.
-- no debconf information
--- didi.c.orig 2009-07-13 09:11:42.000000000 +0200 +++ didi.c 2009-07-13 14:57:39.000000000 +0200 @@ -12,6 +12,7 @@ main(int argc, char **argv) { HttpRequest *req = NULL; + char *address = "0.0.0.0"; int port = 8000; int c; char *didiwiki_home = NULL; @@ -22,16 +23,17 @@ { static struct option long_options[] = { - {"debug", no_argument, 0, 'd'}, - {"port", required_argument, 0, 'p'}, - {"home", required_argument, 0, 'h'}, + {"debug", no_argument, 0, 'd'}, + {"listen", optional_argument, 0, 'l'}, + {"port", required_argument, 0, 'p'}, + {"home", required_argument, 0, 'h'}, {0, 0, 0, 0} }; /* getopt_long stores the option index here */ int option_index = 0; - c = getopt_long (argc, argv, "dp:h:", long_options, &option_index); + c = getopt_long (argc, argv, "dl::p:h:", long_options, &option_index); /* detect the end of the options */ if (c == -1) @@ -46,6 +48,17 @@ debug = 1; break; + case 'l': + if (optarg == NULL) + address = "127.0.0.1"; + else + { + unsigned int n1,n2,n3,n4; + if (sscanf(optarg,"%u.%u.%u.%u", &n1, &n2, &n3, &n4) == 4 && n1 <= 255 && n2 <= 255 && n3 <= 255 && n4 <= 255) + address = optarg; + } + break; + case 'p': port = atoi(optarg); break; @@ -66,7 +79,7 @@ req = http_request_new(); /* reads request from stdin */ } else { - req = http_server(port); /* forks here */ + req = http_server(address,port); /* forks here */ } wiki_handle_http_request(req); --- http.h.orig 2009-07-13 09:11:36.000000000 +0200 +++ http.h 2009-07-13 14:26:59.000000000 +0200 @@ -6,7 +6,7 @@ typedef struct HttpRequestParam HttpRequestParam; HttpRequest* -http_server(int iPort); +http_server(char *address, int iPort); HttpRequest* http_request_new(void); --- http.c.orig 2009-07-13 09:11:27.000000000 +0200 +++ http.c 2009-07-13 14:28:03.000000000 +0200 @@ -443,7 +443,7 @@ ** Implement an HTTP server daemon. */ HttpRequest* -http_server(int iPort) +http_server(char *address, int iPort) { int listener; /* The server socket */ int connection; /* A socket for each connection */ @@ -457,7 +457,7 @@ memset(&inaddr, 0, sizeof(inaddr)); inaddr.sin_family = AF_INET; - inaddr.sin_addr.s_addr = INADDR_ANY; + inaddr.sin_addr.s_addr = inet_addr(address); inaddr.sin_port = htons(iPort); listener = socket(AF_INET, SOCK_STREAM, 0);
--- End Message ---
--- Begin Message ---
- To: 536787-close@bugs.debian.org
- Subject: Bug#536787: fixed in didiwiki 0.5-8
- From: Ignace Mouzannar <mouzannar@gmail.com>
- Date: Sat, 25 Jul 2009 10:47:09 +0000
- Message-id: <E1MUemT-0005E4-W6@ries.debian.org>
Source: didiwiki Source-Version: 0.5-8 We believe that the bug you reported is fixed in the latest version of didiwiki, which is due to be installed in the Debian FTP archive: didiwiki_0.5-8.diff.gz to pool/main/d/didiwiki/didiwiki_0.5-8.diff.gz didiwiki_0.5-8.dsc to pool/main/d/didiwiki/didiwiki_0.5-8.dsc didiwiki_0.5-8_amd64.deb to pool/main/d/didiwiki/didiwiki_0.5-8_amd64.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 536787@bugs.debian.org, and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Ignace Mouzannar <mouzannar@gmail.com> (supplier of updated didiwiki 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 ftpmaster@debian.org) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Format: 1.8 Date: Mon, 20 Jul 2009 19:19:25 +0200 Source: didiwiki Binary: didiwiki Architecture: source amd64 Version: 0.5-8 Distribution: unstable Urgency: low Maintainer: Ignace Mouzannar <mouzannar@gmail.com> Changed-By: Ignace Mouzannar <mouzannar@gmail.com> Description: didiwiki - simple wiki implementation with built-in webserver Closes: 486285 531177 536787 Changes: didiwiki (0.5-8) unstable; urgency=low . * New maintainer (Closes: #531177) * Added access log support using syslog. Patch provided by Carlo Mandelli <camandel@gmail.com> (Closes: #486285) * Added the possibility to bind to an IP address other than the default "0.0.0.0" using the -l or --listen flags. Patch based on initial work provided by Carlo Mandelli <camandel@gmail.com> (Closes: #536787) * Completed the usage() function to print a user friendly help message * Added the --help flag that displays the usage() message * Added SIGINT and SIGTERM handlers in order to stop didiwiki cleanly and log the events * Updated the man page including the new features listed above * Corrected a compilation warning: "pointer targets in passing argument 3 of ‘...’ differ in signedness" (http.c:228 and http.c:510) Checksums-Sha1: b3d3848ff76ea5e5e80bf3c46633b29c0de9026f 986 didiwiki_0.5-8.dsc 5b1c5e66823e46c3bedbd54101957b3788f67616 11966 didiwiki_0.5-8.diff.gz 4ed65d986833dde3b1128d4c8884464acf9a039e 29668 didiwiki_0.5-8_amd64.deb Checksums-Sha256: af2a2bb017d80cee3532313a356c7afa9625b915fa52d571277114536b5bb7d2 986 didiwiki_0.5-8.dsc b56a47e49c2457a8862cb369a6e20bbde60ee5c00e2fb7faa1acfbe712feaed6 11966 didiwiki_0.5-8.diff.gz f7407cac89829d224db9889c65797f50bd16bd87c470abfde0f337fdc20bcd26 29668 didiwiki_0.5-8_amd64.deb Files: bf1770cc8109c2af2f33db867795faa6 986 web optional didiwiki_0.5-8.dsc b403894b49b253702a7fb17a596af19a 11966 web optional didiwiki_0.5-8.diff.gz 2ff1369d4a9a8eb19fa9474fe64e6b4d 29668 web optional didiwiki_0.5-8_amd64.deb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Signed by Ana Guerrero iEYEARECAAYFAkpq3UsACgkQn3j4POjENGGg5QCfcRfugp5cZqtGEgF2tda+gX3y bS8An2LGIkSk3aGSydNoAXrF/4Anf1sV =ErZY -----END PGP SIGNATURE-----
--- End Message ---