mirror of
https://github.com/netbirdio/netbird.git
synced 2025-08-09 07:15:15 +02:00
Disable SSH server by default on client side and add the flag --allow-server-ssh to enable it (#1508)
This changes the default behavior for new peers, by requiring the agent to be executed with allow-server-ssh set to true in order for the management configuration to take effect.
This commit is contained in:
@ -22,3 +22,38 @@ func FileExists(path string) bool {
|
||||
_, err := os.Stat(path)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
|
||||
/// Bool helpers
|
||||
|
||||
// True returns a *bool whose underlying value is true.
|
||||
func True() *bool {
|
||||
t := true
|
||||
return &t
|
||||
}
|
||||
|
||||
// False returns a *bool whose underlying value is false.
|
||||
func False() *bool {
|
||||
t := false
|
||||
return &t
|
||||
}
|
||||
|
||||
// Return bool representation if the bool pointer is non-nil, otherwise returns false
|
||||
func ReturnBoolWithDefaultFalse(b *bool) bool {
|
||||
if b != nil {
|
||||
return *b
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Return bool representation if the bool pointer is non-nil, otherwise returns true
|
||||
func ReturnBoolWithDefaultTrue(b *bool) bool {
|
||||
if b != nil {
|
||||
return *b
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user