tailscale/hostinfo
Andrea Gottardo 05787423d2 hostinfo: use Foundation APIs to get hostname on macOS
Updates tailscale/corp#22332

This PR changes the way we determine the current hostname on Darwin && !iOS builds. We now use the native NSHost.currentHost API to get the hostname, instead of the os.Hostname() call which in Go uses `sysctl kern.hostname`. In Sequoia, this appears to always return `Mac.home`, (`home` comes from my LAN).

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
2024-08-14 13:58:58 -07:00
..
hostinfo_darwin.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
hostinfo_freebsd.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
hostinfo_linux_test.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
hostinfo_linux.go hostinfo: set Hostinfo.PackageType for mkctr container builds 2024-07-17 11:26:16 -07:00
hostinfo_test.go hostinfo: use Foundation APIs to get hostname on macOS 2024-08-14 13:58:58 -07:00
hostinfo_uname.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
hostinfo_windows.go hostinfo: update Windows hostinfo to include MSIDist registry value 2024-06-18 10:19:00 -06:00
hostinfo.go hostinfo: use Foundation APIs to get hostname on macOS 2024-08-14 13:58:58 -07:00
hostname_macos.go hostinfo: use Foundation APIs to get hostname on macOS 2024-08-14 13:58:58 -07:00
hostname.go hostinfo: use Foundation APIs to get hostname on macOS 2024-08-14 13:58:58 -07:00
packagetype_container.go hostinfo: set Hostinfo.PackageType for mkctr container builds 2024-07-17 11:26:16 -07:00
wol.go hostinfo, ipnlocal: flesh out Wake-on-LAN support, send MACs, add c2n sender 2023-10-05 11:51:29 -07:00