Project

General

Profile

Bug #2783

gethostbyname deprecated, should use getaddrinfo

Added by stbuehler 2 months ago. Updated about 1 month ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
core
Target version:
Start date:
2017-01-14
Due date:
% Done:

100%

Missing in 1.5.x:

Description

rpmlint results from https://build.opensuse.org/package/show/home:stbuehler:lighttpd-1.4.x/lighttpd:

lighttpd.x86_64: I: binary-or-shlib-calls-gethostbyname /usr/lib64/lighttpd/mod_scgi.so
lighttpd.x86_64: I: binary-or-shlib-calls-gethostbyname /usr/lib64/lighttpd/mod_fastcgi.so
lighttpd.x86_64: I: binary-or-shlib-calls-gethostbyname /usr/sbin/lighttpd
The binary calls gethostbyname(). Please port the code to use getaddrinfo().

Associated revisions

Revision 8981ca04 (diff)
Added by gstrauss about 2 months ago

[core] use getaddrinfo,inet_pton vs gethostbyname (fixes #2783)

when available, use getaddrinfo(),inet_pton() instead of gethostbyname()

NOTE: behavior change: mod_scgi now listens to INADDR_LOOPBACK if "host"
is not specified. (Prior behavior was INADDR_ANY.) Backends
should not listen on potentially public IPs unless explicitly
configured to do so. This change matches a change to mod_fastcgi
made in 2008.

x-ref
"gethostbyname deprecated, should use getaddrinfo"
https://redmine.lighttpd.net/issues/2783

History

#1 Updated by gstrauss 2 months ago

will use inet_pton(), where available, for the IPv4 hosts, too.

#2 Updated by gstrauss 2 months ago

  • Category set to core

#3 Updated by gstrauss 2 months ago

network.c will need to be updated to use getaddrinfo(), where available, for IPv4, in addition to IPv6.
mod_fastcgi.c and mod_scgi.c can use inet_pton(), where available, as they operate on IPs.

#4 Updated by gstrauss 2 months ago

  • Status changed from New to Patch Pending

#5 Updated by gstrauss about 1 month ago

  • Status changed from Patch Pending to Fixed
  • % Done changed from 0 to 100

Also available in: Atom