mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
s3-auth rename auth_ntlmssp_steal_session_info()
There is no longer any theft of memory as the underlying routines now produce a new auth_session_info for this caller, allocating it on the supplied memory context. Andrew Bartlett
This commit is contained in:
parent
4379738e85
commit
8fca9741fe
@ -28,9 +28,9 @@
|
||||
#include "../lib/tsocket/tsocket.h"
|
||||
#include "auth/gensec/gensec.h"
|
||||
|
||||
NTSTATUS auth_ntlmssp_steal_session_info(TALLOC_CTX *mem_ctx,
|
||||
struct auth_ntlmssp_state *auth_ntlmssp_state,
|
||||
struct auth_session_info **session_info)
|
||||
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;
|
||||
if (auth_ntlmssp_state->gensec_security) {
|
||||
|
@ -69,9 +69,9 @@ NTSTATUS auth_netlogond_init(void);
|
||||
|
||||
/* The following definitions come from auth/auth_ntlmssp.c */
|
||||
|
||||
NTSTATUS auth_ntlmssp_steal_session_info(TALLOC_CTX *mem_ctx,
|
||||
struct auth_ntlmssp_state *auth_ntlmssp_state,
|
||||
struct auth_session_info **session_info);
|
||||
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);
|
||||
|
@ -117,7 +117,7 @@ NTSTATUS ntlmssp_server_get_user_info(struct auth_ntlmssp_state *ctx,
|
||||
{
|
||||
NTSTATUS status;
|
||||
|
||||
status = auth_ntlmssp_steal_session_info(mem_ctx, ctx, session_info);
|
||||
status = auth_ntlmssp_session_info(mem_ctx, ctx, session_info);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(1, (__location__ ": Failed to get authenticated user "
|
||||
"info: %s\n", nt_errstr(status)));
|
||||
|
@ -431,7 +431,7 @@ 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_steal_session_info(talloc_tos(),
|
||||
nt_status = auth_ntlmssp_session_info(talloc_tos(),
|
||||
(*auth_ntlmssp_state), &session_info);
|
||||
}
|
||||
|
||||
|
@ -591,9 +591,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_steal_session_info(session,
|
||||
session->auth_ntlmssp_state,
|
||||
&session->session_info);
|
||||
status = auth_ntlmssp_session_info(session,
|
||||
session->auth_ntlmssp_state,
|
||||
&session->session_info);
|
||||
}
|
||||
|
||||
if (!NT_STATUS_IS_OK(status) &&
|
||||
@ -672,9 +672,9 @@ static NTSTATUS smbd_smb2_raw_ntlmssp_auth(struct smbd_smb2_session *session,
|
||||
return status;
|
||||
}
|
||||
|
||||
status = auth_ntlmssp_steal_session_info(session,
|
||||
session->auth_ntlmssp_state,
|
||||
&session->session_info);
|
||||
status = auth_ntlmssp_session_info(session,
|
||||
session->auth_ntlmssp_state,
|
||||
&session->session_info);
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
TALLOC_FREE(session->auth_ntlmssp_state);
|
||||
|
Loading…
x
Reference in New Issue
Block a user