Give a better error when ldb_dn_from_ldb_val fails
authorAndrew Bartlett <abartlet@samba.org>
Mon, 27 Oct 2008 08:48:19 +0000 (19:48 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 4 Nov 2008 05:06:57 +0000 (16:06 +1100)
source4/dsdb/samdb/ldb_modules/linked_attributes.c

index a54a7d64726b26c677b374b86a40869bfd9d10b6..dd199c0137522f803efcc728d2c5fca50321c610 100644 (file)
@@ -87,7 +87,9 @@ static int la_store_op(struct la_context *ac,
 
        op_dn = ldb_dn_from_ldb_val(ac, ac->module->ldb, dn);
        if (!op_dn) {
-               return LDB_ERR_OPERATIONS_ERROR;
+               ldb_asprintf_errstring(ac->module->ldb, 
+                                      "could not parse attribute as a DN");
+               return LDB_ERR_INVALID_DN_SYNTAX;
        }
 
        /* optimize out del - add operations that would end up