From: Jeremy Allison Date: Fri, 4 Jun 2021 20:32:40 +0000 (-0700) Subject: s3: smbd: Now all callers of is_visible_fsp() pass 'false' for the use_veto parameter... X-Git-Tag: tevent-0.11.0~563 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9f2f4affa0a376ea342caf7f748eceb5649fb2f7;p=thirdparty%2Fsamba.git s3: smbd: Now all callers of is_visible_fsp() pass 'false' for the use_veto parameter, remove it. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/close.c b/source3/smbd/close.c index 439308294af..191626557dc 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -922,7 +922,7 @@ bool recursive_rmdir(TALLOC_CTX *ctx, goto err_break; } - if (!is_visible_fsp(atname->fsp, false)) { + if (!is_visible_fsp(atname->fsp)) { TALLOC_FREE(smb_dname_full); TALLOC_FREE(fullname); TALLOC_FREE(talloced); @@ -1125,7 +1125,7 @@ static NTSTATUS rmdir_internals(TALLOC_CTX *ctx, struct files_struct *fsp) goto err; } - if (!is_visible_fsp(direntry_fname->fsp, false)) { + if (!is_visible_fsp(direntry_fname->fsp)) { TALLOC_FREE(talloced); TALLOC_FREE(fullname); TALLOC_FREE(smb_dname_full); @@ -1224,7 +1224,7 @@ static NTSTATUS rmdir_internals(TALLOC_CTX *ctx, struct files_struct *fsp) goto err_break; } - if (!is_visible_fsp(direntry_fname->fsp, false)) { + if (!is_visible_fsp(direntry_fname->fsp)) { TALLOC_FREE(fullname); TALLOC_FREE(smb_dname_full); TALLOC_FREE(talloced); diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 6dfb9d93d90..655755a16a2 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -969,7 +969,7 @@ bool smbd_dirptr_get_entry(TALLOC_CTX *ctx, continue; } - if (!is_visible_fsp(smb_fname->fsp, false)) { + if (!is_visible_fsp(smb_fname->fsp)) { TALLOC_FREE(smb_fname); TALLOC_FREE(dname); TALLOC_FREE(fname); @@ -1566,7 +1566,7 @@ static bool is_visible_file(connection_struct *conn, Should the file be seen by the client? ********************************************************************/ -bool is_visible_fsp(struct files_struct *fsp, bool use_veto) +bool is_visible_fsp(struct files_struct *fsp) { bool hide_unreadable = false; bool hide_unwriteable = false; @@ -1605,12 +1605,6 @@ bool is_visible_fsp(struct files_struct *fsp, bool use_veto) return true; /* . and .. are always visible. */ } - /* If it's a vetoed file, pretend it doesn't even exist */ - if (use_veto && IS_VETO_PATH(fsp->conn, last_component)) { - DBG_ERR("file %s is vetoed.\n", fsp_str_dbg(fsp)); - return false; - } - if (fsp_get_pathref_fd(fsp) == -1) { /* * Symlink in POSIX mode or MS-DFS. @@ -2189,7 +2183,7 @@ NTSTATUS can_delete_directory_fsp(files_struct *fsp) break; } - if (!is_visible_fsp(direntry_fname->fsp, false)) { + if (!is_visible_fsp(direntry_fname->fsp)) { TALLOC_FREE(talloced); TALLOC_FREE(fullname); TALLOC_FREE(smb_dname_full); diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 788bb48ea7c..321bd209326 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -228,7 +228,7 @@ bool get_dir_entry(TALLOC_CTX *ctx, bool check_descend, bool ask_sharemode); struct smb_Dir; -bool is_visible_fsp(files_struct *fsp, bool use_veto); +bool is_visible_fsp(files_struct *fsp); struct smb_Dir *OpenDir(TALLOC_CTX *mem_ctx, connection_struct *conn, const struct smb_filename *smb_fname, diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index c8349667818..f3a262a79bb 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -3481,7 +3481,7 @@ NTSTATUS unlink_internals(connection_struct *conn, goto out; } - if (!is_visible_fsp(f->fsp, false)) { + if (!is_visible_fsp(f->fsp)) { TALLOC_FREE(frame); TALLOC_FREE(talloced); continue; @@ -8239,7 +8239,7 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx, break; } - if (!is_visible_fsp(smb_fname_src->fsp, false)) { + if (!is_visible_fsp(smb_fname_src->fsp)) { TALLOC_FREE(talloced); continue; } @@ -9033,7 +9033,7 @@ void reply_copy(struct smb_request *req) break; } - if (!is_visible_fsp(smb_fname_src->fsp, false)) { + if (!is_visible_fsp(smb_fname_src->fsp)) { TALLOC_FREE(talloced); continue; }