struct metainfo *li = ( struct metainfo * )be->be_private;
struct metaconn *lc;
struct metasingleconn *lsc;
- struct timeval tv;
+ struct timeval tv = { 0, 0 };
LDAPMessage *res, *e;
int count, rc = 0, *msgid, sres = LDAP_NO_SUCH_OBJECT;
char *match = NULL, *err = NULL;
#ifdef NEW_LOGGING
LDAP_LOG( BACK_META, ERR,
- "meta_back_search [%d] match=\"%s\" err=\"%s\"\n",
+ "meta_back_search [%d] "
+ "match=\"%s\" err=\"%s\"\n",
i, match, err );
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ANY,
- "=>meta_back_search [%d] match=\"%s\" err=\"%s\"\n",
+ "=>meta_back_search [%d] "
+ "match=\"%s\" err=\"%s\"\n",
i, match, err );
#endif /* !NEW_LOGGING */
}
if ( msgid ) {
- free( msgid );
+ ch_free( msgid );
}
-
+
return rc;
}
return;
}
- dnNormalize2( NULL, &ent.e_name, &ent.e_nname );
+ /*
+ * Note: this may fail if the target host(s) schema differs
+ * from the one known to the meta, and a DN with unknown
+ * attributes is returned.
+ *
+ * FIXME: should we log anything, or delegate to dnNormalize2?
+ */
+ if ( dnNormalize2( NULL, &ent.e_name, &ent.e_nname ) != LDAP_SUCCESS ) {
+ return;
+ }
/*
* cache dn