From: Jeremy Allison Date: Fri, 4 Jun 2021 18:58:39 +0000 (-0700) Subject: s3: smbd: In unlink_internals(), is_visible_file() -> is_visible_fsp(). X-Git-Tag: tevent-0.11.0~574 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=146f7bf4fbc06661c821f897303f777671eccf14;p=thirdparty%2Fsamba.git s3: smbd: In unlink_internals(), is_visible_file() -> is_visible_fsp(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 44747408256..8027a868706 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -3410,18 +3410,14 @@ NTSTATUS unlink_internals(connection_struct *conn, char *p = NULL; struct smb_filename *f = NULL; - if (!is_visible_file(conn, - dir_hnd, - dname, - &smb_fname->st, - true)) { + /* Quick check for "." and ".." */ + if (ISDOT(dname) || ISDOTDOT(dname)) { TALLOC_FREE(frame); TALLOC_FREE(talloced); continue; } - /* Quick check for "." and ".." */ - if (ISDOT(dname) || ISDOTDOT(dname)) { + if (IS_VETO_PATH(conn, dname)) { TALLOC_FREE(frame); TALLOC_FREE(talloced); continue; @@ -3485,6 +3481,12 @@ NTSTATUS unlink_internals(connection_struct *conn, goto out; } + if (!is_visible_fsp(f->fsp, false)) { + TALLOC_FREE(frame); + TALLOC_FREE(talloced); + continue; + } + status = check_name(conn, f); if (!NT_STATUS_IS_OK(status)) { TALLOC_FREE(dir_hnd);