upgrade runc to v1.1.4
This commit is contained in:
16
vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/common.go
generated
vendored
16
vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/common.go
generated
vendored
@@ -288,14 +288,16 @@ func generateDeviceProperties(r *configs.Resources) ([]systemdDbus.Property, err
|
||||
case devices.CharDevice:
|
||||
entry.Path = fmt.Sprintf("/dev/char/%d:%d", rule.Major, rule.Minor)
|
||||
}
|
||||
// systemd will issue a warning if the path we give here doesn't exist.
|
||||
// Since all of this logic is best-effort anyway (we manually set these
|
||||
// rules separately to systemd) we can safely skip entries that don't
|
||||
// have a corresponding path.
|
||||
if _, err := os.Stat(entry.Path); err != nil {
|
||||
logrus.Debugf("skipping device %s for systemd: %s", entry.Path, err)
|
||||
continue
|
||||
}
|
||||
}
|
||||
// systemd will issue a warning if the path we give here doesn't exist.
|
||||
// Since all of this logic is best-effort anyway (we manually set these
|
||||
// rules separately to systemd) we can safely skip entries that don't
|
||||
// have a corresponding path.
|
||||
if _, err := os.Stat(entry.Path); err == nil {
|
||||
deviceAllowList = append(deviceAllowList, entry)
|
||||
}
|
||||
deviceAllowList = append(deviceAllowList, entry)
|
||||
}
|
||||
|
||||
properties = append(properties, newProp("DeviceAllow", deviceAllowList))
|
||||
|
Reference in New Issue
Block a user