s3:smbd: make sure we detect stale smbXsrv_connection pointers in smbXsrv_session_auth0
authorStefan Metzmacher <metze@samba.org>
Wed, 1 Jul 2020 16:02:16 +0000 (18:02 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 8 Jul 2020 15:54:41 +0000 (15:54 +0000)
commitecef3fe077d6a44659c7bb9d30dfcab61c64f0e8
tree2fb2e4de1719be5c5c17fc27b4b11434bbfc941c
parent876a84493bb4c90edc01f49cdd332275383a8eb0
s3:smbd: make sure we detect stale smbXsrv_connection pointers in smbXsrv_session_auth0

Pointer values can be reused (yes, I hit that during my testing!).
Introduce a channel_id to identify connections and also add
some timestamps to make debugging easier.

This makes smbXsrv_session_find_auth() much more robust.

This is a similar change as 0cec96526bf4d3209caf36c4a19632ff5d5dd112:
 "smb2_server: make sure we detect stale smbXsrv_connection pointers in smbXsrv_channel_global"

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
source3/librpc/idl/smbXsrv.idl
source3/smbd/smbXsrv_session.c