]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_default: remove redundant checks
authorRalph Boehme <slow@samba.org>
Tue, 2 Dec 2025 18:58:41 +0000 (19:58 +0100)
committerRalph Boehme <slow@samba.org>
Fri, 17 Jul 2026 10:18:36 +0000 (10:18 +0000)
This stuff has already been checked by share_mode_entry_durable_reconnect_fn().

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/smbd/durable.c

index 5d153babf2cb310364ecc4ff9b460bc8702a14d1..aad56d9043682788ec0ea4ed7f93f5aebd40a6f7 100644 (file)
@@ -632,24 +632,6 @@ static void vfs_default_durable_reconnect_fn(struct share_mode_lock *lck,
                goto fail;
        }
 
-       if (!server_id_is_disconnected(&e.pid)) {
-               DEBUG(5, ("vfs_default_durable_reconnect: denying durable "
-                         "reconnect for handle that was not marked "
-                         "disconnected (e.g. smbd or cluster node died)\n"));
-               state->status = NT_STATUS_OBJECT_NAME_NOT_FOUND;
-               goto fail;
-       }
-
-       if (e.share_file_id != state->op->global->open_persistent_id) {
-               DBG_INFO("denying durable "
-                        "share_file_id changed %"PRIu64" != %"PRIu64" "
-                        "(e.g. another client had opened the file)\n",
-                        e.share_file_id,
-                        state->op->global->open_persistent_id);
-               state->status = NT_STATUS_OBJECT_NAME_NOT_FOUND;
-               goto fail;
-       }
-
        if ((e.access_mask & (FILE_WRITE_DATA|FILE_APPEND_DATA)) &&
            !CAN_WRITE(fsp->conn))
        {