summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-03-02 18:50:11 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2011-03-04 08:51:29 +0100
commit5896b7299331aedd065397d2078c62d85bcf68f6 (patch)
tree7387662ab8ba9109d198c0b8a4c03634b772012c /source4/dsdb/samdb
parent3560db3da3e3b25c98287701dbc6478358457495 (diff)
downloadsamba-5896b7299331aedd065397d2078c62d85bcf68f6.tar.gz
samba-5896b7299331aedd065397d2078c62d85bcf68f6.tar.bz2
samba-5896b7299331aedd065397d2078c62d85bcf68f6.zip
s4:objectclass LDB module - if we cannot find DN's parent then the DN itself is invalid
ERR_INVALID_DN_SYNTAX fits better than ERR_OPERATION_ERROR in this case. This one gets triggered if we perform "add" requests without the LDAP server. Reviewed by: Tridge
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/objectclass.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/objectclass.c b/source4/dsdb/samdb/ldb_modules/objectclass.c
index f48917c5fd..817f50a964 100644
--- a/source4/dsdb/samdb/ldb_modules/objectclass.c
+++ b/source4/dsdb/samdb/ldb_modules/objectclass.c
@@ -421,7 +421,9 @@ static int objectclass_add(struct ldb_module *module, struct ldb_request *req)
/* get copy of parent DN */
parent_dn = ldb_dn_get_parent(ac, ac->req->op.add.message->dn);
if (parent_dn == NULL) {
- return ldb_operr(ldb);
+ /* the DN itself might be wrong - therefore
+ * "ERR_INVALID_DN_SYNTAX" fits better here. */
+ return LDB_ERR_INVALID_DN_SYNTAX;
}
ret = ldb_build_search_req(&search_req, ldb,