summaryrefslogtreecommitdiff
path: root/source4/dsdb/pydsdb.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-08-09 14:23:12 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-08-09 06:39:20 +0200
commitef87b4e4f10eb7d5974cb0e0861648d537153a00 (patch)
tree047a5784c3c1a8dcef1e66e07f60c5a6c0674859 /source4/dsdb/pydsdb.c
parent1a1f01ee7a754f2ecccce4f385fba6cb55d82518 (diff)
downloadsamba-ef87b4e4f10eb7d5974cb0e0861648d537153a00.tar.gz
samba-ef87b4e4f10eb7d5974cb0e0861648d537153a00.tar.bz2
samba-ef87b4e4f10eb7d5974cb0e0861648d537153a00.zip
s4-pydsdb: Provide control of if we should write index attributes when reloading a schema
This allows us to carefully control the loading of the schema. Andrew Bartlett
Diffstat (limited to 'source4/dsdb/pydsdb.c')
-rw-r--r--source4/dsdb/pydsdb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c
index 355804943c..9023d69054 100644
--- a/source4/dsdb/pydsdb.c
+++ b/source4/dsdb/pydsdb.c
@@ -873,7 +873,9 @@ static PyObject *py_dsdb_set_schema_from_ldb(PyObject *self, PyObject *args)
struct ldb_context *from_ldb;
struct dsdb_schema *schema;
int ret;
- if (!PyArg_ParseTuple(args, "OO", &py_ldb, &py_from_ldb))
+ char write_attributes = true;
+ if (!PyArg_ParseTuple(args, "OO|b",
+ &py_ldb, &py_from_ldb, &write_attributes))
return NULL;
PyErr_LDB_OR_RAISE(py_ldb, ldb);
@@ -886,7 +888,7 @@ static PyObject *py_dsdb_set_schema_from_ldb(PyObject *self, PyObject *args)
return NULL;
}
- ret = dsdb_reference_schema(ldb, schema, true);
+ ret = dsdb_reference_schema(ldb, schema, write_attributes);
PyErr_LDB_ERROR_IS_ERR_RAISE(py_ldb_get_exception(), ret, ldb);
Py_RETURN_NONE;