For Durable Handles we set cookie.allow_reconnect in the SMB_VFS_DISCONNECT()
implemtation, but for Persistent Handles we can't rely on SMB_VFS_DISCONNECT()
being called in case of a server side process or node failure.
The whole disconnect/reconnect logic is therefor adjusted to make
SMB_VFS_DISCONNECT() a no-op for Persistent Handles.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
cookie.stat_info.st_ex_blocks = fsp->fsp_name->st.st_ex_blocks;
cookie.stat_info.st_ex_flags = fsp->fsp_name->st.st_ex_flags;
+ if (fsp->op->global->persistent) {
+ cookie.allow_reconnect = true;
+ }
+
if (CHECK_DEBUGLVL(DBGLVL_DEBUG)) {
DBG_DEBUG("Fresh cookie\n");
NDR_PRINT_DEBUG(vfs_default_durable_cookie, &cookie);