1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

s3-auth rename auth_ntlmssp_state -> auth_generic_state

This structure handles more than NTLMSSP now, at least when we are an AD DC
and so changing the name may avoid some confusion in the future.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Andrew Bartlett 2011-12-16 16:07:24 +11:00 committed by Stefan Metzmacher
parent 0b7bc1c45c
commit 6391fff9da
14 changed files with 35 additions and 35 deletions

View File

@ -211,13 +211,13 @@ static NTSTATUS auth_ntlmssp_check_password(struct ntlmssp_state *ntlmssp_state,
}
NTSTATUS auth_ntlmssp_prepare(const struct tsocket_address *remote_address,
struct auth_ntlmssp_state **auth_ntlmssp_state)
struct auth_generic_state **auth_ntlmssp_state)
{
struct auth_context *auth_context;
struct auth_ntlmssp_state *ans;
struct auth_generic_state *ans;
NTSTATUS nt_status;
ans = talloc_zero(NULL, struct auth_ntlmssp_state);
ans = talloc_zero(NULL, struct auth_generic_state);
if (!ans) {
DEBUG(0,("auth_ntlmssp_start: talloc failed!\n"));
return NT_STATUS_NO_MEMORY;
@ -371,7 +371,7 @@ static const struct gensec_security_ops gensec_ntlmssp3_server_ops = {
.priority = GENSEC_NTLMSSP
};
NTSTATUS auth_generic_start(struct auth_ntlmssp_state *auth_ntlmssp_state, const char *oid)
NTSTATUS auth_generic_start(struct auth_generic_state *auth_ntlmssp_state, const char *oid)
{
struct gensec_ntlmssp_context *gensec_ntlmssp;
NTSTATUS status;
@ -400,7 +400,7 @@ NTSTATUS auth_generic_start(struct auth_ntlmssp_state *auth_ntlmssp_state, const
return NT_STATUS_OK;
}
NTSTATUS auth_generic_authtype_start(struct auth_ntlmssp_state *auth_ntlmssp_state,
NTSTATUS auth_generic_authtype_start(struct auth_generic_state *auth_ntlmssp_state,
uint8_t auth_type, uint8_t auth_level)
{
struct gensec_ntlmssp_context *gensec_ntlmssp;
@ -458,7 +458,7 @@ NTSTATUS auth_generic_authtype_start(struct auth_ntlmssp_state *auth_ntlmssp_sta
return NT_STATUS_OK;
}
NTSTATUS auth_ntlmssp_start(struct auth_ntlmssp_state *auth_ntlmssp_state)
NTSTATUS auth_ntlmssp_start(struct auth_generic_state *auth_ntlmssp_state)
{
return auth_generic_start(auth_ntlmssp_state, GENSEC_OID_NTLMSSP);
}

View File

@ -70,10 +70,10 @@ NTSTATUS auth_netlogond_init(void);
/* The following definitions come from auth/auth_ntlmssp.c */
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);
NTSTATUS auth_generic_start(struct auth_ntlmssp_state *auth_ntlmssp_state, const char *oid);
NTSTATUS auth_generic_authtype_start(struct auth_ntlmssp_state *auth_ntlmssp_state,
struct auth_generic_state **auth_ntlmssp_state);
NTSTATUS auth_ntlmssp_start(struct auth_generic_state *auth_ntlmssp_state);
NTSTATUS auth_generic_start(struct auth_generic_state *auth_ntlmssp_state, const char *oid);
NTSTATUS auth_generic_authtype_start(struct auth_generic_state *auth_ntlmssp_state,
uint8_t auth_type, uint8_t auth_level);

View File

@ -137,7 +137,7 @@ struct auth_init_function_entry {
struct auth_init_function_entry *prev, *next;
};
struct auth_ntlmssp_state;
struct auth_generic_state;
/* Changed from 1 -> 2 to add the logon_parameters field. */
/* Changed from 2 -> 3 when we reworked many auth structures to use IDL or be in common with Samba4 */

View File

@ -23,7 +23,7 @@
struct gensec_security;
struct auth_ntlmssp_state {
struct auth_generic_state {
/* used only by server implementation */
struct auth_context *auth_context;
@ -34,14 +34,14 @@ struct auth_ntlmssp_state {
struct gensec_security *gensec_security;
};
NTSTATUS auth_ntlmssp_set_username(struct auth_ntlmssp_state *ans,
NTSTATUS auth_ntlmssp_set_username(struct auth_generic_state *ans,
const char *user);
NTSTATUS auth_ntlmssp_set_domain(struct auth_ntlmssp_state *ans,
NTSTATUS auth_ntlmssp_set_domain(struct auth_generic_state *ans,
const char *domain);
NTSTATUS auth_ntlmssp_set_password(struct auth_ntlmssp_state *ans,
NTSTATUS auth_ntlmssp_set_password(struct auth_generic_state *ans,
const char *password);
NTSTATUS auth_ntlmssp_client_prepare(TALLOC_CTX *mem_ctx,
struct auth_ntlmssp_state **_ans);
NTSTATUS auth_ntlmssp_client_start(struct auth_ntlmssp_state *ans);
struct auth_generic_state **_ans);
NTSTATUS auth_ntlmssp_client_start(struct auth_generic_state *ans);
#endif /* _NTLMSSP_WRAP_ */

View File

@ -1215,7 +1215,7 @@ typedef struct user_struct {
struct auth_session_info *session_info;
struct auth_ntlmssp_state *auth_ntlmssp_state;
struct auth_generic_state *auth_ntlmssp_state;
} user_struct;
/*

View File

@ -92,7 +92,7 @@ NTSTATUS spnego_ntlmssp_init_client(TALLOC_CTX *mem_ctx,
struct spnego_context **spnego_ctx)
{
struct spnego_context *sp_ctx = NULL;
struct auth_ntlmssp_state *auth_ntlmssp_state;
struct auth_generic_state *auth_ntlmssp_state;
NTSTATUS status;
status = spnego_context_init(mem_ctx, do_sign, do_seal, &sp_ctx);

View File

@ -610,7 +610,7 @@ NTSTATUS cli_raw_ntlm_smb_encryption_start(struct cli_state *cli,
DATA_BLOB blob_out = data_blob_null;
DATA_BLOB param_out = data_blob_null;
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
struct auth_ntlmssp_state *auth_ntlmssp_state;
struct auth_generic_state *auth_ntlmssp_state;
struct smb_trans_enc_state *es = make_cli_enc_state(SMB_TRANS_ENC_NTLM);
if (!es) {

View File

@ -26,21 +26,21 @@
#include "librpc/rpc/dcerpc.h"
#include "lib/param/param.h"
NTSTATUS auth_ntlmssp_set_username(struct auth_ntlmssp_state *ans,
NTSTATUS auth_ntlmssp_set_username(struct auth_generic_state *ans,
const char *user)
{
cli_credentials_set_username(ans->credentials, user, CRED_SPECIFIED);
return NT_STATUS_OK;
}
NTSTATUS auth_ntlmssp_set_domain(struct auth_ntlmssp_state *ans,
NTSTATUS auth_ntlmssp_set_domain(struct auth_generic_state *ans,
const char *domain)
{
cli_credentials_set_domain(ans->credentials, domain, CRED_SPECIFIED);
return NT_STATUS_OK;
}
NTSTATUS auth_ntlmssp_set_password(struct auth_ntlmssp_state *ans,
NTSTATUS auth_ntlmssp_set_password(struct auth_generic_state *ans,
const char *password)
{
cli_credentials_set_password(ans->credentials, password, CRED_SPECIFIED);
@ -153,15 +153,15 @@ static const struct gensec_security_ops gensec_ntlmssp3_client_ops = {
.priority = GENSEC_NTLMSSP
};
NTSTATUS auth_ntlmssp_client_prepare(TALLOC_CTX *mem_ctx, struct auth_ntlmssp_state **auth_ntlmssp_state)
NTSTATUS auth_ntlmssp_client_prepare(TALLOC_CTX *mem_ctx, struct auth_generic_state **auth_ntlmssp_state)
{
struct auth_ntlmssp_state *ans;
struct auth_generic_state *ans;
NTSTATUS nt_status;
struct gensec_settings *gensec_settings;
struct loadparm_context *lp_ctx;
ans = talloc_zero(mem_ctx, struct auth_ntlmssp_state);
ans = talloc_zero(mem_ctx, struct auth_generic_state);
if (!ans) {
DEBUG(0,("auth_ntlmssp_start: talloc failed!\n"));
return NT_STATUS_NO_MEMORY;
@ -203,7 +203,7 @@ NTSTATUS auth_ntlmssp_client_prepare(TALLOC_CTX *mem_ctx, struct auth_ntlmssp_st
return NT_STATUS_OK;
}
NTSTATUS auth_ntlmssp_client_start(struct auth_ntlmssp_state *ans)
NTSTATUS auth_ntlmssp_client_start(struct auth_generic_state *ans)
{
NTSTATUS status;

View File

@ -2265,7 +2265,7 @@ static NTSTATUS rpccli_ntlmssp_bind_data(TALLOC_CTX *mem_ctx,
const char *password,
struct pipe_auth_data **presult)
{
struct auth_ntlmssp_state *ntlmssp_ctx;
struct auth_generic_state *ntlmssp_ctx;
struct pipe_auth_data *result;
NTSTATUS status;

View File

@ -35,7 +35,7 @@ NTSTATUS ntlmssp_server_auth_start(TALLOC_CTX *mem_ctx,
const struct tsocket_address *remote_address,
struct gensec_security **ctx)
{
struct auth_ntlmssp_state *a = NULL;
struct auth_generic_state *a = NULL;
NTSTATUS status;
status = auth_ntlmssp_prepare(remote_address, &a);

View File

@ -411,7 +411,7 @@ struct smbd_smb2_session {
struct smbd_server_connection *sconn;
NTSTATUS status;
uint64_t vuid;
struct auth_ntlmssp_state *auth_ntlmssp_state;
struct auth_generic_state *auth_ntlmssp_state;
struct auth_session_info *session_info;
DATA_BLOB session_key;
bool do_signing;

View File

@ -199,7 +199,7 @@ DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct smbd_server_connection *sconn)
OID_NTLMSSP,
NULL};
const char *OIDs_ntlm[] = {OID_NTLMSSP, NULL};
struct auth_ntlmssp_state *auth_ntlmssp_state;
struct auth_generic_state *auth_ntlmssp_state;
sconn->use_gensec_hook = false;

View File

@ -79,7 +79,7 @@ bool is_encrypted_packet(struct smbd_server_connection *sconn,
static NTSTATUS make_auth_ntlmssp(const struct tsocket_address *remote_address,
struct smb_trans_enc_state *es)
{
struct auth_ntlmssp_state *auth_ntlmssp_state;
struct auth_generic_state *auth_ntlmssp_state;
NTSTATUS status = auth_ntlmssp_prepare(remote_address,
&auth_ntlmssp_state);
if (!NT_STATUS_IS_OK(status)) {

View File

@ -420,7 +420,7 @@ static void reply_spnego_kerberos(struct smb_request *req,
static void reply_spnego_ntlmssp(struct smb_request *req,
uint16 vuid,
struct auth_ntlmssp_state **auth_ntlmssp_state,
struct auth_generic_state **auth_ntlmssp_state,
DATA_BLOB *ntlmssp_blob, NTSTATUS nt_status,
const char *OID,
bool wrap)
@ -578,7 +578,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,
struct auth_ntlmssp_state **auth_ntlmssp_state)
struct auth_generic_state **auth_ntlmssp_state)
{
DATA_BLOB secblob;
DATA_BLOB chal;
@ -665,7 +665,7 @@ static void reply_spnego_negotiate(struct smb_request *req,
static void reply_spnego_auth(struct smb_request *req,
uint16 vuid,
DATA_BLOB blob1,
struct auth_ntlmssp_state **auth_ntlmssp_state)
struct auth_generic_state **auth_ntlmssp_state)
{
DATA_BLOB auth = data_blob_null;
DATA_BLOB auth_reply = data_blob_null;