ipn/ipnlocal: fix cert fetching on macOS GUI platforms
And clarify the directory they get written to when under the sandbox. Fixes #3667 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>pull/3670/head
parent
28bf53f502
commit
3690bfecb0
|
@ -108,7 +108,7 @@ func runCert(ctx context.Context, args []string) error {
|
||||||
if version.IsMacSysExt() {
|
if version.IsMacSysExt() {
|
||||||
dir = "io.tailscale.ipn.macsys"
|
dir = "io.tailscale.ipn.macsys"
|
||||||
}
|
}
|
||||||
printf("Warning: the macOS CLI runs in a sandbox; this binary's filesystem writes go to $HOME/Library/Containers/%s\n", dir)
|
printf("Warning: the macOS CLI runs in a sandbox; this binary's filesystem writes go to $HOME/Library/Containers/%s/Data\n", dir)
|
||||||
}
|
}
|
||||||
if certArgs.certFile != "" {
|
if certArgs.certFile != "" {
|
||||||
certChanged, err := writeIfChanged(certArgs.certFile, certPEM, 0644)
|
certChanged, err := writeIfChanged(certArgs.certFile, certPEM, 0644)
|
||||||
|
|
|
@ -2121,7 +2121,7 @@ func (b *LocalBackend) TailscaleVarRoot() string {
|
||||||
return b.varRoot
|
return b.varRoot
|
||||||
}
|
}
|
||||||
switch runtime.GOOS {
|
switch runtime.GOOS {
|
||||||
case "ios", "android":
|
case "ios", "android", "darwin":
|
||||||
dir, _ := paths.AppSharedDir.Load().(string)
|
dir, _ := paths.AppSharedDir.Load().(string)
|
||||||
return dir
|
return dir
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue