Files
podman/libpod/boltdb_state_unsupported.go
Miloslav Trmač 2322f272c4 Use the Linux version BoltState.getContainerFromDB on all platforms.
This just muves the Linux implementation, unchanged, to the
platform-agnostic file.  Should not change behavior on Linux.

On non-Linux platforms, reading containers from BoltDB now works
(and rejects containers with namespace data).  The checkRuntimeConfig
validation ensures that each BoltDB database is only used on one platform,
so network namespaces should never exist in non-Linux BoltDB files.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>

Closes: #1115
Approved by: rhatdan
2018-07-26 20:47:31 +00:00

18 lines
407 B
Go

// +build !linux
package libpod
import (
"github.com/sirupsen/logrus"
)
// parseNetNSBoltData sets ctr.state.NetNS, if any, from netNSBytes.
// Returns true if the data is valid.
func parseNetNSBoltData(ctr *Container, netNSBytes []byte) bool {
if netNSBytes != nil {
logrus.Errorf("error loading %s: network namespaces are not supported on this platform", ctr.ID())
return false
}
return true
}