From 25e233db5768f3dd90a87c5986dedbd75c2e439d Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 9 Oct 2006 08:22:59 +0000 Subject: r19190: merge from samba4: remove wrong check and statement. to manipulate rootDSE we use ldb_dn_new() as base and that has 0 elements. metze (This used to be commit b81cae4180452d2a14c445392fd828032e6eddec) --- source3/lib/ldb/common/ldb_msg.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'source3') diff --git a/source3/lib/ldb/common/ldb_msg.c b/source3/lib/ldb/common/ldb_msg.c index 809d965745..7e001f9180 100644 --- a/source3/lib/ldb/common/ldb_msg.c +++ b/source3/lib/ldb/common/ldb_msg.c @@ -229,7 +229,7 @@ int ldb_msg_add_string(struct ldb_message *msg, if (val.length == 0) { /* allow empty strings as non-existant attributes */ - return 0; + return LDB_SUCCESS; } return ldb_msg_add_value(msg, attr_name, &val); @@ -596,11 +596,6 @@ int ldb_msg_sanity_check(struct ldb_context *ldb, ldb_set_errstring(ldb, "ldb message lacks a DN!"); return LDB_ERR_INVALID_DN_SYNTAX; } - if (msg->dn->comp_num == 0) { - /* root dse has empty dn */ - ldb_set_errstring(ldb, "DN on new ldb message is '' (not permitted)!"); - return LDB_ERR_ENTRY_ALREADY_EXISTS; - } /* basic syntax checks */ for (i = 0; i < msg->num_elements; i++) { -- cgit