s4:dsdb/schema Allow a schema set when bound against a remote LDAP server
authorAndrew Bartlett <abartlet@samba.org>
Wed, 11 Nov 2009 08:25:32 +0000 (19:25 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 11 Nov 2009 21:11:22 +0000 (08:11 +1100)
source4/dsdb/schema/schema_set.c

index 4c9e60880107fcf33c57bdbcf0e9aadfcea2da51..ab870741cfd45ae3d4ff6a16d8b51379dc8ee743 100644 (file)
@@ -139,8 +139,8 @@ static int dsdb_schema_set_attributes(struct ldb_context *ldb, struct dsdb_schem
                }
        }
 
-       if (ret == LDB_ERR_OPERATIONS_ERROR || ret == LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS) {
-               /* We might be on a read-only DB */
+       if (ret == LDB_ERR_OPERATIONS_ERROR || ret == LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS || ret == LDB_ERR_INVALID_DN_SYNTAX) {
+               /* We might be on a read-only DB or LDAP */
                ret = LDB_SUCCESS;
        }
        if (ret != LDB_SUCCESS) {
@@ -166,7 +166,7 @@ static int dsdb_schema_set_attributes(struct ldb_context *ldb, struct dsdb_schem
                        ret = samdb_replace(ldb, mem_ctx, mod_msg);
                }
        }
-       if (ret == LDB_ERR_OPERATIONS_ERROR || ret == LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS) {
+       if (ret == LDB_ERR_OPERATIONS_ERROR || ret == LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS || ret == LDB_ERR_INVALID_DN_SYNTAX) {
                /* We might be on a read-only DB */
                ret = LDB_SUCCESS;
        }