From 1a53b81a7bb12cdfaa269ff3b0c44df69cffb49e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 30 Apr 2020 15:20:34 -0700 Subject: [PATCH] s3: smbd: Reformat definition and callers of can_delete_file_in_directory(). Makes future addition of parameter easier to see. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- source3/smbd/file_access.c | 2 +- source3/smbd/open.c | 8 ++++++-- source3/smbd/proto.h | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/source3/smbd/file_access.c b/source3/smbd/file_access.c index 42936478f92..6c4f38b6a9c 100644 --- a/source3/smbd/file_access.c +++ b/source3/smbd/file_access.c @@ -33,7 +33,7 @@ ****************************************************************************/ bool can_delete_file_in_directory(connection_struct *conn, - const struct smb_filename *smb_fname) + const struct smb_filename *smb_fname) { TALLOC_CTX *ctx = talloc_tos(); struct smb_filename *smb_fname_parent = NULL; diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 8383fe1df5c..039e9f4786b 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -81,7 +81,9 @@ static bool parent_override_delete(connection_struct *conn, { if ((access_mask & DELETE_ACCESS) && (rejected_mask & DELETE_ACCESS) && - can_delete_file_in_directory(conn, smb_fname)) { + can_delete_file_in_directory(conn, + smb_fname)) + { return true; } return false; @@ -3071,7 +3073,9 @@ static NTSTATUS smbd_calculate_maximum_allowed_access( *p_access_mask = (access_granted | FILE_READ_ATTRIBUTES); if (!(access_granted & DELETE_ACCESS)) { - if (can_delete_file_in_directory(conn, smb_fname)) { + if (can_delete_file_in_directory(conn, + smb_fname)) + { *p_access_mask |= DELETE_ACCESS; } } diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index dadccf189bb..5e81670b5fa 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -331,7 +331,7 @@ void reply_openerror(struct smb_request *req, NTSTATUS status); /* The following definitions come from smbd/file_access.c */ bool can_delete_file_in_directory(connection_struct *conn, - const struct smb_filename *smb_fname); + const struct smb_filename *smb_fname); bool can_write_to_file(connection_struct *conn, const struct smb_filename *smb_fname); bool directory_has_default_acl(connection_struct *conn, -- 2.47.3