ssh/tailssh: check if user matching autogroup:nonroot is root
Add a check to ensure that the user being matched to an autogroup:nonroot rule is in fact a non-root user on the system. Updates https://github.com/tailscale/corp/issues/43245 Signed-off-by: Mario Minardi <mario@tailscale.com>
This commit is contained in:
committed by
Mario Minardi
parent
f3ec43d7dd
commit
e48e7b730a
@@ -698,6 +698,15 @@ func (s *Server) SetMasqueradeAddresses(pairs []MasqueradePair) {
|
||||
s.updateLocked("SetMasqueradeAddresses", s.nodeIDsLocked(0))
|
||||
}
|
||||
|
||||
// SetSSHPolicy sets the SSH policy sent in MapResponses and notifies all
|
||||
// connected nodes so they pick up the change.
|
||||
func (s *Server) SetSSHPolicy(policy *tailcfg.SSHPolicy) {
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
s.SSHPolicy = policy
|
||||
s.updateLocked("SetSSHPolicy", s.nodeIDsLocked(0))
|
||||
}
|
||||
|
||||
// SetNodeCapMap overrides the capability map the specified client receives.
|
||||
func (s *Server) SetNodeCapMap(nodeKey key.NodePublic, capMap tailcfg.NodeCapMap) {
|
||||
s.mu.Lock()
|
||||
|
||||
Reference in New Issue
Block a user