aboutsummaryrefslogtreecommitdiff
path: root/libpod/container_internal_linux.go
diff options
context:
space:
mode:
authorDoug Rabson <dfr@rabson.org>2022-08-16 11:15:57 +0100
committerDoug Rabson <dfr@rabson.org>2022-08-17 12:55:41 +0100
commit1572420c3fbf8a8022faaa93848a7239037a77e4 (patch)
tree9ab74df204c01b0989a863bac646c3a902080631 /libpod/container_internal_linux.go
parent5d7778411a14b2a10d2e66bb0e4cdf7262cf2689 (diff)
downloadpodman-1572420c3fbf8a8022faaa93848a7239037a77e4.tar.gz
podman-1572420c3fbf8a8022faaa93848a7239037a77e4.tar.bz2
podman-1572420c3fbf8a8022faaa93848a7239037a77e4.zip
libpod: Move uses of unix.O_PATH to container_internal_linux.go
The O_PATH flag is a recent addition to the open syscall and is not present in darwin or in FreeBSD releases before 13.1. The constant is not present in the FreeBSD version of x/sys/unix since that package supports FreeBSD 12.3 and later. [NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson <dfr@rabson.org>
Diffstat (limited to 'libpod/container_internal_linux.go')
-rw-r--r--libpod/container_internal_linux.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go
index 6000c2cdd..5c5fd471b 100644
--- a/libpod/container_internal_linux.go
+++ b/libpod/container_internal_linux.go
@@ -3249,3 +3249,7 @@ func (c *Container) setupRootlessNetwork() error {
}
return nil
}
+
+func openDirectory(path string) (fd int, err error) {
+ return unix.Open(path, unix.O_RDONLY|unix.O_PATH, 0)
+}