summaryrefslogtreecommitdiffstats
path: root/source4
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-10-07 23:49:29 +0200
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-10-08 00:18:06 +0200
commitf9990e9b391f330a8e6c5c158ee4e4eaa50f6176 (patch)
tree7b35e2b6f37b03f7f601aa149c5799b298a6c5ed /source4
parentee0204cfccbd73050b2ec806f392bf5c4a549430 (diff)
downloadsamba-f9990e9b391f330a8e6c5c158ee4e4eaa50f6176.tar.gz
samba-f9990e9b391f330a8e6c5c158ee4e4eaa50f6176.tar.xz
samba-f9990e9b391f330a8e6c5c158ee4e4eaa50f6176.zip
s4:ldb - add a check which has to be done on beginning of a "modify" operation
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/ldb/common/ldb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c
index e9c924583e3..4c27de7cb73 100644
--- a/source4/lib/ldb/common/ldb.c
+++ b/source4/lib/ldb/common/ldb.c
@@ -1358,6 +1358,14 @@ int ldb_modify(struct ldb_context *ldb,
return ret;
}
+ if (message->num_elements == 0) {
+ /* this needs also to be returned when the specified object
+ doesn't exist. Therefore this test is located here. */
+ ldb_asprintf_errstring(ldb, "LDB message has to have elements/attributes (%s)!",
+ ldb_dn_get_linearized(message->dn));
+ return LDB_ERR_UNWILLING_TO_PERFORM;
+ }
+
ret = ldb_build_mod_req(&req, ldb, ldb,
message,
NULL,