summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-09-21 06:44:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:19:11 -0500
commit77db3973c417cc934485dbd6bf1a8a1c84c1b30b (patch)
tree7c104933cbfc7b011f80a45394a2c9bd4a611399 /source4/lib/ldb/common/ldb.c
parentf12584ccae9bdb4d3f31a719d90b881729321fab (diff)
downloadsamba-77db3973c417cc934485dbd6bf1a8a1c84c1b30b.tar.gz
samba-77db3973c417cc934485dbd6bf1a8a1c84c1b30b.tar.bz2
samba-77db3973c417cc934485dbd6bf1a8a1c84c1b30b.zip
r18781: Move the usnCreated and usnChanged handling around again.
This moves these attributes from objectguid into an optional backend (objectguid), used by ltdb. For OpenLDAP, the entryUUID module converts entryCSN into usnChanged. This also changes the sequence number API, and uses 'time based' sequence numbers, when an LDAP or similar backend is detected. To assist this, we also store the last modified time in the TDB, whenever we change a value. Andrew Bartlett (This used to be commit 72858f859483c0c532dddb2c146d6bd7b9be5072)
Diffstat (limited to 'source4/lib/ldb/common/ldb.c')
-rw-r--r--source4/lib/ldb/common/ldb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c
index a68733244d..1aae76bad6 100644
--- a/source4/lib/ldb/common/ldb.c
+++ b/source4/lib/ldb/common/ldb.c
@@ -888,7 +888,7 @@ int ldb_rename(struct ldb_context *ldb, const struct ldb_dn *olddn, const struct
/*
return the global sequence number
*/
-int ldb_sequence_number(struct ldb_context *ldb, uint64_t *seq_num)
+int ldb_sequence_number(struct ldb_context *ldb, enum ldb_sequence_type type, uint64_t *seq_num)
{
struct ldb_request *req;
int ret;
@@ -905,6 +905,7 @@ int ldb_sequence_number(struct ldb_context *ldb, uint64_t *seq_num)
req->callback = NULL;
ldb_set_timeout(ldb, req, 0); /* use default timeout */
+ req->op.seq_num.type = type;
/* do request and autostart a transaction */
ret = ldb_request(ldb, req);