mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-14 06:57:31 +00:00
feature/taildrop, ipn/ipnlocal: remove leftover dup calls to osshare
I'd moved the osshare calls to feature/taildrop hooks, but forgot to remove them from ipnlocal, or lost them during a rebase. But then I noticed cmd/tailscaled also had some, so turn those into a hook. Updates #12614 Change-Id: I024fb1d27fbcc49c013158882ee5982c2737037d Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
e2814871a7
commit
165b99278b
@@ -12,12 +12,14 @@ import (
|
||||
"maps"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"slices"
|
||||
"strings"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
||||
"tailscale.com/client/tailscale/apitype"
|
||||
"tailscale.com/cmd/tailscaled/tailscaledhooks"
|
||||
"tailscale.com/ipn"
|
||||
"tailscale.com/ipn/ipnext"
|
||||
"tailscale.com/ipn/ipnstate"
|
||||
@@ -31,6 +33,13 @@ import (
|
||||
|
||||
func init() {
|
||||
ipnext.RegisterExtension("taildrop", newExtension)
|
||||
|
||||
if runtime.GOOS == "windows" {
|
||||
tailscaledhooks.UninstallSystemDaemonWindows.Add(func() {
|
||||
// Remove file sharing from Windows shell.
|
||||
osshare.SetFileSharingEnabled(false, logger.Discard)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func newExtension(logf logger.Logf, b ipnext.SafeBackend) (ipnext.Extension, error) {
|
||||
|
Reference in New Issue
Block a user