mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-06 04:42:42 +00:00
net/tstun: diagnose /dev/net/tun fd leak, give better failure message
Updates #5029 Change-Id: Ibee5e0c9076fe764eb5d856d5ef8b09f4d0e2921 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
931f18b575
commit
0d52674a84
@@ -17,7 +17,7 @@ func init() {
|
||||
tunDiagnoseFailure = diagnoseDarwinTUNFailure
|
||||
}
|
||||
|
||||
func diagnoseDarwinTUNFailure(tunName string, logf logger.Logf) {
|
||||
func diagnoseDarwinTUNFailure(tunName string, logf logger.Logf, err error) {
|
||||
if os.Getuid() != 0 {
|
||||
logf("failed to create TUN device as non-root user; use 'sudo tailscaled', or run under launchd with 'sudo tailscaled install-system-daemon'")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user