summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-06-02 22:35:53 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-06-07 23:34:29 +1000
commitedba46ce94c335411ab337eeb4ef6f88fb3aae80 (patch)
treebbf089ae7e6058e172bbbd697dfe889d685db6e0 /source3/smbd
parent0af2dc43ade4f819ebbb192e3f5493838f99d89b (diff)
downloadsamba-edba46ce94c335411ab337eeb4ef6f88fb3aae80.tar.gz
samba-edba46ce94c335411ab337eeb4ef6f88fb3aae80.tar.bz2
samba-edba46ce94c335411ab337eeb4ef6f88fb3aae80.zip
s3:auth Change auth_ntlmssp_server_info API to return NTSTATUS
It's nicer to have an NTSTATUS return, and in s3compat there may be a reason other than 'no memory' why this can fail. Andrew Bartlett
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/sesssetup.c2
-rw-r--r--source3/smbd/smb2_sesssetup.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index d707ba3021..28e5aea39b 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -637,7 +637,7 @@ static void reply_spnego_ntlmssp(struct smb_request *req,
struct smbd_server_connection *sconn = smbd_server_conn;
if (NT_STATUS_IS_OK(nt_status)) {
- server_info = auth_ntlmssp_server_info(talloc_tos(), (*auth_ntlmssp_state));
+ nt_status = auth_ntlmssp_server_info(talloc_tos(), (*auth_ntlmssp_state), &server_info);
} else {
/* Note that this server_info won't have a session
* key. But for map to guest, that's exactly the right
diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c
index af9157107e..963dbe19e1 100644
--- a/source3/smbd/smb2_sesssetup.c
+++ b/source3/smbd/smb2_sesssetup.c
@@ -614,11 +614,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) ||