Skip to content
Permalink
Browse files

rootless: fix potential panic in shouldUseRootlessCgroupManager

Signed-off-by: Ace-Tang <aceapril@126.com>
  • Loading branch information...
Ace-Tang committed Nov 10, 2018
1 parent 079817c commit 714a4d466a729973f7113e66b59796b2829818e4
Showing with 5 additions and 4 deletions.
  1. +5 −4 rootless_linux.go
@@ -15,13 +15,14 @@ func shouldUseRootlessCgroupManager(context *cli.Context) (bool, error) {
if err != nil {
return false, err
}
// nil b stands for "auto detect"
if b != nil {
return *b, nil
}
// nil b stands for "auto detect"
}
if context.GlobalBool("systemd-cgroup") {
return false, nil

if context.GlobalBool("systemd-cgroup") {
return false, nil
}
}
if os.Geteuid() != 0 {
return true, nil

0 comments on commit 714a4d4

Please sign in to comment.
You can’t perform that action at this time.