if (!attribute) {
continue;
}
+ msg->elements[i].name = talloc_strdup(msg->elements, attribute->lDAPDisplayName);
+ if (!msg->elements[i].name) {
+ return ldb_module_done(ac->req, NULL, NULL, LDB_ERR_OPERATIONS_ERROR);
+ }
+
/* Look to see if this attributeSyntax is a DN */
if (strcmp(attribute->attributeSyntax_oid, "2.5.5.1") != 0) {
continue;
const char *dn_str;
struct ldb_dn *dn = ldb_dn_from_ldb_val(ac, ac->module->ldb, &msg->elements[i].values[j]);
if (!dn) {
- return ldb_module_done(ac->req, NULL, NULL, LDB_ERR_OPERATIONS_ERROR);
+ return ldb_module_done(ac->req, NULL, NULL, LDB_ERR_INVALID_DN_SYNTAX);
}
ret = fix_dn(dn);
if (ret != LDB_SUCCESS) {