smbXsrv_client: ignore NAME_NOT_FOUND from smb2srv_client_connection_passed
commit41e016e41c5162d736a1cf00fc873507e4b1e767
authorStefan Metzmacher <metze@samba.org>
Wed, 12 Oct 2022 11:30:32 +0000 (12 13:30 +0200)
committerJule Anger <janger@samba.org>
Tue, 18 Oct 2022 13:32:10 +0000 (18 13:32 +0000)
tree6354610a56d64b6d0e3bafcdaabde071c3673c6a
parentcb27978c461e276d31029474454ede3fc37483bf
smbXsrv_client: ignore NAME_NOT_FOUND from smb2srv_client_connection_passed

If we hit a race, when a client disconnects the connection after the initial
SMB2 Negotiate request, before the connection is completely passed to
process serving the given client guid, the temporary smbd which accepted the
new connection may already detected the disconnect and exitted before
the long term smbd servicing the client guid was able to send the
MSG_SMBXSRV_CONNECTION_PASSED message.

The result was a log message like this:

  smbXsrv_client_connection_pass_loop: smb2srv_client_connection_passed() failed => NT_STATUS_OBJECT_NAME_NOT_FOUND

and all connections belonging to the client guid were dropped,
because we called exit_server_cleanly().

Now we ignore NT_STATUS_OBJECT_NAME_NOT_FOUND from
smb2srv_client_connection_passed() and let the normal
event loop detect the broken connection, so that only
that connection is terminated (not the whole smbd process).

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15200

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 636ec45c93ad040ba70296aa543884c145b3e789)
source3/smbd/smbXsrv_client.c