The "userID is empty everywhere but Windows" docs on lots of places
but not everywhere while using just a string type was getting
confusing. This makes a new type to wrap up those rules, however
weird/historical they might be.
Change-Id: I142e85a8e38760988d6c0c91d0efecedade81b9b
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/6535/head
Brad Fitzpatrick2 years agocommitted byBrad Fitzpatrick
returnerrors.New("empty user uid in connection identity")
}
ifuid!=serverModeUid{
returnfmt.Errorf("Tailscale running in server mode (%q); connection from %q not allowed",b.tryLookupUserName(serverModeUid),b.tryLookupUserName(uid))
returnfmt.Errorf("Tailscale running in server mode (%q); connection from %q not allowed",b.tryLookupUserName(string(serverModeUid)),b.tryLookupUserName(string(uid)))