From: Volker Lendecke Date: Sat, 19 Oct 2024 15:29:01 +0000 (+0200) Subject: smbd: Tighten non_wide_link_open() for absolute root share open X-Git-Tag: tdb-1.4.13~528 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e571da800f8d371a70e89ce89d8b35ae712bb6e8;p=thirdparty%2Fsamba.git 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 --- 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;