mirror of
https://github.com/containers/podman.git
synced 2025-10-25 18:25:59 +08:00
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
18 lines
407 B
Go
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
|
|
}
|