tailscale/hostinfo
Jonathan Nobels d6fd865d41
hostinfo, ipnlocal: add optional os-specific callback for querying the hostname (#15647)
updates tailscale/tailscale#13476

On darwin, os.Hostname is no longer reliable when called
from a sandboxed process.  To fix this, we will allow clients
to set an optional callback to query the hostname via an
alternative native API.

We will leave the default implementation as os.Hostname since
this works perfectly well for almost everything besides sandboxed
darwin clients.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
2025-04-14 15:02:32 -04:00
..
hostinfo_container_linux_test.go hostinfo,build_docker.sh,tailcfg: more reliably detect being in a container (#13826) 2024-10-15 19:38:11 +01: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 hostinfo: fix testing in container (#14330) 2024-12-09 20:42:10 +00:00
hostinfo_linux.go types/result, util/lineiter: add package for a result type, use it 2024-11-05 10:27:52 -08:00
hostinfo_plan9.go all: use network less when running in v86 emulator 2025-04-02 07:36:04 -07:00
hostinfo_test.go hostinfo, ipnlocal: add optional os-specific callback for querying the hostname (#15647) 2025-04-14 15:02:32 -04: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, ipnlocal: add optional os-specific callback for querying the hostname (#15647) 2025-04-14 15:02:32 -04:00
packagetype_container.go hostinfo: set Hostinfo.PackageType for mkctr container builds 2024-07-17 11:26:16 -07:00