tailscale/ipn
Aaron Klotz 9ebb5d4205 ipn, paths: ensure that the state directory for Windows has the correct perms
ProgramData has a permissive ACL. For us to safely store machine-wide
state information, we must set a more restrictive ACL on our state directory.
We set the ACL so that only talescaled's user (ie, LocalSystem) and the
Administrators group may access our directory.

We must include Administrators to ensure that logs continue to be easily
accessible; omitting that group would force users to use special tools to
log in interactively as LocalSystem, which is not ideal.

(Note that the ACL we apply matches the ACL that was used for LocalSystem's
AppData\Local).

There are two cases where we need to reset perms: One is during migration
from the old location to the new. The second case is for clean installations
where we are creating the file store for the first time.

Updates #2856

Signed-off-by: Aaron Klotz <aaron@tailscale.com>
2021-09-22 14:50:00 -06:00
..
ipnlocal tailcfg, health: add way for control plane to add problems to health check 2021-09-19 17:55:49 -07:00
ipnserver logpolicy: don't use C:\ProgramData use for tailscale-ipn GUI's log dir 2021-09-20 21:48:46 -07:00
ipnstate cmd/tailscale: fix "tailscale ip $self-host-hostname" 2021-09-07 11:57:23 -07:00
localapi client/tailscale,ipn/localapi: warn on tailscale/tailscaled version skew 2021-08-19 08:36:13 -07:00
policy ipn/policy: mark peerapi4 and peerapi6 as interesting services 2021-04-01 11:57:24 -07:00
backend.go ipnlocal: accept a new opts.UpdatePrefs field. 2021-05-04 15:19:25 -04:00
doc.go Move Linux client & common packages into a public repo. 2020-02-09 09:32:57 -08:00
fake_test.go ipn{,/ipnlocal}, cmd/tailscale/cli: don't check pref reverts on initial up 2021-04-18 08:12:18 -07:00
handle.go ipn: another controlplane synonym 2021-07-13 08:22:10 -07:00
message_test.go ipn: allow b to be nil in NewBackendServer 2021-05-19 09:33:19 -07:00
message.go ipn: allow b to be nil in NewBackendServer 2021-05-19 09:33:19 -07:00
prefs_clone.go cmd/cloner: add Clone context to regen struct assignments 2021-09-17 16:46:08 -07:00
prefs_test.go ipn, etc: use controlplane.tailscale.com 2021-06-28 09:38:23 -07:00
prefs.go ipn: another controlplane synonym 2021-07-13 08:22:10 -07:00
store_test.go Add tstest.PanicOnLog(), and fix various problems detected by this. 2020-05-13 23:12:35 -04:00
store.go ipn, paths: ensure that the state directory for Windows has the correct perms 2021-09-22 14:50:00 -06:00