summaryrefslogtreecommitdiff
path: root/pkg/specgen/generate/config_linux_cgo.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2020-04-24 11:41:37 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2020-04-24 12:56:20 +0200
commita3acc4f97775a446f93deeb924ab99b708bcfe88 (patch)
treefd10fd2f5b3be1931074c2b22858479d8035c567 /pkg/specgen/generate/config_linux_cgo.go
parent23d431f0bf4ef4e550d23b43264c2ffdc940c767 (diff)
downloadpodman-a3acc4f97775a446f93deeb924ab99b708bcfe88.tar.gz
podman-a3acc4f97775a446f93deeb924ab99b708bcfe88.tar.bz2
podman-a3acc4f97775a446f93deeb924ab99b708bcfe88.zip
podman: add support for --rootfs
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg/specgen/generate/config_linux_cgo.go')
-rw-r--r--pkg/specgen/generate/config_linux_cgo.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/specgen/generate/config_linux_cgo.go b/pkg/specgen/generate/config_linux_cgo.go
index b06ef5c9a..5d629a6e6 100644
--- a/pkg/specgen/generate/config_linux_cgo.go
+++ b/pkg/specgen/generate/config_linux_cgo.go
@@ -24,6 +24,9 @@ func getSeccompConfig(s *specgen.SpecGenerator, configSpec *spec.Spec, img *imag
}
if scp == seccomp.PolicyImage {
+ if img == nil {
+ return nil, errors.New("cannot read seccomp profile without a valid image")
+ }
labels, err := img.Labels(context.Background())
if err != nil {
return nil, err