summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-02-27 00:39:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:52:06 -0500
commit57d5f19b3f032dfcecde9883651c6df8b18a8b58 (patch)
treeff516943fed75891c2ac4333352ecb6dcb04139e /source4/dsdb/samdb/ldb_modules
parente964109e6a9c18c668ef6c1ac534693bb981e18f (diff)
downloadsamba-57d5f19b3f032dfcecde9883651c6df8b18a8b58.tar.gz
samba-57d5f19b3f032dfcecde9883651c6df8b18a8b58.tar.bz2
samba-57d5f19b3f032dfcecde9883651c6df8b18a8b58.zip
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)
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-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 */