Allow (and ignore) distinguishedName on special records
authorAndrew Bartlett <abartlet@samba.org>
Fri, 9 Oct 2009 22:35:39 +0000 (09:35 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 12 Oct 2009 05:51:27 +0000 (16:51 +1100)
They are not stored, so we can ignore them (makes copying records much
easier)

Andrew Bartlett

source4/lib/ldb/ldb_tdb/ldb_tdb.c

index b7eec40e9a5663b62be0c38489adb7d231f1a071..4943f81df59f5d5557bcfd5a0efb152e8e780c0b 100644 (file)
@@ -179,6 +179,8 @@ static int ltdb_check_special_dn(struct ldb_module *module,
        /* we have @ATTRIBUTES, let's check attributes are fine */
        /* should we check that we deny multivalued attributes ? */
        for (i = 0; i < msg->num_elements; i++) {
+               if (ldb_attr_cmp(msg->elements[i].name, "distinguishedName") == 0) continue;
+
                for (j = 0; j < msg->elements[i].num_values; j++) {
                        if (ltdb_check_at_attributes_values(&msg->elements[i].values[j]) != 0) {
                                ldb_set_errstring(ldb, "Invalid attribute value in an @ATTRIBUTES entry");