summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/rootdse.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c
index 07e34f1841..987fd7a7f1 100644
--- a/source4/dsdb/samdb/ldb_modules/rootdse.c
+++ b/source4/dsdb/samdb/ldb_modules/rootdse.c
@@ -43,6 +43,7 @@ static int do_attribute(const char * const *attrs, const char *name)
ldb_attr_in_list(attrs, "*");
}
+
/*
add dynamically generated attributes to rootDSE result
*/
@@ -106,6 +107,14 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_request *re
}
}
}
+
+ if (do_attribute(s->attrs, "highestCommittedUSN")) {
+ if (module->ldb->sequence_number != NULL &&
+ ldb_msg_add_fmt(msg, "highestCommittedUSN",
+ "%llu", module->ldb->sequence_number(module->ldb)) != 0) {
+ goto failed;
+ }
+ }
/* TODO: lots more dynamic attributes should be added here */