summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-04-24 14:02:02 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-04-24 14:02:02 +0000
commit77ced5915d0b6bc07d0518ca8bd4412f3ae0e30b (patch)
tree54837f50339128123e6aee0c4975d2d33ea14da9
parent95d47c474b49a3d62e744ed95b4716ea0c88a4cd (diff)
downloadsamba-77ced5915d0b6bc07d0518ca8bd4412f3ae0e30b.tar.gz
samba-77ced5915d0b6bc07d0518ca8bd4412f3ae0e30b.tar.bz2
samba-77ced5915d0b6bc07d0518ca8bd4412f3ae0e30b.zip
Use the kerberos error from ads_kinit_password() in the return value from
our SASL code - help in printing a useful error message. Andrew Bartlett (This used to be commit 984321bfab79a1ff20b504e115e94bd6270f0196)
-rw-r--r--source3/libads/sasl.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source3/libads/sasl.c b/source3/libads/sasl.c
index 29d4533a54..078ff826e3 100644
--- a/source3/libads/sasl.c
+++ b/source3/libads/sasl.c
@@ -192,14 +192,19 @@ static ADS_STATUS ads_sasl_spnego_bind(ADS_STRUCT *ads)
#ifdef HAVE_KRB5
if (!(ads->auth.flags & ADS_AUTH_DISABLE_KERBEROS) &&
got_kerberos_mechanism) {
+ int krb_error;
status = ads_sasl_spnego_krb5_bind(ads, principal);
if (ADS_ERR_OK(status))
return status;
- if (ads_kinit_password(ads) == 0) {
+
+ krb_error = ads_kinit_password(ads);
+ if (krb_error) {
+ return ADS_ERROR_KRB5(krb_error);
+ } else {
status = ads_sasl_spnego_krb5_bind(ads, principal);
- }
- if (ADS_ERR_OK(status))
- return status;
+ if (ADS_ERR_OK(status))
+ return status;
+ }
}
#endif