From 9c1e230bc217e7d1ce0ef713a17982a8536584a1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 6 Oct 2009 18:57:06 +1100 Subject: s4-ldb: fixed error on single value error When you try to add a 2nd value to a single valued attribute you get LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS. w2k8-r2 join to s4 relies on this error, doing a replace after it sees the error --- source4/lib/ldb/ldb_tdb/ldb_tdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib') diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c index 08208959f3..66a10b6413 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c @@ -664,7 +664,7 @@ int ltdb_modify_internal(struct ldb_module *module, * exists in the object, then we violoate the * single-value rule */ if (a && a->flags & LDB_ATTR_FLAG_SINGLE_VALUE) { - ret = LDB_ERR_CONSTRAINT_VIOLATION; + ret = LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS; goto failed; } -- cgit