mirror of
https://github.com/netbirdio/netbird.git
synced 2025-03-04 01:41:17 +01:00
* Enable ssh server on freebsd * Fix listening in netstack mode * Fix panic if login cmd fails * Tidy up go mod
15 lines
246 B
Go
15 lines
246 B
Go
//go:build !darwin
|
|
// +build !darwin
|
|
|
|
package ssh
|
|
|
|
import "os/user"
|
|
|
|
func userNameLookup(username string) (*user.User, error) {
|
|
if username == "" || (username == "root" && !isRoot()) {
|
|
return user.Current()
|
|
}
|
|
|
|
return user.Lookup(username)
|
|
}
|