summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-02-14 10:08:24 +1100
committerAndrew Tridgell <tridge@samba.org>2011-02-14 17:55:08 +1100
commitc2ccd24ebf91125394e4aa369945cc689152ff5f (patch)
tree674a58a851a119233fb5fa290acd0f2c8e0bfdae /source4/lib/ldb/ldb_tdb
parenta48328a8282d116d17515cfe681c1b41f6541d39 (diff)
downloadsamba-c2ccd24ebf91125394e4aa369945cc689152ff5f.tar.gz
samba-c2ccd24ebf91125394e4aa369945cc689152ff5f.tar.bz2
samba-c2ccd24ebf91125394e4aa369945cc689152ff5f.zip
s4-ldb: added LDB_FLAG_INTERNAL_FORCE_SINGLE_VALUE_CHECK
this allows a ldb module to force an element as single valued
Diffstat (limited to 'source4/lib/ldb/ldb_tdb')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_tdb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
index 5c1dd1bdce..831361c547 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -284,6 +284,14 @@ static bool ldb_tdb_single_valued(const struct ldb_schema_attribute *a,
{
if (!a) return false;
if (el != NULL) {
+ if (el->flags & LDB_FLAG_INTERNAL_FORCE_SINGLE_VALUE_CHECK) {
+ /* override from a ldb module, for example
+ used for the description field, which is
+ marked multi-valued in the schema but which
+ should not actually accept multiple
+ values */
+ return true;
+ }
if (el->flags & LDB_FLAG_INTERNAL_DISABLE_SINGLE_VALUE_CHECK) {
/* override from a ldb module, for example used for
deleted linked attribute entries */