mirror of https://gogs.blitter.com/RLabs/xs
Merge branch 'issue3-hkexshd-insufficient-privileges' of Russtopia/hkexsh into master
This commit is contained in:
commit
aa48314ee9
|
@ -200,6 +200,13 @@ func main() {
|
||||||
log.SetOutput(ioutil.Discard)
|
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
|
// Listen on TCP port 2000 on all available unicast and
|
||||||
// anycast IP addresses of the local system.
|
// anycast IP addresses of the local system.
|
||||||
l, err := hkexsh.Listen("tcp", laddr)
|
l, err := hkexsh.Listen("tcp", laddr)
|
||||||
|
|
Loading…
Reference in New Issue