mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s3:smbd: make sure smbXsrv_session_update() doesn't segfault with table == NULL
There might be other places than smb2srv_update_crypto_flags(), which may call smbXsrv_session_update() with a fake session, they should return in error instead of segfaulting. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
aa29d89942
commit
1781910df6
@ -1426,6 +1426,13 @@ NTSTATUS smbXsrv_session_update(struct smbXsrv_session *session)
|
||||
return NT_STATUS_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
if (table == NULL) {
|
||||
DEBUG(0, ("smbXsrv_session_update(0x%08x): "
|
||||
"Called with table == NULL'\n",
|
||||
session->global->session_global_id));
|
||||
return NT_STATUS_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
session->global->db_rec = smbXsrv_session_global_fetch_locked(
|
||||
table->global.db_ctx,
|
||||
session->global->session_global_id,
|
||||
|
Loading…
Reference in New Issue
Block a user