Avoid /etc/services in whois command

Apparently IANA has abolished the WHOIS protocol and no longer lists it
as a service. Therefore distros which naively create /etc/services from
IANA's braindead recommendation will inadvertently break any tools that
rely on /etc/services to determine this well-known Internet port.
This commit is contained in:
Justine Tunney 2023-06-06 00:11:41 -07:00
parent eb40cb371d
commit e9e8bbe6da
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
2 changed files with 3 additions and 5 deletions

View file

@ -70,7 +70,7 @@ asm(".include \"libc/disclaimer.inc\"");
#define RNICHOST "whois.ripe.net"
#define VNICHOST "whois.verisign-grs.com"
#define DEFAULT_PORT "whois"
#define DEFAULT_PORT "43" // IANA abolished WHOIS lool; avoid /etc/services
#define WHOIS_RECURSE 0x01
#define WHOIS_QUICK 0x02

View file

@ -254,10 +254,8 @@ relegated void __oncrash_arm64(int sig, struct siginfo *si, void *arg) {
addend = pc - st->addr_base;
addend -= st->symbols[symbol].x;
Append(b, " ");
if (!AppendFileLine(b, addr2line, debugbin, pc)) {
Append(b, "%s", __get_symbol_name(st, symbol));
if (addend) Append(b, "%+d", addend);
}
Append(b, "%s", __get_symbol_name(st, symbol));
if (addend) Append(b, "%+d", addend);
}
Append(b, "\n");