From 57d5f19b3f032dfcecde9883651c6df8b18a8b58 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 27 Feb 2006 00:39:26 +0000 Subject: r13700: added highestCommittedUSN, uSNChanged and uSNCreated support, using the @BASEINFO sequenceNumber (simo, I changed the function pointer to a structure element as you preferred) (This used to be commit 68c9ac38c7eed221b44499ee3d74597063dfe7a1) --- source4/dsdb/samdb/ldb_modules/rootdse.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source4/dsdb') 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 */ -- cgit