diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-04-30 08:39:12 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-05-01 15:00:26 -0400 |
commit | 730fbc76284fd14749863ee160e6548577e7b180 (patch) | |
tree | 636a8ab33704fb47cdc7ec3836f87821ec6cfb85 /pkg | |
parent | a451048efc67d404d4af934757179819106d9d22 (diff) | |
download | podman-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')
-rw-r--r-- | pkg/specgen/generate/oci.go | 7 |
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 |