From 9550f4370e47d765b8a23a8be91fe54d097b67aa Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 19 Oct 2024 17:30:09 +0200 Subject: [PATCH] smbd: Enable fd_openat(cwd_fsp, "/absolute/share/path") So far fd_openat needed to be called with cwd_fsp and "." if you wanted to open the share root, this enables using the absolute share path. The next patch will remove sending the "." with cwd_fsp as a simplification. Enable that with this little change. Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- source3/smbd/open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/open.c b/source3/smbd/open.c index be728d88c58..3290c71f69e 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -655,7 +655,7 @@ again: int cmp = strcmp(connpath, smb_fname->base_name); if (cmp == 0) { SMB_ASSERT(dirfsp == conn->cwd_fsp); - smb_fname->base_name = talloc_strdup(smb_fname, ""); + smb_fname->base_name = talloc_strdup(smb_fname, "."); if (smb_fname->base_name == NULL) { status = NT_STATUS_NO_MEMORY; goto out; -- 2.47.2