ldb_tdb: Add better comments for duplicate attr values
authorGarming Sam <garming@catalyst.net.nz>
Thu, 9 Mar 2017 03:10:16 +0000 (16:10 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 13 Mar 2017 04:10:10 +0000 (05:10 +0100)
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>

lib/ldb/ldb_tdb/ldb_tdb.c

index 502afd9c3c81fab91b5880e740051aaca79756d6..6b1187e64ad60ecb04cf408624cb47a5019e738e 100644 (file)
@@ -361,7 +361,7 @@ static int ltdb_add_internal(struct ldb_module *module,
                                if (ldb_msg_find_val(el, &el->values[j]) != &el->values[j]) {
                                        ldb_asprintf_errstring(ldb,
                                                               "attribute '%s': value #%u on '%s' "
-                                                              "provided more than once",
+                                                              "provided more than once in ADD object",
                                                               el->name, j, 
                                                               ldb_dn_get_linearized(msg->dn));
                                        return LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS;
@@ -820,7 +820,7 @@ int ltdb_modify_internal(struct ldb_module *module,
                                                }
                                                if (ldb_msg_find_val(el, &el->values[j]) != &el->values[j]) {
                                                        ldb_asprintf_errstring(ldb,
-                                                                              "attribute '%s': value #%u on '%s' provided more than once",
+                                                                              "attribute '%s': value #%u on '%s' provided more than once in ADD",
                                                                               el->name, j, ldb_dn_get_linearized(msg2->dn));
                                                        ret = LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS;
                                                        goto done;
@@ -875,7 +875,7 @@ int ltdb_modify_internal(struct ldb_module *module,
                                for (j=0; j<el->num_values; j++) {
                                        if (ldb_msg_find_val(el, &el->values[j]) != &el->values[j]) {
                                                ldb_asprintf_errstring(ldb,
-                                                                      "attribute '%s': value #%u on '%s' provided more than once",
+                                                                      "attribute '%s': value #%u on '%s' provided more than once in REPLACE",
                                                                       el->name, j, ldb_dn_get_linearized(msg2->dn));
                                                ret = LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS;
                                                goto done;