From 6ff56a96bd475b1504fc1fd38d97294e52cda34a Mon Sep 17 00:00:00 2001 From: Rodrigo Tobar Date: Mon, 11 Oct 2021 22:43:46 +0800 Subject: [PATCH] strace: Show sun_path on AF_UNIX socket addresses --- Userland/Utilities/strace.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Userland/Utilities/strace.cpp b/Userland/Utilities/strace.cpp index 8186b77293..8491b5cf0e 100644 --- a/Userland/Utilities/strace.cpp +++ b/Userland/Utilities/strace.cpp @@ -518,6 +518,11 @@ struct Formatter : StandardFormatter { ", sin_port={}, sin_addr={}", address_in->sin_port, IPv4Address(address_in->sin_addr.s_addr).to_string()); + } else if (address.sa_family == AF_UNIX) { + auto* address_un = (const struct sockaddr_un*)&address; + builder.appendff( + ", sun_path={}", + address_un->sun_path); } builder.append('}'); }