Skip to content

Commit

Permalink
add devices cgroup check and errors
Browse files Browse the repository at this point in the history
Signed-off-by: Qiang Huang <[email protected]>
  • Loading branch information
hqhq committed Apr 24, 2015
1 parent 09052a5 commit 47e5acf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/sysinfo/sysinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,11 @@ func New(quiet bool) *SysInfo {
} else {
sysInfo.AppArmor = true
}

// Check if Devices cgroup is mounted, it is hard requirement for container security.
if _, err := cgroups.FindCgroupMountpoint("devices"); err != nil {
logrus.Fatalf("Error mounting devices cgroup: %v", err)
}

return sysInfo
}

0 comments on commit 47e5acf

Please sign in to comment.