[SCM] Samba Shared Repository - branch master updated

Ralph Böhme slow at samba.org
Fri Dec 18 16:28:02 UTC 2020


The branch, master has been updated
       via  6b5041c0212 smbd: close_file() should never see an internal dirfsp.
      from  a77de71ced0 vfs_acl_tdb: avoid deleting the NT ACL from the tdb

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 6b5041c0212a16d2f250b75b324e64b4c015462b
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Dec 17 12:31:35 2020 -0800

    smbd: close_file() should never see an internal dirfsp.
    
    Assert this is the case.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    
    Autobuild-User(master): Ralph Böhme <slow at samba.org>
    Autobuild-Date(master): Fri Dec 18 16:27:38 UTC 2020 on sn-devel-184

-----------------------------------------------------------------------

Summary of changes:
 source3/smbd/close.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/close.c b/source3/smbd/close.c
index e53faf98007..20f2ed8a172 100644
--- a/source3/smbd/close.c
+++ b/source3/smbd/close.c
@@ -1291,13 +1291,11 @@ NTSTATUS close_file(struct smb_request *req, files_struct *fsp,
 	NTSTATUS status;
 	struct files_struct *base_fsp = fsp->base_fsp;
 
-	if (fsp->fsp_flags.is_dirfsp) {
-		/*
-		 * The typical way to get here is via file_close_[conn|user]()
-		 * and this is taken care of below.
-		 */
-		return NT_STATUS_OK;
-	}
+	/*
+	 * This fsp can never be an internal dirfsp. They must
+	 * be explicitly closed by TALLOC_FREE of the dir handle.
+	 */
+	SMB_ASSERT(!fsp->fsp_flags.is_dirfsp);
 
 	if (fsp->fsp_flags.is_directory) {
 		status = close_directory(req, fsp, close_type);


-- 
Samba Shared Repository



More information about the samba-cvs mailing list