Merge pull request #896 from brauner/devices-fix

fail if path to devices subsystem is missing
This commit is contained in:
Michael Crosby 2016-06-10 11:54:40 -07:00 committed by GitHub
commit ae312e5155
1 changed files with 3 additions and 1 deletions

View File

@ -142,7 +142,9 @@ func (m *Manager) Apply(pid int) (err error) {
// created then join consists of writing the process pids to cgroup.procs
p, err := d.path(sys.Name())
if err != nil {
if cgroups.IsNotFound(err) {
// The non-presence of the devices subsystem is
// considered fatal for security reasons.
if cgroups.IsNotFound(err) && sys.Name() != "devices" {
continue
}
return err