From e571da800f8d371a70e89ce89d8b35ae712bb6e8 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 19 Oct 2024 17:29:01 +0200 Subject: [PATCH] smbd: Tighten non_wide_link_open() for absolute root share open Make it clear that non_widelink_open being called for absolute paths is not done during regular operations, i.e. when we have passed our pathnames through filename_convert_dirfsp and we work on a real dirfsp. Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- source3/smbd/open.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 540cf1acc8c..be728d88c58 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -654,6 +654,7 @@ again: if (smb_fname->base_name[0] == '/') { 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, ""); if (smb_fname->base_name == NULL) { status = NT_STATUS_NO_MEMORY; -- 2.47.2