diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-09-16 03:43:37 -0700 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-09-16 03:58:17 -0700 |
commit | 98f2a3b6a3a068e4d9741eed8a8648d85c318207 (patch) | |
tree | 56ab0d2ebb34b9c747c1c2606fc2d617f4b77671 /source4/dsdb | |
parent | 033ced60ac734161686bd3da685f2d7b056e17c8 (diff) | |
download | samba-98f2a3b6a3a068e4d9741eed8a8648d85c318207.tar.gz samba-98f2a3b6a3a068e4d9741eed8a8648d85c318207.tar.bz2 samba-98f2a3b6a3a068e4d9741eed8a8648d85c318207.zip |
s4-dsdb: treat uSNHighest as 0 if @REPLCHANGED doesn't exist
When a partition is first created it still needs a uSNHighest value
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/common/util.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index c2636e127f..633279ead1 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -2311,6 +2311,14 @@ int dsdb_load_partition_usn(struct ldb_context *ldb, struct ldb_dn *dn, uint64_t ret = ldb_wait(req->handle, LDB_WAIT_ALL); } + if (ret == LDB_ERR_NO_SUCH_OBJECT) { + /* it hasn't been created yet, which means + an implicit value of zero */ + *uSN = 0; + talloc_free(tmp_ctx); + return LDB_SUCCESS; + } + if (ret != LDB_SUCCESS) { talloc_free(tmp_ctx); return ret; |