From: Andrew Bartlett Date: Mon, 27 Oct 2008 08:48:19 +0000 (+1100) Subject: Give a better error when ldb_dn_from_ldb_val fails X-Git-Tag: samba-4.0.0alpha6~511 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=169f90640864fab9fcb10665c79879b161a56329;p=thirdparty%2Fsamba.git Give a better error when ldb_dn_from_ldb_val fails --- diff --git a/source4/dsdb/samdb/ldb_modules/linked_attributes.c b/source4/dsdb/samdb/ldb_modules/linked_attributes.c index a54a7d64726..dd199c01375 100644 --- a/source4/dsdb/samdb/ldb_modules/linked_attributes.c +++ b/source4/dsdb/samdb/ldb_modules/linked_attributes.c @@ -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