]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Ensure close_directory() and close_normal_file() only deal with is_fsa files.
authorJeremy Allison <jra@samba.org>
Thu, 17 Dec 2020 00:38:28 +0000 (16:38 -0800)
committerJeremy Allison <jra@samba.org>
Thu, 17 Dec 2020 18:56:28 +0000 (18:56 +0000)
This must be the case, so assert it.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/close.c

index f1aca052470d3d6a0e6ed9232289a23ca4a7266c..e53faf98007e24237184d9449c020bd9af904f84 100644 (file)
@@ -706,6 +706,8 @@ static NTSTATUS close_normal_file(struct smb_request *req, files_struct *fsp,
        connection_struct *conn = fsp->conn;
        bool is_durable = false;
 
+       SMB_ASSERT(fsp->fsp_flags.is_fsa);
+
        assert_no_pending_aio(fsp, close_type);
 
        while (talloc_array_length(fsp->blocked_smb1_lock_reqs) != 0) {
@@ -1149,6 +1151,8 @@ static NTSTATUS close_directory(struct smb_request *req, files_struct *fsp,
        const struct security_unix_token *del_token = NULL;
        NTSTATUS notify_status;
 
+       SMB_ASSERT(fsp->fsp_flags.is_fsa);
+
        if (fsp->conn->sconn->using_smb2) {
                notify_status = NT_STATUS_NOTIFY_CLEANUP;
        } else {