From c0e5ffdc16b7bc8aae869c294c3c4a803859482c Mon Sep 17 00:00:00 2001 From: Anoop C S Date: Sun, 15 Feb 2026 09:57:18 +0530 Subject: [PATCH] =?utf8?q?vfs=5Fceph:=20Handle=20absolute=20paths=20with?= =?utf8?q?=20dirfd=E2=80=AF=3D=E2=80=AF=E2=80=911=20in=20openat?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ceph_openat() does not follow the convention of ignoring 'dirfd' when the pathname is absolute, resulting in EBADF. As a temporary workaround, handle this special case in cephwrap_openat() by calling ceph_open() directly instead of ceph_openat(). Signed-off-by: Anoop C S Reviewed-by: John Mulligan Reviewed-by: Shwetha K Acharya Reviewed-by: Xavi Hernandez Autobuild-User(master): Anoop C S Autobuild-Date(master): Mon Feb 16 17:27:03 UTC 2026 on atb-devel-224 --- source3/modules/vfs_ceph.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c index e927f41dd03..830b8b17a4b 100644 --- a/source3/modules/vfs_ceph.c +++ b/source3/modules/vfs_ceph.c @@ -509,12 +509,21 @@ static int cephwrap_openat(struct vfs_handle_struct *handle, became_root = true; } + if (dirfd == -1 && smb_fname->base_name[0] == '/') { + result = ceph_open(handle->data, + smb_fname->base_name, + flags, + mode); + goto done; + } + result = ceph_openat(handle->data, dirfd, smb_fname->base_name, flags, mode); +done: if (became_root) { unbecome_root(); } -- 2.47.3