[27741] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Improve LDAP password file error messages

daemon@ATHENA.MIT.EDU (Greg Hudson)
Wed May 8 16:02:20 2013

Date: Wed, 8 May 2013 16:02:07 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201305082002.r48K27G3004977@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/0a4b14260ca6a99b91558bb9fd8ecea32004a5c8
commit 0a4b14260ca6a99b91558bb9fd8ecea32004a5c8
Author: Greg Hudson <ghudson@mit.edu>
Date:   Wed May 8 15:55:58 2013 -0400

    Improve LDAP password file error messages
    
    If we cannot open the LDAP password file or cannot find the bind DN in
    it, include the filename and DN in the error message.
    
    ticket: 7632

 .../kdb/ldap/libkdb_ldap/ldap_service_stash.c      |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c
index 9e32c25..f412290 100644
--- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c
+++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_service_stash.c
@@ -100,6 +100,9 @@ krb5_ldap_readpassword(krb5_context context, krb5_ldap_context *ldap_context,
     fptr = fopen(file, "r");
     if (fptr == NULL) {
         st = errno;
+        krb5_set_error_message(context, st,
+                               _("Cannot open LDAP password file '%s': %s"),
+                               file, error_message(st));
         goto rp_exit;
     }
     set_cloexec_file(fptr);
@@ -127,8 +130,9 @@ krb5_ldap_readpassword(krb5_context context, krb5_ldap_context *ldap_context,
 
     if (entryfound == 0)  {
         st = KRB5_KDB_SERVER_INTERNAL_ERR;
-        krb5_set_error_message(context, st,
-                               _("Bind DN entry missing in stash file"));
+        krb5_set_error_message(context, st, _("Bind DN entry '%s' missing in "
+                                              "LDAP password file '%s'"),
+                               ldap_context->bind_dn, file);
         goto rp_exit;
     }
     /* replace the \n with \0 */
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post