mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
s3-auth remove auth_ntlmssp_start(), call auth_generic_start() directly
This makes it clear that this can support more than just NTLMSSP. Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
1100f6eca5
commit
c17131685c
@ -457,8 +457,3 @@ NTSTATUS auth_generic_authtype_start(struct auth_generic_state *auth_ntlmssp_sta
|
||||
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
NTSTATUS auth_ntlmssp_start(struct auth_generic_state *auth_ntlmssp_state)
|
||||
{
|
||||
return auth_generic_start(auth_ntlmssp_state, GENSEC_OID_NTLMSSP);
|
||||
}
|
||||
|
@ -57,9 +57,9 @@ NTSTATUS ntlmssp_server_auth_start(TALLOC_CTX *mem_ctx,
|
||||
gensec_want_feature(a->gensec_security, GENSEC_FEATURE_DCE_STYLE);
|
||||
}
|
||||
|
||||
status = auth_ntlmssp_start(a);
|
||||
status = auth_generic_start(a, GENSEC_OID_NTLMSSP);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(0, (__location__ ": auth_ntlmssp_start failed: %s\n",
|
||||
DEBUG(0, (__location__ ": auth_generic_start failed: %s\n",
|
||||
nt_errstr(status)));
|
||||
return status;
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ static NTSTATUS make_auth_ntlmssp(const struct tsocket_address *remote_address,
|
||||
|
||||
gensec_want_feature(auth_ntlmssp_state->gensec_security, GENSEC_FEATURE_SEAL);
|
||||
|
||||
status = auth_ntlmssp_start(auth_ntlmssp_state);
|
||||
status = auth_generic_start(auth_ntlmssp_state, GENSEC_OID_NTLMSSP);
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
TALLOC_FREE(auth_ntlmssp_state);
|
||||
|
@ -636,7 +636,7 @@ static void reply_spnego_negotiate(struct smb_request *req,
|
||||
|
||||
gensec_want_feature((*auth_ntlmssp_state)->gensec_security, GENSEC_FEATURE_SESSION_KEY);
|
||||
|
||||
status = auth_ntlmssp_start(*auth_ntlmssp_state);
|
||||
status = auth_generic_start(*auth_ntlmssp_state, GENSEC_OID_NTLMSSP);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
/* Kill the intermediate vuid */
|
||||
invalidate_vuid(sconn, vuid);
|
||||
@ -748,7 +748,7 @@ static void reply_spnego_auth(struct smb_request *req,
|
||||
|
||||
gensec_want_feature((*auth_ntlmssp_state)->gensec_security, GENSEC_FEATURE_SESSION_KEY);
|
||||
|
||||
status = auth_ntlmssp_start(*auth_ntlmssp_state);
|
||||
status = auth_generic_start(*auth_ntlmssp_state, GENSEC_OID_NTLMSSP);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
/* Kill the intermediate vuid */
|
||||
invalidate_vuid(sconn, vuid);
|
||||
@ -1160,7 +1160,7 @@ static void reply_sesssetup_and_X_spnego(struct smb_request *req)
|
||||
if (sconn->use_gensec_hook) {
|
||||
status = auth_generic_start(vuser->auth_ntlmssp_state, GENSEC_OID_SPNEGO);
|
||||
} else {
|
||||
status = auth_ntlmssp_start(vuser->auth_ntlmssp_state);
|
||||
status = auth_generic_start(vuser->auth_ntlmssp_state, GENSEC_OID_NTLMSSP);
|
||||
}
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
/* Kill the intermediate vuid */
|
||||
|
@ -383,7 +383,7 @@ static NTSTATUS smbd_smb2_spnego_negotiate(struct smbd_smb2_session *session,
|
||||
|
||||
gensec_want_feature(session->auth_ntlmssp_state->gensec_security, GENSEC_FEATURE_SESSION_KEY);
|
||||
|
||||
status = auth_ntlmssp_start(session->auth_ntlmssp_state);
|
||||
status = auth_generic_start(session->auth_ntlmssp_state, GENSEC_OID_NTLMSSP);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
goto out;
|
||||
}
|
||||
@ -574,7 +574,7 @@ static NTSTATUS smbd_smb2_spnego_auth(struct smbd_smb2_session *session,
|
||||
|
||||
gensec_want_feature(session->auth_ntlmssp_state->gensec_security, GENSEC_FEATURE_SESSION_KEY);
|
||||
|
||||
status = auth_ntlmssp_start(session->auth_ntlmssp_state);
|
||||
status = auth_generic_start(session->auth_ntlmssp_state, GENSEC_OID_NTLMSSP);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
data_blob_free(&auth);
|
||||
TALLOC_FREE(session);
|
||||
@ -653,7 +653,7 @@ static NTSTATUS smbd_smb2_raw_ntlmssp_auth(struct smbd_smb2_session *session,
|
||||
if (session->sconn->use_gensec_hook) {
|
||||
status = auth_generic_start(session->auth_ntlmssp_state, GENSEC_OID_SPNEGO);
|
||||
} else {
|
||||
status = auth_ntlmssp_start(session->auth_ntlmssp_state);
|
||||
status = auth_generic_start(session->auth_ntlmssp_state, GENSEC_OID_NTLMSSP);
|
||||
}
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
TALLOC_FREE(session);
|
||||
|
Loading…
x
Reference in New Issue
Block a user