summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-06-08 10:26:08 +0200
committerVolker Lendecke <vl@samba.org>2010-06-08 11:38:08 +0200
commit34b29b11986095531488cd0139ecec6dd22e55d3 (patch)
treecc0cd34bd3fab4df13eba3a90e6ce99468cf6b58 /source3
parent984fec252af70ef54461ca84a6afedb97ff81dec (diff)
downloadsamba-34b29b11986095531488cd0139ecec6dd22e55d3.tar.gz
samba-34b29b11986095531488cd0139ecec6dd22e55d3.tar.bz2
samba-34b29b11986095531488cd0139ecec6dd22e55d3.zip
Revert "s3:auth Change auth_ntlmssp_server_info API to return NTSTATUS"
This reverts commit edba46ce94c335411ab337eeb4ef6f88fb3aae80. Conflicts: source3/auth/auth_ntlmssp.c
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/auth_ntlmssp.c10
-rw-r--r--source3/include/proto.h5
-rw-r--r--source3/rpc_server/srv_pipe.c7
-rw-r--r--source3/smbd/sesssetup.c2
-rw-r--r--source3/smbd/smb2_sesssetup.c7
5 files changed, 13 insertions, 18 deletions
diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c
index 7184fa6b95..df4666aaee 100644
--- a/source3/auth/auth_ntlmssp.c
+++ b/source3/auth/auth_ntlmssp.c
@@ -84,9 +84,8 @@ void auth_ntlmssp_want_seal(struct auth_ntlmssp_state *auth_ntlmssp_state)
}
-NTSTATUS auth_ntlmssp_server_info(TALLOC_CTX *mem_ctx,
- struct auth_ntlmssp_state *auth_ntlmssp_state,
- struct auth_serversupplied_info **_server_info)
+struct auth_serversupplied_info *auth_ntlmssp_server_info(TALLOC_CTX *mem_ctx,
+ struct auth_ntlmssp_state *auth_ntlmssp_state)
{
struct auth_serversupplied_info *server_info = auth_ntlmssp_state->server_info;
data_blob_free(&server_info->user_session_key);
@@ -96,11 +95,10 @@ NTSTATUS auth_ntlmssp_server_info(TALLOC_CTX *mem_ctx,
auth_ntlmssp_state->ntlmssp_state->session_key.data,
auth_ntlmssp_state->ntlmssp_state->session_key.length);
if (auth_ntlmssp_state->ntlmssp_state->session_key.length && !server_info->user_session_key.data) {
- return NT_STATUS_NO_MEMORY;
+ return NULL;
}
auth_ntlmssp_state->server_info = NULL;
- *_server_info = talloc_steal(mem_ctx, server_info);
- return NT_STATUS_OK;
+ return talloc_steal(mem_ctx, server_info);
}
struct ntlmssp_state *auth_ntlmssp_get_ntlmssp_state(struct auth_ntlmssp_state *auth_ntlmssp_state)
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 2f68f0efc6..f0538ee401 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -54,9 +54,8 @@ NTSTATUS auth_netlogond_init(void);
/* The following definitions come from auth/auth_ntlmssp.c */
-NTSTATUS auth_ntlmssp_server_info(TALLOC_CTX *mem_ctx,
- struct auth_ntlmssp_state *auth_ntlmssp_state,
- struct auth_serversupplied_info **_server_info);
+struct auth_serversupplied_info *auth_ntlmssp_server_info(TALLOC_CTX *mem_ctx,
+ struct auth_ntlmssp_state *auth_ntlmssp_state);
struct ntlmssp_state *auth_ntlmssp_get_ntlmssp_state(struct auth_ntlmssp_state *auth_ntlmssp_state);
const char *auth_ntlmssp_get_username(struct auth_ntlmssp_state *auth_ntlmssp_state);
const char *auth_ntlmssp_get_domain(struct auth_ntlmssp_state *auth_ntlmssp_state);
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 4678aeb698..d1f9823b49 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -713,10 +713,9 @@ static bool pipe_ntlmssp_verify_final(pipes_struct *p, DATA_BLOB *p_resp_blob)
TALLOC_FREE(p->server_info);
- status = auth_ntlmssp_server_info(p, a, &p->server_info);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("auth_ntlmssp_server_info failed to obtain the server info for authenticated user: %s\n",
- nt_errstr(status)));
+ p->server_info = auth_ntlmssp_server_info(p, a);
+ if (p->server_info == NULL) {
+ DEBUG(0, ("auth_ntlmssp_server_info failed to obtain the server info for authenticated user\n"));
return false;
}
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 28e5aea39b..d707ba3021 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)) {
- nt_status = auth_ntlmssp_server_info(talloc_tos(), (*auth_ntlmssp_state), &server_info);
+ server_info = auth_ntlmssp_server_info(talloc_tos(), (*auth_ntlmssp_state));
} 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 963dbe19e1..af9157107e 100644
--- a/source3/smbd/smb2_sesssetup.c
+++ b/source3/smbd/smb2_sesssetup.c
@@ -614,12 +614,11 @@ static NTSTATUS smbd_smb2_common_ntlmssp_auth_return(struct smbd_smb2_session *s
uint64_t *out_session_id)
{
fstring tmp;
- NTSTATUS status = auth_ntlmssp_server_info(session, session->auth_ntlmssp_state,
- &session->server_info);
- if (!NT_STATUS_IS_OK(status)) {
+ session->server_info = auth_ntlmssp_server_info(session, session->auth_ntlmssp_state);
+ if (!session->server_info) {
auth_ntlmssp_end(&session->auth_ntlmssp_state);
TALLOC_FREE(session);
- return status;
+ return NT_STATUS_NO_MEMORY;
}
if ((in_security_mode & SMB2_NEGOTIATE_SIGNING_REQUIRED) ||