From: Jeremy Allison Date: Thu, 3 Jun 2021 00:42:27 +0000 (-0700) Subject: s3: smbd: Change recursive_rmdir(), is_visible_file() -> is_visible_fsp(). X-Git-Tag: tevent-0.11.0~578 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e6377a909a1692eb5054812d52c24ea935c5371f;p=thirdparty%2Fsamba.git s3: smbd: Change recursive_rmdir(), is_visible_file() -> is_visible_fsp(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/close.c b/source3/smbd/close.c index 7c38a79e9d7..38965f67987 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -877,15 +877,6 @@ bool recursive_rmdir(TALLOC_CTX *ctx, continue; } - if (!is_visible_file(conn, - dir_hnd, - dname, - &st, - false)) { - TALLOC_FREE(talloced); - continue; - } - /* Construct the full name. */ fullname = talloc_asprintf(ctx, "%s/%s", @@ -931,6 +922,14 @@ bool recursive_rmdir(TALLOC_CTX *ctx, goto err_break; } + if (!is_visible_fsp(atname->fsp, false)) { + TALLOC_FREE(smb_dname_full); + TALLOC_FREE(fullname); + TALLOC_FREE(talloced); + TALLOC_FREE(atname); + continue; + } + retval = SMB_VFS_UNLINKAT(conn, dirfsp, atname,