We now just call the gensec_want_feature() directly.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
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);
}
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);
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;
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;
}
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);
}
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);
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);
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)) {
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)) {
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);
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)) {
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)) {
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);