mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
s3-auth remove auth_ntlmssp_session_info()
Instead, call gensec_session_info() directly. Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
21a434d817
commit
915fe7981b
@ -31,17 +31,6 @@
|
||||
#include "librpc/rpc/dcerpc.h"
|
||||
#include "lib/param/param.h"
|
||||
|
||||
NTSTATUS auth_ntlmssp_session_info(TALLOC_CTX *mem_ctx,
|
||||
struct auth_ntlmssp_state *auth_ntlmssp_state,
|
||||
struct auth_session_info **session_info)
|
||||
{
|
||||
NTSTATUS nt_status;
|
||||
nt_status = gensec_session_info(auth_ntlmssp_state->gensec_security,
|
||||
mem_ctx,
|
||||
session_info);
|
||||
return nt_status;
|
||||
}
|
||||
|
||||
static NTSTATUS gensec_ntlmssp3_server_session_info(struct gensec_security *gensec_security,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct auth_session_info **session_info)
|
||||
|
@ -69,9 +69,6 @@ NTSTATUS auth_netlogond_init(void);
|
||||
|
||||
/* The following definitions come from auth/auth_ntlmssp.c */
|
||||
|
||||
NTSTATUS auth_ntlmssp_session_info(TALLOC_CTX *mem_ctx,
|
||||
struct auth_ntlmssp_state *auth_ntlmssp_state,
|
||||
struct auth_session_info **session_info);
|
||||
NTSTATUS auth_ntlmssp_prepare(const struct tsocket_address *remote_address,
|
||||
struct auth_ntlmssp_state **auth_ntlmssp_state);
|
||||
NTSTATUS auth_ntlmssp_start(struct auth_ntlmssp_state *auth_ntlmssp_state);
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "../auth/ntlmssp/ntlmssp.h"
|
||||
#include "ntlmssp_wrap.h"
|
||||
#include "auth.h"
|
||||
#include "auth/gensec/gensec.h"
|
||||
|
||||
NTSTATUS ntlmssp_server_auth_start(TALLOC_CTX *mem_ctx,
|
||||
bool do_sign,
|
||||
@ -117,7 +118,7 @@ NTSTATUS ntlmssp_server_get_user_info(struct auth_ntlmssp_state *ctx,
|
||||
{
|
||||
NTSTATUS status;
|
||||
|
||||
status = auth_ntlmssp_session_info(mem_ctx, ctx, session_info);
|
||||
status = gensec_session_info(ctx->gensec_security, mem_ctx, session_info);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(1, (__location__ ": Failed to get authenticated user "
|
||||
"info: %s\n", nt_errstr(status)));
|
||||
|
@ -431,8 +431,9 @@ static void reply_spnego_ntlmssp(struct smb_request *req,
|
||||
struct smbd_server_connection *sconn = req->sconn;
|
||||
|
||||
if (NT_STATUS_IS_OK(nt_status)) {
|
||||
nt_status = auth_ntlmssp_session_info(talloc_tos(),
|
||||
(*auth_ntlmssp_state), &session_info);
|
||||
nt_status = gensec_session_info((*auth_ntlmssp_state)->gensec_security,
|
||||
talloc_tos(),
|
||||
&session_info);
|
||||
}
|
||||
|
||||
reply_outbuf(req, 4, 0);
|
||||
|
@ -588,9 +588,9 @@ static NTSTATUS smbd_smb2_spnego_auth(struct smbd_smb2_session *session,
|
||||
/* If status is NT_STATUS_OK then we need to get the token.
|
||||
* Map to guest is now internal to auth_ntlmssp */
|
||||
if (NT_STATUS_IS_OK(status)) {
|
||||
status = auth_ntlmssp_session_info(session,
|
||||
session->auth_ntlmssp_state,
|
||||
&session->session_info);
|
||||
status = gensec_session_info(session->auth_ntlmssp_state->gensec_security,
|
||||
session,
|
||||
&session->session_info);
|
||||
}
|
||||
|
||||
if (!NT_STATUS_IS_OK(status) &&
|
||||
@ -671,9 +671,9 @@ static NTSTATUS smbd_smb2_raw_ntlmssp_auth(struct smbd_smb2_session *session,
|
||||
return status;
|
||||
}
|
||||
|
||||
status = auth_ntlmssp_session_info(session,
|
||||
session->auth_ntlmssp_state,
|
||||
&session->session_info);
|
||||
status = gensec_session_info(session->auth_ntlmssp_state->gensec_security,
|
||||
session,
|
||||
&session->session_info);
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
TALLOC_FREE(session->auth_ntlmssp_state);
|
||||
|
Loading…
x
Reference in New Issue
Block a user