From e9e8bbe6da8d5dd20442971bafd94afedf3daa31 Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Tue, 6 Jun 2023 00:11:41 -0700 Subject: [PATCH] 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. --- examples/whois.c | 2 +- libc/log/oncrash_arm64.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/examples/whois.c b/examples/whois.c index fbf960131..2d9a1c210 100644 --- a/examples/whois.c +++ b/examples/whois.c @@ -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 diff --git a/libc/log/oncrash_arm64.c b/libc/log/oncrash_arm64.c index b49a89528..9f22d3a51 100644 --- a/libc/log/oncrash_arm64.c +++ b/libc/log/oncrash_arm64.c @@ -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");