1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-17 02:05:21 +03:00

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)
This commit is contained in:
Stefan Metzmacher 2006-10-09 08:22:59 +00:00 committed by Gerald (Jerry) Carter
parent 046a4756d4
commit 25e233db57

View File

@ -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++) {