Merge branch 'issue3-hkexshd-insufficient-privileges' of Russtopia/hkexsh into master

This commit is contained in:
Russtopia 2018-06-27 19:30:05 -07:00 committed by Gogs
commit aa48314ee9
1 changed files with 7 additions and 0 deletions

View File

@ -200,6 +200,13 @@ func main() {
log.SetOutput(ioutil.Discard)
}
{
me, e := user.Current()
if e != nil || me.Uid != "0" {
log.Fatal("Must run as root.")
}
}
// Listen on TCP port 2000 on all available unicast and
// anycast IP addresses of the local system.
l, err := hkexsh.Listen("tcp", laddr)