diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-10-13 10:03:57 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-10-13 10:03:57 +1100 |
commit | ae507f620ae34b69c5df86980ea6e374c9c1e548 (patch) | |
tree | c2669a72121c02ecc2d1e4aee16a3129960a5c66 /source4/lib/ldb/ldb_tdb/ldb_tdb.c | |
parent | dfbaf79a1b7455a0eef61813e07cb661cf17e995 (diff) | |
parent | 4a1b50afd567313cc25d5bbc14e01e170aa62a00 (diff) | |
download | samba-ae507f620ae34b69c5df86980ea6e374c9c1e548.tar.gz samba-ae507f620ae34b69c5df86980ea6e374c9c1e548.tar.bz2 samba-ae507f620ae34b69c5df86980ea6e374c9c1e548.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source4/lib/ldb/ldb_tdb/ldb_tdb.c')
-rw-r--r-- | source4/lib/ldb/ldb_tdb/ldb_tdb.c | 9 |
1 files changed, 9 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..4943f81df5 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c @@ -179,6 +179,8 @@ static int ltdb_check_special_dn(struct ldb_module *module, /* we have @ATTRIBUTES, let's check attributes are fine */ /* should we check that we deny multivalued attributes ? */ for (i = 0; i < msg->num_elements; i++) { + if (ldb_attr_cmp(msg->elements[i].name, "distinguishedName") == 0) continue; + for (j = 0; j < msg->elements[i].num_values; j++) { if (ltdb_check_at_attributes_values(&msg->elements[i].values[j]) != 0) { ldb_set_errstring(ldb, "Invalid attribute value in an @ATTRIBUTES entry"); @@ -205,12 +207,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; } |