Package: portreserve
Version: 0.0.0-3
Severity: normal
Tags: patch
If a configuration file specifies the port to reserve by number, rather
than by name, the port lookup then fails, becayse the reserve() function
fails to run htons() on the supplied port number.
The supplied patch fixes the problem.
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.22.6deskpro
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages portreserve depends on:
ii libc6 2.3.6.ds1-13etch2 GNU C Library: Shared libraries
portreserve recommends no packages.
-- no debconf information
--
The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.
--- portreserve.c 2007-09-20 10:03:28.630129403 +0100
+++ portreserve.c.orig 2007-09-20 10:03:01.627777374 +0100
@@ -131,7 +131,7 @@
int port = strtol (service, &endptr, 10);
if (service == endptr)
return -1;
- serv = getservbyport (htons(port), NULL);
+ serv = getservbyport (port, NULL);
if (!serv)
return -1;
}