summaryrefslogtreecommitdiff
path: root/pkg/specgen/generate/oci.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-07-24 06:09:17 -0400
committerGitHub <noreply@github.com>2021-07-24 06:09:17 -0400
commitec5c7c1f6a1898dacddb6cc35802525c288b61ef (patch)
treefefa2e301353ee5b1055dc1899aa7b3ce33d6e68 /pkg/specgen/generate/oci.go
parentd956500743829297b43a22e447017fe6319caed5 (diff)
parent3e79296a81ad723c6c3e8ea7d9ca142dfa8fbdf3 (diff)
downloadpodman-ec5c7c1f6a1898dacddb6cc35802525c288b61ef.tar.gz
podman-ec5c7c1f6a1898dacddb6cc35802525c288b61ef.tar.bz2
podman-ec5c7c1f6a1898dacddb6cc35802525c288b61ef.zip
Merge pull request #10895 from rhatdan/devices
Support DeviceCgroupRules to actually get added.
Diffstat (limited to 'pkg/specgen/generate/oci.go')
-rw-r--r--pkg/specgen/generate/oci.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/specgen/generate/oci.go b/pkg/specgen/generate/oci.go
index bf8d44ed6..6e310d8a6 100644
--- a/pkg/specgen/generate/oci.go
+++ b/pkg/specgen/generate/oci.go
@@ -321,6 +321,10 @@ func SpecGenToOCI(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runt
}
}
+ for _, dev := range s.DeviceCGroupRule {
+ g.AddLinuxResourcesDevice(true, dev.Type, dev.Major, dev.Minor, dev.Access)
+ }
+
BlockAccessToKernelFilesystems(s.Privileged, s.PidNS.IsHost(), s.Mask, s.Unmask, &g)
for name, val := range s.Env {