Skip to content

Commit bb522d6

Browse files
committed
merge branch 'pr-1928'
rootless: fix potential panic in shouldUseRootlessCgroupManager LGTMs: @crosbymichael @cyphar Closes #1928
2 parents 079817c + 714a4d4 commit bb522d6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

rootless_linux.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ func shouldUseRootlessCgroupManager(context *cli.Context) (bool, error) {
1515
if err != nil {
1616
return false, err
1717
}
18+
// nil b stands for "auto detect"
1819
if b != nil {
1920
return *b, nil
2021
}
21-
// nil b stands for "auto detect"
22-
}
23-
if context.GlobalBool("systemd-cgroup") {
24-
return false, nil
22+
23+
if context.GlobalBool("systemd-cgroup") {
24+
return false, nil
25+
}
2526
}
2627
if os.Geteuid() != 0 {
2728
return true, nil

0 commit comments

Comments
 (0)