}
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;
.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;
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;
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);
}
/* 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);
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 */
struct gensec_security;
-struct auth_ntlmssp_state {
+struct auth_generic_state {
/* used only by server implementation */
struct auth_context *auth_context;
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_ */
struct auth_session_info *session_info;
- struct auth_ntlmssp_state *auth_ntlmssp_state;
+ struct auth_generic_state *auth_ntlmssp_state;
} user_struct;
/*
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);
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) {
#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);
.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;
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;
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;
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);
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;
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;
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)) {
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)
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;
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;