Log the filter string to the error message.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16690 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -729,6 +729,7 @@ LDAP_dn2principal(krb5_context context, HDB * db, const char *dn,
|
|||||||
{
|
{
|
||||||
krb5_error_code ret;
|
krb5_error_code ret;
|
||||||
int rc;
|
int rc;
|
||||||
|
const char *filter = "(objectClass=krb5Principal)";
|
||||||
char **values;
|
char **values;
|
||||||
LDAPMessage *res = NULL, *e;
|
LDAPMessage *res = NULL, *e;
|
||||||
|
|
||||||
@@ -737,11 +738,11 @@ LDAP_dn2principal(krb5_context context, HDB * db, const char *dn,
|
|||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
rc = ldap_search_s(HDB2LDAP(db), dn, LDAP_SCOPE_SUBTREE,
|
rc = ldap_search_s(HDB2LDAP(db), dn, LDAP_SCOPE_SUBTREE,
|
||||||
"(objectClass=krb5Principal)", krb5principal_attrs,
|
filter, krb5principal_attrs,
|
||||||
0, &res);
|
0, &res);
|
||||||
if (check_ldap(context, db, rc)) {
|
if (check_ldap(context, db, rc)) {
|
||||||
krb5_set_error_string(context, "ldap_search_s: %s",
|
krb5_set_error_string(context, "ldap_search_s: filter: %s error: %s",
|
||||||
ldap_err2string(rc));
|
filter, ldap_err2string(rc));
|
||||||
ret = HDB_ERR_NOENTRY;
|
ret = HDB_ERR_NOENTRY;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@@ -799,8 +800,8 @@ LDAP__lookup_princ(krb5_context context,
|
|||||||
rc = ldap_search_s(HDB2LDAP(db), HDB2BASE(db), LDAP_SCOPE_SUBTREE, filter,
|
rc = ldap_search_s(HDB2LDAP(db), HDB2BASE(db), LDAP_SCOPE_SUBTREE, filter,
|
||||||
krb5kdcentry_attrs, 0, msg);
|
krb5kdcentry_attrs, 0, msg);
|
||||||
if (check_ldap(context, db, rc)) {
|
if (check_ldap(context, db, rc)) {
|
||||||
krb5_set_error_string(context, "ldap_search_s: %s",
|
krb5_set_error_string(context, "ldap_search_s: filter: %s - error: %s",
|
||||||
ldap_err2string(rc));
|
filter, ldap_err2string(rc));
|
||||||
ret = HDB_ERR_NOENTRY;
|
ret = HDB_ERR_NOENTRY;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@@ -827,8 +828,9 @@ LDAP__lookup_princ(krb5_context context,
|
|||||||
rc = ldap_search_s(HDB2LDAP(db), HDB2BASE(db), LDAP_SCOPE_SUBTREE,
|
rc = ldap_search_s(HDB2LDAP(db), HDB2BASE(db), LDAP_SCOPE_SUBTREE,
|
||||||
filter, krb5kdcentry_attrs, 0, msg);
|
filter, krb5kdcentry_attrs, 0, msg);
|
||||||
if (check_ldap(context, db, rc)) {
|
if (check_ldap(context, db, rc)) {
|
||||||
krb5_set_error_string(context, "ldap_search_s: %s",
|
krb5_set_error_string(context,
|
||||||
ldap_err2string(rc));
|
"ldap_search_s: filter: %s error: %s",
|
||||||
|
filter, ldap_err2string(rc));
|
||||||
ret = HDB_ERR_NOENTRY;
|
ret = HDB_ERR_NOENTRY;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user