mirror of
https://github.com/samba-team/samba.git
synced 2025-03-10 12:58:35 +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
source3
@ -31,17 +31,6 @@
|
|||||||
#include "librpc/rpc/dcerpc.h"
|
#include "librpc/rpc/dcerpc.h"
|
||||||
#include "lib/param/param.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,
|
static NTSTATUS gensec_ntlmssp3_server_session_info(struct gensec_security *gensec_security,
|
||||||
TALLOC_CTX *mem_ctx,
|
TALLOC_CTX *mem_ctx,
|
||||||
struct auth_session_info **session_info)
|
struct auth_session_info **session_info)
|
||||||
|
@ -69,9 +69,6 @@ NTSTATUS auth_netlogond_init(void);
|
|||||||
|
|
||||||
/* The following definitions come from auth/auth_ntlmssp.c */
|
/* 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,
|
NTSTATUS auth_ntlmssp_prepare(const struct tsocket_address *remote_address,
|
||||||
struct auth_ntlmssp_state **auth_ntlmssp_state);
|
struct auth_ntlmssp_state **auth_ntlmssp_state);
|
||||||
NTSTATUS auth_ntlmssp_start(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 "../auth/ntlmssp/ntlmssp.h"
|
||||||
#include "ntlmssp_wrap.h"
|
#include "ntlmssp_wrap.h"
|
||||||
#include "auth.h"
|
#include "auth.h"
|
||||||
|
#include "auth/gensec/gensec.h"
|
||||||
|
|
||||||
NTSTATUS ntlmssp_server_auth_start(TALLOC_CTX *mem_ctx,
|
NTSTATUS ntlmssp_server_auth_start(TALLOC_CTX *mem_ctx,
|
||||||
bool do_sign,
|
bool do_sign,
|
||||||
@ -117,7 +118,7 @@ NTSTATUS ntlmssp_server_get_user_info(struct auth_ntlmssp_state *ctx,
|
|||||||
{
|
{
|
||||||
NTSTATUS status;
|
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)) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
DEBUG(1, (__location__ ": Failed to get authenticated user "
|
DEBUG(1, (__location__ ": Failed to get authenticated user "
|
||||||
"info: %s\n", nt_errstr(status)));
|
"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;
|
struct smbd_server_connection *sconn = req->sconn;
|
||||||
|
|
||||||
if (NT_STATUS_IS_OK(nt_status)) {
|
if (NT_STATUS_IS_OK(nt_status)) {
|
||||||
nt_status = auth_ntlmssp_session_info(talloc_tos(),
|
nt_status = gensec_session_info((*auth_ntlmssp_state)->gensec_security,
|
||||||
(*auth_ntlmssp_state), &session_info);
|
talloc_tos(),
|
||||||
|
&session_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
reply_outbuf(req, 4, 0);
|
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.
|
/* If status is NT_STATUS_OK then we need to get the token.
|
||||||
* Map to guest is now internal to auth_ntlmssp */
|
* Map to guest is now internal to auth_ntlmssp */
|
||||||
if (NT_STATUS_IS_OK(status)) {
|
if (NT_STATUS_IS_OK(status)) {
|
||||||
status = auth_ntlmssp_session_info(session,
|
status = gensec_session_info(session->auth_ntlmssp_state->gensec_security,
|
||||||
session->auth_ntlmssp_state,
|
session,
|
||||||
&session->session_info);
|
&session->session_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!NT_STATUS_IS_OK(status) &&
|
if (!NT_STATUS_IS_OK(status) &&
|
||||||
@ -671,9 +671,9 @@ static NTSTATUS smbd_smb2_raw_ntlmssp_auth(struct smbd_smb2_session *session,
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = auth_ntlmssp_session_info(session,
|
status = gensec_session_info(session->auth_ntlmssp_state->gensec_security,
|
||||||
session->auth_ntlmssp_state,
|
session,
|
||||||
&session->session_info);
|
&session->session_info);
|
||||||
|
|
||||||
if (!NT_STATUS_IS_OK(status)) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
TALLOC_FREE(session->auth_ntlmssp_state);
|
TALLOC_FREE(session->auth_ntlmssp_state);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user