From 0d95cee58f80e46636fa4b826d248c9ce9983c9b Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 12 Jul 2010 14:26:34 +1000 Subject: s3:auth Change auth_ntlmssp_server_info API to return NTSTATUS This fixes a bug where register_existing_vuid() could be called with a NULL server_info if the alloction failed. Andrew Bartlett Signed-off-by: Andrew Tridgell --- source3/smbd/smb2_sesssetup.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source3/smbd/smb2_sesssetup.c') diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c index 56aa2b8039..6586a45439 100644 --- a/source3/smbd/smb2_sesssetup.c +++ b/source3/smbd/smb2_sesssetup.c @@ -615,11 +615,12 @@ static NTSTATUS smbd_smb2_common_ntlmssp_auth_return(struct smbd_smb2_session *s uint64_t *out_session_id) { fstring tmp; - session->server_info = auth_ntlmssp_server_info(session, session->auth_ntlmssp_state); - if (!session->server_info) { + NTSTATUS status = auth_ntlmssp_server_info(session, session->auth_ntlmssp_state, + &session->server_info); + if (!NT_STATUS_IS_OK(status)) { auth_ntlmssp_end(&session->auth_ntlmssp_state); TALLOC_FREE(session); - return NT_STATUS_NO_MEMORY; + return status; } if ((in_security_mode & SMB2_NEGOTIATE_SIGNING_REQUIRED) || -- cgit