CVSROOT: /cvs Module name: src Changes by: mes...@cvs.openbsd.org 2017/01/17 16:28:04
Modified files: libexec/spamd : spamd.c Log message: - spamd(8)'s -l accepts an IP address as argument to bind(2) and it calls inet_pton(3) to check if it's valid and since that function doesn't provide a proper errno (POSIX doesn't mandate to do so) then if a string is given we may get this message: spamd: inet_pton: Undefined error: 0 - Instead replace that code to use getaddrinfo(3) from which is possible to get a proper error message, and at the same time being able to parse IPs and hostnames (if either the IP or host is not local then the next bind(2) will fail) - By default without arguments, spamd(8) will still bind(2) to 127.0.0.1 as it did before With feedback from deraadt@ and OK beck@