You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/util
Andrew Lytvynov 6abb425482
ipn/ipnauth: improve the Windows token administrator check (#10755)
(*Token).IsAdministrator is supposed to return true even when the user is
running with a UAC limited token. The idea is that, for the purposes of
this check, we don't care whether the user is *currently* running with
full Admin rights, we just want to know whether the user can
*potentially* do so.

We accomplish this by querying for the token's "linked token," which
should be the fully-elevated variant, and checking its group memberships.

We also switch ipn/ipnserver/(*Server).connIsLocalAdmin to use the elevation
check to preserve those semantics for tailscale serve; I want the
IsAdministrator check to be used for less sensitive things like toggling
auto-update on and off.

Updates tailscale/corp#15405

Signed-off-by: Aaron Klotz <aaron@tailscale.com>
Co-authored-by: Aaron Klotz <aaron@tailscale.com>
5 months ago
..
cibuild all: update copyright and license headers 1 year ago
clientmetric util/clientmetric: allow client metric values to be provided by a function 1 year ago
cloudenv all: update copyright and license headers 1 year ago
cmpver all: update copyright and license headers 1 year ago
cmpx util/cmpx: add package with cmp-like things from future Go releases 1 year ago
codegen util/codegen: support embedded fields 1 year ago
cstruct all: update copyright and license headers 1 year ago
deephash tailcfg: make SelfNodeV4MasqAddrForThisPeer a pointer 1 year ago
dirwalk all: use tstest.Replace more 1 year ago
dnsname cmd/tailscale: extend hostname validation (#7678) 1 year ago
goroutines all: update copyright and license headers 1 year ago
groupmember all: update copyright and license headers 1 year ago
hashx all: update copyright and license headers 1 year ago
httpm all: update copyright and license headers 1 year ago
jsonutil all: update copyright and license headers 1 year ago
lineread all: update copyright and license headers 1 year ago
linuxfw all: use cmpx.Or where it made sense 1 year ago
mak various: add golangci-lint, fix issues (#7905) 1 year ago
multierr util/multierr: implement Go 1.20+'s multiple error Unwrap 1 year ago
must all: update copyright and license headers 1 year ago
osshare all: update copyright and license headers 1 year ago
pidowner all: update copyright and license headers 1 year ago
precompress all: update copyright and license headers 1 year ago
quarantine all: update copyright and license headers 1 year ago
racebuild all: update copyright and license headers 1 year ago
ringbuffer util/ringbuffer: move generic ringbuffer from corp repo 1 year ago
set util/set: add a basic map-based Set type 1 year ago
singleflight all: update copyright and license headers 1 year ago
slicesx util/slicesx: add Partition function 1 year ago
sysresources util/sysresources, magicsock: scale DERP buffer based on system memory 1 year ago
systemd all: update copyright and license headers 1 year ago
truncate util: add truncate package (#7490) 1 year ago
uniq all: update copyright and license headers 1 year ago
vizerror util/vizerror: add As function to get wrapped Error 1 year ago
winutil ipn/ipnauth: improve the Windows token administrator check (#10755) 5 months ago