summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-10-18 21:43:40 +1100
committerStefan Metzmacher <metze@samba.org>2011-10-21 08:43:33 +0200
commit3f079885b21f22ec4f27cccaa6f59ebce0e56067 (patch)
treea53da6ce70a50a951b6cc23baf1c1d2a4f394b9e /source3
parentb9b170a9dd640dbde0a707b972fdb0c611e68df5 (diff)
downloadsamba-3f079885b21f22ec4f27cccaa6f59ebce0e56067.tar.gz
samba-3f079885b21f22ec4f27cccaa6f59ebce0e56067.tar.bz2
samba-3f079885b21f22ec4f27cccaa6f59ebce0e56067.zip
s3-ntlmssp Remove auth_ntlmssp_want_feature()
We now just call the gensec_want_feature() directly. Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/include/ntlmssp_wrap.h1
-rw-r--r--source3/librpc/crypto/cli_spnego.c8
-rw-r--r--source3/libsmb/clifsinfo.c4
-rw-r--r--source3/libsmb/ntlmssp_wrap.c13
-rw-r--r--source3/rpc_client/cli_pipe.c4
-rw-r--r--source3/rpc_server/dcesrv_ntlmssp.c4
-rw-r--r--source3/smbd/seal.c2
-rw-r--r--source3/smbd/sesssetup.c6
-rw-r--r--source3/smbd/smb2_sesssetup.c6
9 files changed, 17 insertions, 31 deletions
diff --git a/source3/include/ntlmssp_wrap.h b/source3/include/ntlmssp_wrap.h
index f58e63e85e..ab1f9cb6aa 100644
--- a/source3/include/ntlmssp_wrap.h
+++ b/source3/include/ntlmssp_wrap.h
@@ -40,7 +40,6 @@ NTSTATUS auth_ntlmssp_set_domain(struct auth_ntlmssp_state *ans,
const char *domain);
NTSTATUS auth_ntlmssp_set_password(struct auth_ntlmssp_state *ans,
const char *password);
-void auth_ntlmssp_want_feature(struct auth_ntlmssp_state *ans, uint32_t feature);
DATA_BLOB auth_ntlmssp_get_session_key(struct auth_ntlmssp_state *ans,
TALLOC_CTX *mem_ctx);
diff --git a/source3/librpc/crypto/cli_spnego.c b/source3/librpc/crypto/cli_spnego.c
index 1320a95216..31d0157069 100644
--- a/source3/librpc/crypto/cli_spnego.c
+++ b/source3/librpc/crypto/cli_spnego.c
@@ -129,11 +129,11 @@ NTSTATUS spnego_ntlmssp_init_client(TALLOC_CTX *mem_ctx,
}
if (do_sign) {
- auth_ntlmssp_want_feature(sp_ctx->mech_ctx.ntlmssp_state,
- NTLMSSP_FEATURE_SIGN);
+ gensec_want_feature(sp_ctx->mech_ctx.ntlmssp_state->gensec_security,
+ GENSEC_FEATURE_SIGN);
} else if (do_seal) {
- auth_ntlmssp_want_feature(sp_ctx->mech_ctx.ntlmssp_state,
- NTLMSSP_FEATURE_SEAL);
+ gensec_want_feature(sp_ctx->mech_ctx.ntlmssp_state->gensec_security,
+ GENSEC_FEATURE_SEAL);
}
status = auth_ntlmssp_client_start(sp_ctx->mech_ctx.ntlmssp_state);
diff --git a/source3/libsmb/clifsinfo.c b/source3/libsmb/clifsinfo.c
index fa8dba5fbd..1762e85d7d 100644
--- a/source3/libsmb/clifsinfo.c
+++ b/source3/libsmb/clifsinfo.c
@@ -620,8 +620,8 @@ NTSTATUS cli_raw_ntlm_smb_encryption_start(struct cli_state *cli,
goto fail;
}
- auth_ntlmssp_want_feature(es->s.auth_ntlmssp_state, NTLMSSP_FEATURE_SESSION_KEY);
- auth_ntlmssp_want_feature(es->s.auth_ntlmssp_state, NTLMSSP_FEATURE_SEAL);
+ gensec_want_feature(es->s.auth_ntlmssp_state->gensec_security, GENSEC_FEATURE_SESSION_KEY);
+ gensec_want_feature(es->s.auth_ntlmssp_state->gensec_security, GENSEC_FEATURE_SEAL);
if (!NT_STATUS_IS_OK(status = auth_ntlmssp_set_username(es->s.auth_ntlmssp_state, user))) {
goto fail;
diff --git a/source3/libsmb/ntlmssp_wrap.c b/source3/libsmb/ntlmssp_wrap.c
index a470444054..557b6e02b3 100644
--- a/source3/libsmb/ntlmssp_wrap.c
+++ b/source3/libsmb/ntlmssp_wrap.c
@@ -47,19 +47,6 @@ NTSTATUS auth_ntlmssp_set_password(struct auth_ntlmssp_state *ans,
return NT_STATUS_OK;
}
-void auth_ntlmssp_want_feature(struct auth_ntlmssp_state *ans, uint32_t feature)
-{
- if (feature & NTLMSSP_FEATURE_SESSION_KEY) {
- gensec_want_feature(ans->gensec_security, GENSEC_FEATURE_SESSION_KEY);
- }
- if (feature & NTLMSSP_FEATURE_SIGN) {
- gensec_want_feature(ans->gensec_security, GENSEC_FEATURE_SIGN);
- }
- if (feature & NTLMSSP_FEATURE_SEAL) {
- gensec_want_feature(ans->gensec_security, GENSEC_FEATURE_SEAL);
- }
-}
-
DATA_BLOB auth_ntlmssp_get_session_key(struct auth_ntlmssp_state *ans, TALLOC_CTX *mem_ctx)
{
DATA_BLOB session_key;
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 9af351b274..9a2aa409a0 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -2306,9 +2306,9 @@ static NTSTATUS rpccli_ntlmssp_bind_data(TALLOC_CTX *mem_ctx,
}
if (auth_level == DCERPC_AUTH_LEVEL_INTEGRITY) {
- auth_ntlmssp_want_feature(ntlmssp_ctx, NTLMSSP_FEATURE_SIGN);
+ gensec_want_feature(ntlmssp_ctx->gensec_security, GENSEC_FEATURE_SIGN);
} else if (auth_level == DCERPC_AUTH_LEVEL_PRIVACY) {
- auth_ntlmssp_want_feature(ntlmssp_ctx, NTLMSSP_FEATURE_SEAL);
+ gensec_want_feature(ntlmssp_ctx->gensec_security, GENSEC_FEATURE_SEAL);
}
status = auth_ntlmssp_client_start(ntlmssp_ctx);
diff --git a/source3/rpc_server/dcesrv_ntlmssp.c b/source3/rpc_server/dcesrv_ntlmssp.c
index 221b3bfbbe..8700726c25 100644
--- a/source3/rpc_server/dcesrv_ntlmssp.c
+++ b/source3/rpc_server/dcesrv_ntlmssp.c
@@ -45,11 +45,11 @@ NTSTATUS ntlmssp_server_auth_start(TALLOC_CTX *mem_ctx,
}
if (do_sign) {
- auth_ntlmssp_want_feature(a, NTLMSSP_FEATURE_SIGN);
+ gensec_want_feature(a->gensec_security, GENSEC_FEATURE_SIGN);
}
if (do_seal) {
/* Always implies both sign and seal for ntlmssp */
- auth_ntlmssp_want_feature(a, NTLMSSP_FEATURE_SEAL);
+ gensec_want_feature(a->gensec_security, GENSEC_FEATURE_SEAL);
}
status = auth_ntlmssp_start(a);
diff --git a/source3/smbd/seal.c b/source3/smbd/seal.c
index f1508d4d4f..03313a80ac 100644
--- a/source3/smbd/seal.c
+++ b/source3/smbd/seal.c
@@ -94,7 +94,7 @@ static NTSTATUS make_auth_ntlmssp(const struct tsocket_address *remote_address,
return nt_status_squash(status);
}
- auth_ntlmssp_want_feature(ec->auth_ntlmssp_state, NTLMSSP_FEATURE_SEAL);
+ gensec_want_feature(ec->auth_ntlmssp_state->gensec_security, GENSEC_FEATURE_SEAL);
status = auth_ntlmssp_start(ec->auth_ntlmssp_state);
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 7729ff675b..5fa571a0e9 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -634,7 +634,7 @@ static void reply_spnego_negotiate(struct smb_request *req,
return;
}
- auth_ntlmssp_want_feature(*auth_ntlmssp_state, NTLMSSP_FEATURE_SESSION_KEY);
+ gensec_want_feature((*auth_ntlmssp_state)->gensec_security, GENSEC_FEATURE_SESSION_KEY);
status = auth_ntlmssp_start(*auth_ntlmssp_state);
if (!NT_STATUS_IS_OK(status)) {
@@ -746,7 +746,7 @@ static void reply_spnego_auth(struct smb_request *req,
return;
}
- auth_ntlmssp_want_feature(*auth_ntlmssp_state, NTLMSSP_FEATURE_SESSION_KEY);
+ gensec_want_feature((*auth_ntlmssp_state)->gensec_security, GENSEC_FEATURE_SESSION_KEY);
status = auth_ntlmssp_start(*auth_ntlmssp_state);
if (!NT_STATUS_IS_OK(status)) {
@@ -1155,7 +1155,7 @@ static void reply_sesssetup_and_X_spnego(struct smb_request *req)
return;
}
- auth_ntlmssp_want_feature(vuser->auth_ntlmssp_state, NTLMSSP_FEATURE_SESSION_KEY);
+ gensec_want_feature(vuser->auth_ntlmssp_state->gensec_security, GENSEC_FEATURE_SESSION_KEY);
if (sconn->use_gensec_hook) {
status = auth_generic_start(vuser->auth_ntlmssp_state, GENSEC_OID_SPNEGO);
diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c
index 059b26f0bf..6e06b9fe00 100644
--- a/source3/smbd/smb2_sesssetup.c
+++ b/source3/smbd/smb2_sesssetup.c
@@ -381,7 +381,7 @@ static NTSTATUS smbd_smb2_spnego_negotiate(struct smbd_smb2_session *session,
goto out;
}
- auth_ntlmssp_want_feature(session->auth_ntlmssp_state, NTLMSSP_FEATURE_SESSION_KEY);
+ gensec_want_feature(session->auth_ntlmssp_state->gensec_security, GENSEC_FEATURE_SESSION_KEY);
status = auth_ntlmssp_start(session->auth_ntlmssp_state);
if (!NT_STATUS_IS_OK(status)) {
@@ -572,7 +572,7 @@ static NTSTATUS smbd_smb2_spnego_auth(struct smbd_smb2_session *session,
return status;
}
- auth_ntlmssp_want_feature(session->auth_ntlmssp_state, NTLMSSP_FEATURE_SESSION_KEY);
+ gensec_want_feature(session->auth_ntlmssp_state->gensec_security, GENSEC_FEATURE_SESSION_KEY);
status = auth_ntlmssp_start(session->auth_ntlmssp_state);
if (!NT_STATUS_IS_OK(status)) {
@@ -648,7 +648,7 @@ static NTSTATUS smbd_smb2_raw_ntlmssp_auth(struct smbd_smb2_session *session,
return status;
}
- auth_ntlmssp_want_feature(session->auth_ntlmssp_state, NTLMSSP_FEATURE_SESSION_KEY);
+ gensec_want_feature(session->auth_ntlmssp_state->gensec_security, GENSEC_FEATURE_SESSION_KEY);
if (session->sconn->use_gensec_hook) {
status = auth_generic_start(session->auth_ntlmssp_state, GENSEC_OID_SPNEGO);