NT_STATUS_HAVE_NO_MEMORY(msg->elements[i].values);
for (j=0; j < msg->elements[i].num_values; j++) {
- if (!(req->mods[i].attrib.values[j].length > 0)) {
- result = LDAP_OTHER;
-
- map_ldb_error(local_ctx,
- LDB_ERR_OTHER, &errstr);
- errstr = talloc_asprintf(local_ctx,
- "%s. Empty attribute values not allowed", errstr);
- goto reply;
- }
msg->elements[i].values[j].length = req->mods[i].attrib.values[j].length;
msg->elements[i].values[j].data = req->mods[i].attrib.values[j].data;
}
}
}
- } else {
- result = LDAP_OTHER;
- map_ldb_error(local_ctx, LDB_ERR_OTHER, &errstr);
- errstr = talloc_asprintf(local_ctx,
- "%s. No mods are not allowed", errstr);
- goto reply;
}
reply:
NT_STATUS_HAVE_NO_MEMORY(msg->elements[i].values);
for (j=0; j < msg->elements[i].num_values; j++) {
- if (!(req->attributes[i].values[j].length > 0)) {
- result = LDAP_OTHER;
- map_ldb_error(local_ctx,
- LDB_ERR_OTHER, &errstr);
- errstr = talloc_asprintf(local_ctx,
- "%s. Empty attribute values not allowed", errstr);
- goto reply;
- }
msg->elements[i].values[j].length = req->attributes[i].values[j].length;
msg->elements[i].values[j].data = req->attributes[i].values[j].data;
}
- } else {
- result = LDAP_OTHER;
- map_ldb_error(local_ctx, LDB_ERR_OTHER, &errstr);
- errstr = talloc_asprintf(local_ctx,
- "%s. No attribute values are not allowed", errstr);
- goto reply;
}
}
- } else {
- result = LDAP_OTHER;
- map_ldb_error(local_ctx, LDB_ERR_OTHER, &errstr);
- errstr = talloc_asprintf(local_ctx,
- "%s. No attributes are not allowed", errstr);
- goto reply;
}
reply: