summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_sqlite3
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-11 08:50:36 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-11 08:50:36 +0200
commit155a672567ac95e0a631a82f9273ddec71bcf643 (patch)
tree48f0ed5cc93061ceb2433087f063dd8b7e832095 /source4/lib/ldb/ldb_sqlite3
parent4690ebf0f47ec435e2e63687dce257b6b2bd5464 (diff)
downloadsamba-155a672567ac95e0a631a82f9273ddec71bcf643.tar.gz
samba-155a672567ac95e0a631a82f9273ddec71bcf643.tar.bz2
samba-155a672567ac95e0a631a82f9273ddec71bcf643.zip
ldb:ldb_sqlite3 backend - remove checks which are now done elsewhere
(In SAMBA LDB modules)
Diffstat (limited to 'source4/lib/ldb/ldb_sqlite3')
-rw-r--r--source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c b/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c
index 7dcb1f9285..b9772b8612 100644
--- a/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c
+++ b/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c
@@ -1059,13 +1059,6 @@ static int lsql_add(struct lsql_context *ctx)
el->name, ldb_dn_get_linearized(msg->dn));
return LDB_ERR_CONSTRAINT_VIOLATION;
}
- if (a && a->flags & LDB_ATTR_FLAG_SINGLE_VALUE) {
- if (el->num_values > 1) {
- ldb_asprintf_errstring(ldb, "SINGLE-VALUED attribute %s on %s specified more than once",
- el->name, ldb_dn_get_linearized(msg->dn));
- return LDB_ERR_CONSTRAINT_VIOLATION;
- }
- }
/* For each value of the specified attribute name... */
for (j = 0; j < el->num_values; j++) {
@@ -1139,12 +1132,6 @@ static int lsql_modify(struct lsql_context *ctx)
char *mod;
unsigned int j;
- if (ldb_attr_cmp(el->name, "distinguishedName") == 0) {
- ldb_asprintf_errstring(ldb, "it is not permitted to perform a modify on 'distinguishedName' (use rename instead): %s",
- ldb_dn_get_linearized(msg->dn));
- return LDB_ERR_CONSTRAINT_VIOLATION;
- }
-
/* Get a case-folded copy of the attribute name */
attr = ldb_attr_casefold(ctx, el->name);
if (attr == NULL) {
@@ -1157,14 +1144,6 @@ static int lsql_modify(struct lsql_context *ctx)
case LDB_FLAG_MOD_REPLACE:
- if (a && a->flags & LDB_ATTR_FLAG_SINGLE_VALUE) {
- if (el->num_values > 1) {
- ldb_asprintf_errstring(ldb, "SINGLE-VALUE attribute %s on %s specified more than once",
- el->name, ldb_dn_get_linearized(msg->dn));
- return LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS;
- }
- }
-
for (j=0; j<el->num_values; j++) {
if (ldb_msg_find_val(el, &el->values[j]) != &el->values[j]) {
ldb_asprintf_errstring(ldb, "%s: value #%d provided more than once", el->name, j);
@@ -1201,14 +1180,6 @@ static int lsql_modify(struct lsql_context *ctx)
return LDB_ERR_CONSTRAINT_VIOLATION;
}
- if (a && a->flags & LDB_ATTR_FLAG_SINGLE_VALUE) {
- if (el->num_values > 1) {
- ldb_asprintf_errstring(ldb, "SINGLE-VALUE attribute %s on %s specified more than once",
- el->name, ldb_dn_get_linearized(msg->dn));
- return LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS;
- }
- }
-
#warning "We should throw an error if no value is provided!"
/* For each value of the specified attribute name... */
for (j = 0; j < el->num_values; j++) {