MCPcopy
hub / github.com/tailscale/tailscale / IsMacSysExt

Function IsMacSysExt

version/prop.go:109–126  ·  view source on GitHub ↗

IsMacSysExt reports whether this binary is the system extension shipped as part of the standalone "System Extension" (a.k.a. "macsys") version of Tailscale for macOS.

()

Source from the content-addressed store, hash-verified

107// the standalone "System Extension" (a.k.a. "macsys") version of Tailscale
108// for macOS.
109func IsMacSysExt() bool {
110 if runtime.GOOS != "darwin" {
111 return false
112 }
113 return isMacSysExt.Get(func() bool {
114 if AppIdentifierFn != nil {
115 return AppIdentifierFn() == macsysExtBundleId
116 }
117
118 // TODO (barnstar): This check should be redundant once all relevant callers
119 // use AppIdentifierFn.
120 exe, err := os.Executable()
121 if err != nil {
122 return false
123 }
124 return filepath.Base(exe) == macsysExtBundleId
125 })
126}
127
128var isMacAppStore lazy.SyncValue[bool]
129

Callers 11

runSetFunction · 0.92
runCertFunction · 0.92
getUpdateFunctionMethod · 0.92
canAutoUpdateUncachedFunction · 0.92
stateEncryptedMethod · 0.92
newC2NUpdateResponseMethod · 0.92
IsMacGUIVariantFunction · 0.85
IsSandboxedMacOSFunction · 0.85
IsMacSysFunction · 0.85

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…