s3:libads: Improve debug messages for SASL bind
authorPavel Filipenský <pfilipen@redhat.com>
Fri, 7 Jan 2022 09:31:19 +0000 (10:31 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Jan 2022 23:33:36 +0000 (23:33 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14955

Pair-Programmed-With: Andreas Schneider <asn@samba.org>

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/libads/sasl.c

index 992f7022a695d8aa38c9bc50ef11817f0bac2bbb..ea98aa47ecdcdc39085a985a976874a0bc9d9b6b 100644 (file)
@@ -586,13 +586,13 @@ static ADS_STATUS ads_sasl_spnego_bind(ADS_STRUCT *ads)
                                                        p.service, p.hostname,
                                                        blob);
                        if (!ADS_ERR_OK(status)) {
-                               DEBUG(0,("kinit succeeded but "
-                                       "ads_sasl_spnego_gensec_bind(KRB5) failed "
-                                       "for %s/%s with user[%s] realm[%s]: %s\n",
+                               DBG_ERR("kinit succeeded but "
+                                       "SPNEGO bind with Kerberos failed "
+                                       "for %s/%s - user[%s], realm[%s]: %s\n",
                                        p.service, p.hostname,
                                        ads->auth.user_name,
                                        ads->auth.realm,
-                                       ads_errstr(status)));
+                                       ads_errstr(status));
                        }
                }
 
@@ -602,13 +602,13 @@ static ADS_STATUS ads_sasl_spnego_bind(ADS_STRUCT *ads)
                        goto done;
                }
 
-               DEBUG(1,("ads_sasl_spnego_gensec_bind(KRB5) failed "
-                        "for %s/%s with user[%s] realm[%s]: %s, "
-                        "try to fallback to NTLMSSP\n",
-                        p.service, p.hostname,
-                        ads->auth.user_name,
-                        ads->auth.realm,
-                        ads_errstr(status)));
+               DBG_WARNING("SASL bind with Kerberos failed "
+                           "for %s/%s - user[%s], realm[%s]: %s, "
+                           "try to fallback to NTLMSSP\n",
+                           p.service, p.hostname,
+                           ads->auth.user_name,
+                           ads->auth.realm,
+                           ads_errstr(status));
        }
 #endif