summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-10-10 09:14:37 +1100
committerAndrew Bartlett <abartlet@samba.org>2009-10-12 16:51:03 +1100
commit554791c49f9ca8be3c1974918f0e8335e76972d7 (patch)
tree99a00614220e5bcf5d3377889b900e5cfd9a53a3 /source4/lib/ldb
parent93ac2cdb5490c0f6e4aa7c70d1ac88c03fb9fe84 (diff)
downloadsamba-554791c49f9ca8be3c1974918f0e8335e76972d7.tar.gz
samba-554791c49f9ca8be3c1974918f0e8335e76972d7.tar.bz2
samba-554791c49f9ca8be3c1974918f0e8335e76972d7.zip
s4:ldb Reload the 'ltdb_cache' when @OPTIONS changes
(Otherwise setting the check base on search option is not applied until after a reload). Andrew Bartlett
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_tdb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
index 7693ffeb81..b7eec40e9a 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -205,12 +205,19 @@ static int ltdb_modified(struct ldb_module *module, struct ldb_dn *dn)
ret = ltdb_reindex(module);
}
+ /* If the modify was to a normal record, or any special except @BASEINFO, update the seq number */
if (ret == LDB_SUCCESS &&
!(ldb_dn_is_special(dn) &&
ldb_dn_check_special(dn, LTDB_BASEINFO)) ) {
ret = ltdb_increase_sequence_number(module);
}
+ /* If the modify was to @OPTIONS, reload the cache */
+ if (ldb_dn_is_special(dn) &&
+ (ldb_dn_check_special(dn, LTDB_OPTIONS)) ) {
+ ret = ltdb_cache_reload(module);
+ }
+
return ret;
}