Merge pull request #16633 from dfr/freebsd-cloexec
libpod: Use O_CLOEXEC for descriptors returned by (*Container).openDi…
This commit is contained in:
commit
308cdc153d
|
@ -186,7 +186,7 @@ func (c *Container) getOCICgroupPath() (string, error) {
|
||||||
|
|
||||||
func openDirectory(path string) (fd int, err error) {
|
func openDirectory(path string) (fd int, err error) {
|
||||||
const O_PATH = 0x00400000
|
const O_PATH = 0x00400000
|
||||||
return unix.Open(path, unix.O_RDONLY|O_PATH, 0)
|
return unix.Open(path, unix.O_RDONLY|O_PATH|unix.O_CLOEXEC, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Container) addNetworkNamespace(g *generate.Generator) error {
|
func (c *Container) addNetworkNamespace(g *generate.Generator) error {
|
||||||
|
|
Loading…
Reference in New Issue