pkg/libcontainer/nsinit/ns_linux.go
Guillaume J. Charmes 357ca32831 Better capability/namespace management
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
2014-02-24 21:52:29 -08:00

14 lines
337 B
Go

package nsinit
import (
"github.com/dotcloud/docker/pkg/libcontainer"
)
// getNamespaceFlags parses the container's Namespaces options to set the correct
// flags on clone, unshare, and setns
func GetNamespaceFlags(namespaces libcontainer.Namespaces) (flag int) {
for _, ns := range namespaces {
flag |= ns.Value
}
return flag
}