summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-12-07 10:34:58 +0100
committerStefan Metzmacher <metze@samba.org>2012-12-07 14:28:24 +0100
commit944b6863a71efc48ccc8cd9ae8ad1a3081bc1805 (patch)
tree8db22ff98f621989736548100f877d2ce32c959c /source4
parent0fa31296864cd2b0c64c33ac74d55178ad542f90 (diff)
downloadsamba-944b6863a71efc48ccc8cd9ae8ad1a3081bc1805.tar.gz
samba-944b6863a71efc48ccc8cd9ae8ad1a3081bc1805.tar.bz2
samba-944b6863a71efc48ccc8cd9ae8ad1a3081bc1805.zip
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 <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/schema/schema_set.c14
1 files changed, 7 insertions, 7 deletions
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;
}