Files
Davanum Srinivas 4d8a83b428 Update dependencies used by sig-node
This change updates four dependencies:

- github.com/containerd/containerd/api from v1.11.0 to v1.11.1
- github.com/cyphar/filepath-securejoin from v0.6.1 to v0.7.0
- github.com/opencontainers/cgroups from v0.0.6 to v0.0.7
- github.com/opencontainers/selinux from v1.13.1 to v1.15.1

The new filepath-securejoin release requires a newer version of
cyphar.com/go-pathrs, so that module also moves from v0.2.2 to v0.2.5.
The file hack/unwanted-dependencies.json did not need any changes.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-07-16 08:14:43 +05:30

45 lines
938 B
Go

package fs
import (
"github.com/opencontainers/cgroups"
)
type DevicesGroup struct{}
func (s *DevicesGroup) Name() string {
return "devices"
}
// ID returns the controller ID for devices subsystem.
// Returns 0 as devices is not a cgroups.Controller.
func (s *DevicesGroup) ID() cgroups.Controller {
return 0
}
func (s *DevicesGroup) Apply(path string, r *cgroups.Resources, pid int) error {
if r.SkipDevices {
return nil
}
if path == "" {
// Return error here, since devices cgroup
// is a hard requirement for container's security.
return errSubsystemDoesNotExist
}
return apply(path, pid)
}
func (s *DevicesGroup) Set(path string, r *cgroups.Resources) error {
if cgroups.DevicesSetV1 == nil {
if len(r.Devices) == 0 {
return nil
}
return cgroups.ErrDevicesUnsupported
}
return cgroups.DevicesSetV1(path, r)
}
func (s *DevicesGroup) GetStats(path string, stats *cgroups.Stats) error {
return nil
}