mirror of
https://github.com/containers/podman.git
synced 2025-07-03 01:08:02 +08:00
libpod: fix 'podman kube generate' on FreeBSD
This avoids dereferencing c.config.Spec.Linux if it is nil, which is the case on FreeBSD. [NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson <dfr@rabson.org>
This commit is contained in:
@ -1308,7 +1308,7 @@ func generateKubeSecurityContext(c *Container) (*v1.SecurityContext, bool, error
|
||||
scHasData = true
|
||||
sc.ReadOnlyRootFilesystem = &ro
|
||||
}
|
||||
if c.config.Spec.Linux.MaskedPaths == nil {
|
||||
if c.config.Spec.Linux != nil && c.config.Spec.Linux.MaskedPaths == nil {
|
||||
scHasData = true
|
||||
unmask := v1.UnmaskedProcMount
|
||||
sc.ProcMount = &unmask
|
||||
|
Reference in New Issue
Block a user