Merge pull request #2486 from langyxxl/localkube-add-root-check

localkube add ROOT permission check
pull/2500/head
Matt Rickard 2018-02-01 16:42:26 -08:00 committed by GitHub
commit c76b210393
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -46,7 +46,10 @@ func StartLocalkube() {
os.Exit(0)
}
// TODO: Require root
if os.Geteuid() != 0 {
fmt.Println("localkube should run as root!")
os.Exit(1)
}
SetupServer(Server)
Server.StartAll()