1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

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 <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Jeremy Allison 2020-04-29 14:37:02 -07:00 committed by Ralph Boehme
parent 3373500f7e
commit 668ef24701
4 changed files with 43 additions and 21 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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,

View File

@ -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;
}