s4:dsdb Put back the reference and set_attributes in dsdb_reference_schema
authorAndrew Bartlett <abartlet@samba.org>
Wed, 9 Jun 2010 10:21:19 +0000 (20:21 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 12 Jun 2010 01:16:49 +0000 (11:16 +1000)
I'm not sure why I removed these in fe3e1af901c970f738bee92baac5d7d4f5736e17

Andrew Bartlett

source4/dsdb/schema/schema_set.c

index 07d75c44a85f30f2babd4adaa3e8654a7cb00e4a..c57f5f10ddcbd302000ea634f68e1e1e80e97b67 100644 (file)
@@ -390,6 +390,15 @@ int dsdb_reference_schema(struct ldb_context *ldb, struct dsdb_schema *schema,
                return ret;
        }
 
+       if (talloc_reference(ldb, schema) == NULL) {
+               return LDB_ERR_OPERATIONS_ERROR;
+       }
+
+       ret = dsdb_schema_set_attributes(ldb, schema, write_attributes);
+       if (ret != LDB_SUCCESS) {
+               return ret;
+       }
+
        return LDB_SUCCESS;
 }