summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/rootdse.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-06-07 21:03:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:57 -0500
commit247af0d569594512a24e83156e257b8d4d356883 (patch)
tree01cc382ba950b92059d8dd3686016333caf043b1 /source4/dsdb/samdb/ldb_modules/rootdse.c
parent2ab5bafd7296e4c2a415a4fcbe8a2ba7b4373699 (diff)
downloadsamba-247af0d569594512a24e83156e257b8d4d356883.tar.gz
samba-247af0d569594512a24e83156e257b8d4d356883.tar.bz2
samba-247af0d569594512a24e83156e257b8d4d356883.zip
r16083: Make it possible to initialise a backend module, without it setting up
the whole ldb structure. Because the sequence number was a fn pointer on the main ldb context, turn it into a full request (currently sync). Andrew Bartlett (This used to be commit fbe7d0ca9031e292b2d2fae263233c973982980a)
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/rootdse.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/rootdse.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c
index e96da829eb..49d93be7f2 100644
--- a/source4/dsdb/samdb/ldb_modules/rootdse.c
+++ b/source4/dsdb/samdb/ldb_modules/rootdse.c
@@ -102,10 +102,13 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *ms
}
if (do_attribute(attrs, "highestCommittedUSN")) {
- if (module->ldb->sequence_number != NULL &&
- ldb_msg_add_fmt(msg, "highestCommittedUSN",
- "%llu", module->ldb->sequence_number(module->ldb)) != 0) {
- goto failed;
+ uint64_t seq_num;
+ int ret = ldb_sequence_number(module->ldb, &seq_num);
+ if (ret == LDB_SUCCESS) {
+ if (ldb_msg_add_fmt(msg, "highestCommittedUSN",
+ "%llu", seq_num) != 0) {
+ goto failed;
+ }
}
}