summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-05-25 15:40:35 +1000
committerGünther Deschner <gd@samba.org>2010-05-31 15:10:44 +0200
commit723ea68d3b69a9fc31dc02256c4fc323dc9278ce (patch)
tree997a1b55d56dca352a50904e322c8c871b26655b /source3
parent3b706865f6bae7a2b04590da160bda939a3bafe5 (diff)
downloadsamba-723ea68d3b69a9fc31dc02256c4fc323dc9278ce.tar.gz
samba-723ea68d3b69a9fc31dc02256c4fc323dc9278ce.tar.bz2
samba-723ea68d3b69a9fc31dc02256c4fc323dc9278ce.zip
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>
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/auth_ntlmssp.c24
-rw-r--r--source3/include/auth.h2
-rw-r--r--source3/include/ntdomain.h2
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/rpc_server/srv_pipe.c14
-rw-r--r--source3/smbd/globals.h2
-rw-r--r--source3/smbd/seal.c2
-rw-r--r--source3/smbd/sesssetup.c6
8 files changed, 26 insertions, 27 deletions
diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c
index cdc00d80c0..e4505eb1bd 100644
--- a/source3/auth/auth_ntlmssp.c
+++ b/source3/auth/auth_ntlmssp.c
@@ -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);
diff --git a/source3/include/auth.h b/source3/include/auth.h
index cb849f542f..ed422c24a0 100644
--- a/source3/include/auth.h
+++ b/source3/include/auth.h
@@ -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
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h
index c98ee181d5..668691fb47 100644
--- a/source3/include/ntdomain.h
+++ b/source3/include/ntdomain.h
@@ -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 *);
diff --git a/source3/include/proto.h b/source3/include/proto.h
index d97ef520d5..d479edbc9f 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -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,
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index bd09386dc0..53acc1a68c 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -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;
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index bb4f695010..cd4516501b 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -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;
diff --git a/source3/smbd/seal.c b/source3/smbd/seal.c
index 4662507c90..4acf5b09b5 100644
--- a/source3/smbd/seal.c
+++ b/source3/smbd/seal.c
@@ -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. */
};
/******************************************************************************
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index ec82406349..4ac13988a5 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -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;