summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-12-16 16:07:24 +1100
committerStefan Metzmacher <metze@samba.org>2011-12-22 19:25:10 +0100
commit6391fff9dad8a2bd7033930e7d6ff5c8617701c6 (patch)
tree9ac96abf761a33af76cb3e397f71f4ebdfaaa7b9
parent0b7bc1c45c73beddc60e6da2fc415f2506b36e43 (diff)
downloadsamba-6391fff9dad8a2bd7033930e7d6ff5c8617701c6.tar.gz
samba-6391fff9dad8a2bd7033930e7d6ff5c8617701c6.tar.bz2
samba-6391fff9dad8a2bd7033930e7d6ff5c8617701c6.zip
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>
-rw-r--r--source3/auth/auth_ntlmssp.c12
-rw-r--r--source3/auth/proto.h8
-rw-r--r--source3/include/auth.h2
-rw-r--r--source3/include/ntlmssp_wrap.h12
-rw-r--r--source3/include/smb.h2
-rw-r--r--source3/librpc/crypto/cli_spnego.c2
-rw-r--r--source3/libsmb/clifsinfo.c2
-rw-r--r--source3/libsmb/ntlmssp_wrap.c14
-rw-r--r--source3/rpc_client/cli_pipe.c2
-rw-r--r--source3/rpc_server/dcesrv_ntlmssp.c2
-rw-r--r--source3/smbd/globals.h2
-rw-r--r--source3/smbd/negprot.c2
-rw-r--r--source3/smbd/seal.c2
-rw-r--r--source3/smbd/sesssetup.c6
14 files changed, 35 insertions, 35 deletions
diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c
index b57fda1ea7..082f10cf8c 100644
--- a/source3/auth/auth_ntlmssp.c
+++ b/source3/auth/auth_ntlmssp.c
@@ -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);
}
diff --git a/source3/auth/proto.h b/source3/auth/proto.h
index bc2d58a811..b608c48e6e 100644
--- a/source3/auth/proto.h
+++ b/source3/auth/proto.h
@@ -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);
diff --git a/source3/include/auth.h b/source3/include/auth.h
index 5be5701baa..9d043bf54f 100644
--- a/source3/include/auth.h
+++ b/source3/include/auth.h
@@ -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 */
diff --git a/source3/include/ntlmssp_wrap.h b/source3/include/ntlmssp_wrap.h
index 68032bbebc..4d791c335a 100644
--- a/source3/include/ntlmssp_wrap.h
+++ b/source3/include/ntlmssp_wrap.h
@@ -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_ */
diff --git a/source3/include/smb.h b/source3/include/smb.h
index fed1f38359..1a116103f4 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -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;
/*
diff --git a/source3/librpc/crypto/cli_spnego.c b/source3/librpc/crypto/cli_spnego.c
index fce2de3f06..827b135b22 100644
--- a/source3/librpc/crypto/cli_spnego.c
+++ b/source3/librpc/crypto/cli_spnego.c
@@ -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);
diff --git a/source3/libsmb/clifsinfo.c b/source3/libsmb/clifsinfo.c
index e0e42bded7..ff15624c60 100644
--- a/source3/libsmb/clifsinfo.c
+++ b/source3/libsmb/clifsinfo.c
@@ -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) {
diff --git a/source3/libsmb/ntlmssp_wrap.c b/source3/libsmb/ntlmssp_wrap.c
index 5b11db0ee4..de3d0a1bf2 100644
--- a/source3/libsmb/ntlmssp_wrap.c
+++ b/source3/libsmb/ntlmssp_wrap.c
@@ -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;
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 8ee14d6262..8ea500db70 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -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;
diff --git a/source3/rpc_server/dcesrv_ntlmssp.c b/source3/rpc_server/dcesrv_ntlmssp.c
index 40533cbe54..7ec174c693 100644
--- a/source3/rpc_server/dcesrv_ntlmssp.c
+++ b/source3/rpc_server/dcesrv_ntlmssp.c
@@ -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);
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index 76172b08ba..02527e7453 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -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;
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index 0b5b810da9..f7d277be3a 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -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;
diff --git a/source3/smbd/seal.c b/source3/smbd/seal.c
index 2c668dd7a0..ab87d76b26 100644
--- a/source3/smbd/seal.c
+++ b/source3/smbd/seal.c
@@ -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)) {
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 889361acb8..43ff13ec28 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -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;