mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
s3:auth Remove AUTH_NTLMSSP_STATE typedef.
typedefs are no longer preferred Samba style. Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Günther Deschner <gd@samba.org>
This commit is contained in:
parent
3b706865f6
commit
723ea68d3b
@ -118,8 +118,8 @@ const char *auth_ntlmssp_get_client(struct auth_ntlmssp_state *auth_ntlmssp_stat
|
||||
static NTSTATUS auth_ntlmssp_get_challenge(const struct ntlmssp_state *ntlmssp_state,
|
||||
uint8_t chal[8])
|
||||
{
|
||||
AUTH_NTLMSSP_STATE *auth_ntlmssp_state =
|
||||
(AUTH_NTLMSSP_STATE *)ntlmssp_state->callback_private;
|
||||
struct auth_ntlmssp_state *auth_ntlmssp_state =
|
||||
(struct auth_ntlmssp_state *)ntlmssp_state->callback_private;
|
||||
auth_ntlmssp_state->auth_context->get_ntlm_challenge(
|
||||
auth_ntlmssp_state->auth_context, chal);
|
||||
return NT_STATUS_OK;
|
||||
@ -132,8 +132,8 @@ static NTSTATUS auth_ntlmssp_get_challenge(const struct ntlmssp_state *ntlmssp_s
|
||||
*/
|
||||
static bool auth_ntlmssp_may_set_challenge(const struct ntlmssp_state *ntlmssp_state)
|
||||
{
|
||||
AUTH_NTLMSSP_STATE *auth_ntlmssp_state =
|
||||
(AUTH_NTLMSSP_STATE *)ntlmssp_state->callback_private;
|
||||
struct auth_ntlmssp_state *auth_ntlmssp_state =
|
||||
(struct auth_ntlmssp_state *)ntlmssp_state->callback_private;
|
||||
struct auth_context *auth_context = auth_ntlmssp_state->auth_context;
|
||||
|
||||
return auth_context->challenge_may_be_modified;
|
||||
@ -145,8 +145,8 @@ static bool auth_ntlmssp_may_set_challenge(const struct ntlmssp_state *ntlmssp_s
|
||||
*/
|
||||
static NTSTATUS auth_ntlmssp_set_challenge(struct ntlmssp_state *ntlmssp_state, DATA_BLOB *challenge)
|
||||
{
|
||||
AUTH_NTLMSSP_STATE *auth_ntlmssp_state =
|
||||
(AUTH_NTLMSSP_STATE *)ntlmssp_state->callback_private;
|
||||
struct auth_ntlmssp_state *auth_ntlmssp_state =
|
||||
(struct auth_ntlmssp_state *)ntlmssp_state->callback_private;
|
||||
struct auth_context *auth_context = auth_ntlmssp_state->auth_context;
|
||||
|
||||
SMB_ASSERT(challenge->length == 8);
|
||||
@ -170,8 +170,8 @@ static NTSTATUS auth_ntlmssp_set_challenge(struct ntlmssp_state *ntlmssp_state,
|
||||
|
||||
static NTSTATUS auth_ntlmssp_check_password(struct ntlmssp_state *ntlmssp_state, DATA_BLOB *user_session_key, DATA_BLOB *lm_session_key)
|
||||
{
|
||||
AUTH_NTLMSSP_STATE *auth_ntlmssp_state =
|
||||
(AUTH_NTLMSSP_STATE *)ntlmssp_state->callback_private;
|
||||
struct auth_ntlmssp_state *auth_ntlmssp_state =
|
||||
(struct auth_ntlmssp_state *)ntlmssp_state->callback_private;
|
||||
struct auth_usersupplied_info *user_info = NULL;
|
||||
NTSTATUS nt_status;
|
||||
bool username_was_mapped;
|
||||
@ -240,7 +240,7 @@ static NTSTATUS auth_ntlmssp_check_password(struct ntlmssp_state *ntlmssp_state,
|
||||
return nt_status;
|
||||
}
|
||||
|
||||
NTSTATUS auth_ntlmssp_start(AUTH_NTLMSSP_STATE **auth_ntlmssp_state)
|
||||
NTSTATUS auth_ntlmssp_start(struct auth_ntlmssp_state **auth_ntlmssp_state)
|
||||
{
|
||||
NTSTATUS nt_status;
|
||||
TALLOC_CTX *mem_ctx;
|
||||
@ -267,7 +267,7 @@ NTSTATUS auth_ntlmssp_start(AUTH_NTLMSSP_STATE **auth_ntlmssp_state)
|
||||
|
||||
mem_ctx = talloc_init("AUTH NTLMSSP context");
|
||||
|
||||
*auth_ntlmssp_state = TALLOC_ZERO_P(mem_ctx, AUTH_NTLMSSP_STATE);
|
||||
*auth_ntlmssp_state = TALLOC_ZERO_P(mem_ctx, struct auth_ntlmssp_state);
|
||||
if (!*auth_ntlmssp_state) {
|
||||
DEBUG(0,("auth_ntlmssp_start: talloc failed!\n"));
|
||||
talloc_destroy(mem_ctx);
|
||||
@ -302,7 +302,7 @@ NTSTATUS auth_ntlmssp_start(AUTH_NTLMSSP_STATE **auth_ntlmssp_state)
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
void auth_ntlmssp_end(AUTH_NTLMSSP_STATE **auth_ntlmssp_state)
|
||||
void auth_ntlmssp_end(struct auth_ntlmssp_state **auth_ntlmssp_state)
|
||||
{
|
||||
TALLOC_CTX *mem_ctx;
|
||||
|
||||
@ -324,7 +324,7 @@ void auth_ntlmssp_end(AUTH_NTLMSSP_STATE **auth_ntlmssp_state)
|
||||
*auth_ntlmssp_state = NULL;
|
||||
}
|
||||
|
||||
NTSTATUS auth_ntlmssp_update(AUTH_NTLMSSP_STATE *auth_ntlmssp_state,
|
||||
NTSTATUS auth_ntlmssp_update(struct auth_ntlmssp_state *auth_ntlmssp_state,
|
||||
const DATA_BLOB request, DATA_BLOB *reply)
|
||||
{
|
||||
return ntlmssp_update(auth_ntlmssp_state->ntlmssp_state, request, reply);
|
||||
|
@ -143,7 +143,7 @@ struct auth_init_function_entry {
|
||||
struct auth_init_function_entry *prev, *next;
|
||||
};
|
||||
|
||||
typedef struct auth_ntlmssp_state AUTH_NTLMSSP_STATE;
|
||||
struct auth_ntlmssp_state;
|
||||
|
||||
/* Changed from 1 -> 2 to add the logon_parameters field. */
|
||||
#define AUTH_INTERFACE_VERSION 2
|
||||
|
@ -147,7 +147,7 @@ struct pipe_auth_data {
|
||||
enum dcerpc_AuthLevel auth_level;
|
||||
union {
|
||||
struct schannel_state *schannel_auth;
|
||||
AUTH_NTLMSSP_STATE *auth_ntlmssp_state;
|
||||
struct auth_ntlmssp_state *auth_ntlmssp_state;
|
||||
/* struct kerberos_auth_struct *kerberos_auth; TO BE ADDED... */
|
||||
} a_u;
|
||||
void (*auth_data_free_func)(struct pipe_auth_data *);
|
||||
|
@ -62,7 +62,6 @@ const char *auth_ntlmssp_get_domain(struct auth_ntlmssp_state *auth_ntlmssp_stat
|
||||
const char *auth_ntlmssp_get_client(struct auth_ntlmssp_state *auth_ntlmssp_state);
|
||||
bool auth_ntlmssp_negotiated_sign(struct auth_ntlmssp_state *auth_ntlmssp_state);
|
||||
bool auth_ntlmssp_negotiated_seal(struct auth_ntlmssp_state *auth_ntlmssp_state);
|
||||
|
||||
NTSTATUS auth_ntlmssp_start(struct auth_ntlmssp_state **auth_ntlmssp_state);
|
||||
void auth_ntlmssp_end(struct auth_ntlmssp_state **auth_ntlmssp_state);
|
||||
NTSTATUS auth_ntlmssp_update(struct auth_ntlmssp_state *auth_ntlmssp_state,
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
static void free_pipe_ntlmssp_auth_data(struct pipe_auth_data *auth)
|
||||
{
|
||||
AUTH_NTLMSSP_STATE *a = auth->a_u.auth_ntlmssp_state;
|
||||
struct auth_ntlmssp_state *a = auth->a_u.auth_ntlmssp_state;
|
||||
|
||||
if (a) {
|
||||
auth_ntlmssp_end(&a);
|
||||
@ -67,7 +67,7 @@ static bool create_next_pdu_ntlmssp(pipes_struct *p)
|
||||
DATA_BLOB auth_blob;
|
||||
RPC_HDR_AUTH auth_info;
|
||||
uint8 auth_type, auth_level;
|
||||
AUTH_NTLMSSP_STATE *a = p->auth.a_u.auth_ntlmssp_state;
|
||||
struct auth_ntlmssp_state *a = p->auth.a_u.auth_ntlmssp_state;
|
||||
|
||||
/*
|
||||
* If we're in the fault state, keep returning fault PDU's until
|
||||
@ -659,7 +659,7 @@ static bool pipe_ntlmssp_verify_final(pipes_struct *p, DATA_BLOB *p_resp_blob)
|
||||
{
|
||||
DATA_BLOB session_key, reply;
|
||||
NTSTATUS status;
|
||||
AUTH_NTLMSSP_STATE *a = p->auth.a_u.auth_ntlmssp_state;
|
||||
struct auth_ntlmssp_state *a = p->auth.a_u.auth_ntlmssp_state;
|
||||
bool ret;
|
||||
|
||||
DEBUG(5,("pipe_ntlmssp_verify_final: pipe %s checking user details\n",
|
||||
@ -1215,7 +1215,7 @@ static bool pipe_spnego_auth_bind_negotiate(pipes_struct *p, prs_struct *rpc_in_
|
||||
int i;
|
||||
NTSTATUS status;
|
||||
bool got_kerberos_mechanism = false;
|
||||
AUTH_NTLMSSP_STATE *a = NULL;
|
||||
struct auth_ntlmssp_state *a = NULL;
|
||||
RPC_HDR_AUTH auth_info;
|
||||
|
||||
ZERO_STRUCT(secblob);
|
||||
@ -1348,7 +1348,7 @@ static bool pipe_spnego_auth_bind_continue(pipes_struct *p, prs_struct *rpc_in_p
|
||||
DATA_BLOB auth_blob;
|
||||
DATA_BLOB auth_reply;
|
||||
DATA_BLOB response;
|
||||
AUTH_NTLMSSP_STATE *a = p->auth.a_u.auth_ntlmssp_state;
|
||||
struct auth_ntlmssp_state *a = p->auth.a_u.auth_ntlmssp_state;
|
||||
|
||||
ZERO_STRUCT(spnego_blob);
|
||||
ZERO_STRUCT(auth_blob);
|
||||
@ -1578,7 +1578,7 @@ static bool pipe_ntlmssp_auth_bind(pipes_struct *p, prs_struct *rpc_in_p,
|
||||
DATA_BLOB blob;
|
||||
DATA_BLOB response;
|
||||
NTSTATUS status;
|
||||
AUTH_NTLMSSP_STATE *a = NULL;
|
||||
struct auth_ntlmssp_state *a = NULL;
|
||||
|
||||
ZERO_STRUCT(blob);
|
||||
ZERO_STRUCT(response);
|
||||
@ -2243,7 +2243,7 @@ bool api_pipe_ntlmssp_auth_process(pipes_struct *p, prs_struct *rpc_in,
|
||||
RPC_HDR_AUTH auth_info;
|
||||
uint32 auth_len = p->hdr.auth_len;
|
||||
uint32 save_offset = prs_offset(rpc_in);
|
||||
AUTH_NTLMSSP_STATE *a = p->auth.a_u.auth_ntlmssp_state;
|
||||
struct auth_ntlmssp_state *a = p->auth.a_u.auth_ntlmssp_state;
|
||||
unsigned char *data = NULL;
|
||||
size_t data_len;
|
||||
unsigned char *full_packet_data = NULL;
|
||||
|
@ -419,7 +419,7 @@ struct smbd_smb2_session {
|
||||
struct smbd_server_connection *sconn;
|
||||
NTSTATUS status;
|
||||
uint64_t vuid;
|
||||
AUTH_NTLMSSP_STATE *auth_ntlmssp_state;
|
||||
struct auth_ntlmssp_state *auth_ntlmssp_state;
|
||||
struct auth_serversupplied_info *server_info;
|
||||
DATA_BLOB session_key;
|
||||
bool do_signing;
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
struct smb_srv_trans_enc_ctx {
|
||||
struct smb_trans_enc_state *es;
|
||||
AUTH_NTLMSSP_STATE *auth_ntlmssp_state; /* Must be kept in sync with pointer in ec->ntlmssp_state. */
|
||||
struct auth_ntlmssp_state *auth_ntlmssp_state; /* Must be kept in sync with pointer in ec->ntlmssp_state. */
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -624,7 +624,7 @@ static void reply_spnego_kerberos(struct smb_request *req,
|
||||
|
||||
static void reply_spnego_ntlmssp(struct smb_request *req,
|
||||
uint16 vuid,
|
||||
AUTH_NTLMSSP_STATE **auth_ntlmssp_state,
|
||||
struct auth_ntlmssp_state **auth_ntlmssp_state,
|
||||
DATA_BLOB *ntlmssp_blob, NTSTATUS nt_status,
|
||||
const char *OID,
|
||||
bool wrap)
|
||||
@ -779,7 +779,7 @@ static void reply_spnego_downgrade_to_ntlmssp(struct smb_request *req,
|
||||
static void reply_spnego_negotiate(struct smb_request *req,
|
||||
uint16 vuid,
|
||||
DATA_BLOB blob1,
|
||||
AUTH_NTLMSSP_STATE **auth_ntlmssp_state)
|
||||
struct auth_ntlmssp_state **auth_ntlmssp_state)
|
||||
{
|
||||
DATA_BLOB secblob;
|
||||
DATA_BLOB chal;
|
||||
@ -856,7 +856,7 @@ static void reply_spnego_negotiate(struct smb_request *req,
|
||||
static void reply_spnego_auth(struct smb_request *req,
|
||||
uint16 vuid,
|
||||
DATA_BLOB blob1,
|
||||
AUTH_NTLMSSP_STATE **auth_ntlmssp_state)
|
||||
struct auth_ntlmssp_state **auth_ntlmssp_state)
|
||||
{
|
||||
DATA_BLOB auth = data_blob_null;
|
||||
DATA_BLOB auth_reply = data_blob_null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user