summaryrefslogtreecommitdiff
path: root/pkg/specgen
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-04-30 08:39:12 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-05-01 15:00:26 -0400
commit730fbc76284fd14749863ee160e6548577e7b180 (patch)
tree636a8ab33704fb47cdc7ec3836f87821ec6cfb85 /pkg/specgen
parenta451048efc67d404d4af934757179819106d9d22 (diff)
downloadpodman-730fbc76284fd14749863ee160e6548577e7b180.tar.gz
podman-730fbc76284fd14749863ee160e6548577e7b180.tar.bz2
podman-730fbc76284fd14749863ee160e6548577e7b180.zip
Properly handle containers.conf devices
We need to add the default devices listed in containers.conf Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/specgen')
-rw-r--r--pkg/specgen/generate/oci.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/specgen/generate/oci.go b/pkg/specgen/generate/oci.go
index 7993777fb..c70141109 100644
--- a/pkg/specgen/generate/oci.go
+++ b/pkg/specgen/generate/oci.go
@@ -267,6 +267,13 @@ func SpecGenToOCI(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runt
return nil, err
}
} else {
+ // add default devices from containers.conf
+ for _, device := range rtc.Containers.Devices {
+ if err := DevicesFromPath(&g, device); err != nil {
+ return nil, err
+ }
+ }
+ // add default devices specified by caller
for _, device := range s.Devices {
if err := DevicesFromPath(&g, device.Path); err != nil {
return nil, err