diff options
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/pydsdb.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c index fd6925d154..ce7923ddad 100644 --- a/source4/dsdb/pydsdb.c +++ b/source4/dsdb/pydsdb.c @@ -390,6 +390,24 @@ static PyObject *py_dsdb_set_am_rodc(PyObject *self, PyObject *args) Py_RETURN_NONE; } +static PyObject *py_dsdb_set_schema_from_ldif(PyObject *self, PyObject *args) +{ + WERROR result; + char *pf, *df; + PyObject *py_ldb; + struct ldb_context *ldb; + + if (!PyArg_ParseTuple(args, "Oss", &py_ldb, &pf, &df)) + return NULL; + + PyErr_LDB_OR_RAISE(py_ldb, ldb); + + result = dsdb_set_schema_from_ldif(ldb, pf, df); + PyErr_WERROR_IS_ERR_RAISE(result); + + Py_RETURN_NONE; +} + static PyMethodDef py_dsdb_methods[] = { { "samdb_server_site_name", (PyCFunction)py_samdb_server_site_name, METH_VARARGS, "Get the server site name as a string"}, @@ -426,6 +444,8 @@ static PyMethodDef py_dsdb_methods[] = { { "dsdb_set_am_rodc", (PyCFunction)py_dsdb_set_am_rodc, METH_VARARGS, NULL }, + { "dsdb_set_schema_from_ldif", (PyCFunction)py_dsdb_set_schema_from_ldif, METH_VARARGS, + NULL }, { NULL } }; |