From 944b6863a71efc48ccc8cd9ae8ad1a3081bc1805 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 7 Dec 2012 10:34:58 +0100 Subject: s4:dsdb/schema: fix dsdb_schema_set_el_from_ldb_msg() (bug #9470) We should always update the ts_last_change. Signed-off-by: Stefan Metzmacher Reviewed-by: Michael Adam --- source4/dsdb/schema/schema_set.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source4') diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c index e226118b4c..31862a43b7 100644 --- a/source4/dsdb/schema/schema_set.c +++ b/source4/dsdb/schema/schema_set.c @@ -676,13 +676,6 @@ WERROR dsdb_schema_set_el_from_ldb_msg(struct ldb_context *ldb, struct dsdb_sche { const char* tstring; time_t ts; - if (samdb_find_attribute(ldb, msg, - "objectclass", "attributeSchema") != NULL) { - return dsdb_set_attribute_from_ldb(ldb, schema, msg); - } else if (samdb_find_attribute(ldb, msg, - "objectclass", "classSchema") != NULL) { - return dsdb_set_class_from_ldb(schema, msg); - } tstring = ldb_msg_find_attr_as_string(msg, "whenChanged", NULL); /* keep a trace of the ts of the most recently changed object */ if (tstring) { @@ -691,6 +684,13 @@ WERROR dsdb_schema_set_el_from_ldb_msg(struct ldb_context *ldb, struct dsdb_sche schema->ts_last_change = ts; } } + if (samdb_find_attribute(ldb, msg, + "objectclass", "attributeSchema") != NULL) { + return dsdb_set_attribute_from_ldb(ldb, schema, msg); + } else if (samdb_find_attribute(ldb, msg, + "objectclass", "classSchema") != NULL) { + return dsdb_set_class_from_ldb(schema, msg); + } /* Don't fail on things not classes or attributes */ return WERR_OK; } -- cgit