This is better than NT_STATUS_USER_SESSION_DELETED, as it means the
client can keep it's session alive. Otherwise a windows client believes
the whole session is gone and all other channels are invalid.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
if (NT_STATUS_EQUAL(status, NT_STATUS_BAD_LOGON_SESSION_STATE)) {
/*
* This comes from smb2srv_session_lookup_global().
+ * And it's a cross node/cross smbd session bind,
+ * which can't work in our architecture.
+ *
+ * Returning NT_STATUS_REQUEST_NOT_ACCEPTED is better
+ * than NT_STATUS_USER_SESSION_DELETED in order to
+ * avoid a completely new session.
*/
- tevent_req_nterror(req, NT_STATUS_USER_SESSION_DELETED);
+ tevent_req_nterror(req, NT_STATUS_REQUEST_NOT_ACCEPTED);
return tevent_req_post(req, ev);
}