From 83a097b43b3d8db6852cefa88324635f3e20f413 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Wed, 6 May 2026 12:21:20 +0200 Subject: [PATCH] storage: fix broken fgetxattr call As documented in the open man page O_PATH is not valid for fgetxattr() and fails with EBADF. Fixes: 363943ac4b ("storage, overlay: use openat2 instead of using procfs") Signed-off-by: Paul Holzinger --- storage/drivers/overlay/overlay.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/drivers/overlay/overlay.go b/storage/drivers/overlay/overlay.go index e7e6131dab..b50319707b 100644 --- a/storage/drivers/overlay/overlay.go +++ b/storage/drivers/overlay/overlay.go @@ -2058,7 +2058,7 @@ func (g *overlayFileGetter) Get(path string) (io.ReadCloser, error) { for _, d := range g.diffDirs { if f, found := g.composefsMounts[d]; found { cfd, err := unix.Openat2(int(f.Fd()), path, &unix.OpenHow{ - Flags: unix.O_CLOEXEC | unix.O_PATH, + Flags: unix.O_RDONLY | unix.O_CLOEXEC, Resolve: unix.RESOLVE_NO_SYMLINKS | unix.RESOLVE_BENEATH, }) if err != nil {