From 6f6cda72fc6d737060dd1f747b0e3b0f497b8d57 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 11 Jul 2011 12:20:27 +1000 Subject: s4-dsdb: deleted objects are expected to be missing mandatory attributes the objectclass_attrs validation that an object contains all mandatory attributes is incorrect for deleted objects, as they get stripped of some mandatory attributes when deleted (for example, objectCategory gets stripped) Pair-Programmed-With: Amitay Isaacs --- source4/dsdb/samdb/ldb_modules/objectclass_attrs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/dsdb/samdb') diff --git a/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c b/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c index 302904ab97..4525cf3ddd 100644 --- a/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c +++ b/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c @@ -332,7 +332,8 @@ static int attr_handler2(struct oc_context *ac) } } - if (found_must_contain[0] != NULL) { + if (found_must_contain[0] != NULL && + ldb_msg_check_string_attribute(msg, "isDeleted", "TRUE") == 0) { ldb_asprintf_errstring(ldb, "objectclass_attrs: at least one mandatory attribute ('%s') on entry '%s' wasn't specified!", found_must_contain[0], ldb_dn_get_linearized(msg->dn)); -- cgit