From: Stefan Metzmacher Date: Fri, 9 Feb 2024 09:50:13 +0000 (+0100) Subject: s3:libads: no longer pass "GSS-SPNEGO" to ads_sasl_spnego_gensec_bind() X-Git-Tag: tdb-1.4.11~950 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6593c297e6e0213e7d2d1dd4482cafe03232f4a;p=thirdparty%2Fsamba.git s3:libads: no longer pass "GSS-SPNEGO" to ads_sasl_spnego_gensec_bind() That's the only thing we use... Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- diff --git a/source3/libads/sasl.c b/source3/libads/sasl.c index 2eaabcc97c5..d56ce1777b7 100644 --- a/source3/libads/sasl.c +++ b/source3/libads/sasl.c @@ -122,7 +122,6 @@ static const struct ads_saslwrap_ops ads_sasl_gensec_ops = { we fit on one socket??) */ static ADS_STATUS ads_sasl_spnego_gensec_bind(ADS_STRUCT *ads, - const char *sasl, enum credentials_use_kerberos krb5_state, const char *target_service, const char *target_hostname) @@ -133,6 +132,7 @@ static ADS_STATUS ads_sasl_spnego_gensec_bind(ADS_STRUCT *ads, NTSTATUS nt_status; ADS_STATUS status; struct auth_generic_state *auth_generic_state; + const char *sasl = "GSS-SPNEGO"; const char *sasl_list[] = { sasl, NULL }; NTTIME end_nt_time; struct ads_saslwrap *wrap = &ads->ldap_wrap_data; @@ -499,7 +499,7 @@ static ADS_STATUS ads_sasl_spnego_bind(ADS_STRUCT *ads) ads->auth.password[0] == '\0') { - status = ads_sasl_spnego_gensec_bind(ads, "GSS-SPNEGO", + status = ads_sasl_spnego_gensec_bind(ads, CRED_USE_KERBEROS_REQUIRED, p.service, p.hostname); if (ADS_ERR_OK(status)) { @@ -514,7 +514,7 @@ static ADS_STATUS ads_sasl_spnego_bind(ADS_STRUCT *ads) status = ADS_ERROR_KRB5(ads_kinit_password(ads)); if (ADS_ERR_OK(status)) { - status = ads_sasl_spnego_gensec_bind(ads, "GSS-SPNEGO", + status = ads_sasl_spnego_gensec_bind(ads, CRED_USE_KERBEROS_REQUIRED, p.service, p.hostname); if (!ADS_ERR_OK(status)) { @@ -562,7 +562,7 @@ static ADS_STATUS ads_sasl_spnego_bind(ADS_STRUCT *ads) goto done; } - status = ads_sasl_spnego_gensec_bind(ads, "GSS-SPNEGO", + status = ads_sasl_spnego_gensec_bind(ads, CRED_USE_KERBEROS_DISABLED, p.service, p.hostname); done: