From 668ef24701ba9d7992b1e44f8b2b87bc5522fb1a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 29 Apr 2020 14:37:02 -0700 Subject: [PATCH] s3: smbd: Reformat calls to is_visible_file() to one arg per line. Will make it easier to see parameter change in a later commit. No logic changes. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- source3/smbd/close.c | 21 +++++++++++++++------ source3/smbd/dir.c | 14 +++++++++----- source3/smbd/proto.h | 8 ++++---- source3/smbd/reply.c | 21 +++++++++++++++------ 4 files changed, 43 insertions(+), 21 deletions(-) diff --git a/source3/smbd/close.c b/source3/smbd/close.c index 8ad8a6b5188..42aedff6a78 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -832,8 +832,11 @@ bool recursive_rmdir(TALLOC_CTX *ctx, continue; } - if (!is_visible_file(conn, smb_dname, dname, &st, - false)) { + if (!is_visible_file(conn, + smb_dname, + dname, + &st, + false)) { TALLOC_FREE(talloced); continue; } @@ -969,8 +972,11 @@ static NTSTATUS rmdir_internals(TALLOC_CTX *ctx, files_struct *fsp) TALLOC_FREE(talloced); continue; } - if (!is_visible_file(conn, smb_dname, dname, - &st, false)) { + if (!is_visible_file(conn, + smb_dname, + dname, + &st, + false)) { TALLOC_FREE(talloced); continue; } @@ -1004,8 +1010,11 @@ static NTSTATUS rmdir_internals(TALLOC_CTX *ctx, files_struct *fsp) TALLOC_FREE(talloced); continue; } - if (!is_visible_file(conn, smb_dname, dname, - &st, false)) { + if (!is_visible_file(conn, + smb_dname, + dname, + &st, + false)) { TALLOC_FREE(talloced); continue; } diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 7f5af0e37d3..ecb53d7ae8a 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -1209,10 +1209,10 @@ static bool file_is_special(connection_struct *conn, ********************************************************************/ bool is_visible_file(connection_struct *conn, - struct smb_filename *dir_path, - const char *name, - SMB_STRUCT_STAT *pst, - bool use_veto) + struct smb_filename *dir_path, + const char *name, + SMB_STRUCT_STAT *pst, + bool use_veto) { bool hide_unreadable = lp_hide_unreadable(SNUM(conn)); bool hide_unwriteable = lp_hide_unwriteable_files(SNUM(conn)); @@ -1760,7 +1760,11 @@ NTSTATUS can_delete_directory_fsp(files_struct *fsp) } } - if (!is_visible_file(conn, fsp->fsp_name, dname, &st, True)) { + if (!is_visible_file(conn, + fsp->fsp_name, + dname, + &st, + True)) { TALLOC_FREE(talloced); continue; } diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 04f168dddfd..e39fe4e365e 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -225,10 +225,10 @@ bool get_dir_entry(TALLOC_CTX *ctx, bool check_descend, bool ask_sharemode); bool is_visible_file(connection_struct *conn, - struct smb_filename *dir_path, - const char *name, - SMB_STRUCT_STAT *pst, - bool use_veto); + struct smb_filename *dir_path, + const char *name, + SMB_STRUCT_STAT *pst, + bool use_veto); 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 2fa1d9f5dd1..d87b3968d05 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -3469,8 +3469,11 @@ NTSTATUS unlink_internals(connection_struct *conn, struct smb_request *req, &smb_fname->st, &talloced))) { TALLOC_CTX *frame = talloc_stackframe(); - if (!is_visible_file(conn, smb_fname_dir, dname, - &smb_fname->st, true)) { + if (!is_visible_file(conn, + smb_fname_dir, + dname, + &smb_fname->st, + true)) { TALLOC_FREE(frame); TALLOC_FREE(talloced); continue; @@ -8143,8 +8146,11 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx, } } - if (!is_visible_file(conn, smb_fname_src_dir, dname, - &smb_fname_src->st, false)) { + if (!is_visible_file(conn, + smb_fname_src_dir, + dname, + &smb_fname_src->st, + false)) { TALLOC_FREE(talloced); continue; } @@ -8885,8 +8891,11 @@ void reply_copy(struct smb_request *req) continue; } - if (!is_visible_file(conn, smb_fname_src_dir, dname, - &smb_fname_src->st, false)) { + if (!is_visible_file(conn, + smb_fname_src_dir, + dname, + &smb_fname_src->st, + false)) { TALLOC_FREE(talloced); continue; } -- 2.34.1