diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/auth/pyauth.c | 6 | ||||
-rw-r--r-- | source4/dsdb/pydsdb.c | 21 | ||||
-rw-r--r-- | source4/libnet/py_net.c | 2 | ||||
-rw-r--r-- | source4/param/provision.c | 4 |
4 files changed, 16 insertions, 17 deletions
diff --git a/source4/auth/pyauth.c b/source4/auth/pyauth.c index 201a8304e4..2f83be95c7 100644 --- a/source4/auth/pyauth.c +++ b/source4/auth/pyauth.c @@ -146,12 +146,12 @@ static PyObject *py_user_session(PyObject *module, PyObject *args, PyObject *kwa return NULL; } - ldb_ctx = PyLdb_AsLdbContext(py_ldb); + ldb_ctx = pyldb_Ldb_AsLdbContext(py_ldb); if (py_dn == Py_None) { user_dn = NULL; } else { - if (!PyObject_AsDn(ldb_ctx, py_dn, ldb_ctx, &user_dn)) { + if (!pyldb_Object_AsDn(ldb_ctx, py_dn, ldb_ctx, &user_dn)) { talloc_free(mem_ctx); return NULL; } @@ -240,7 +240,7 @@ static PyObject *py_auth_context_new(PyTypeObject *type, PyObject *args, PyObjec } if (py_ldb != Py_None) { - ldb = PyLdb_AsLdbContext(py_ldb); + ldb = pyldb_Ldb_AsLdbContext(py_ldb); } lp_ctx = lpcfg_from_py_object(mem_ctx, py_lp_ctx); diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c index e74f2bb584..18c2f7b72f 100644 --- a/source4/dsdb/pydsdb.c +++ b/source4/dsdb/pydsdb.c @@ -38,14 +38,13 @@ typedef inquiry lenfunc; typedef intargfunc ssizeargfunc; #endif -/* FIXME: These should be in a header file somewhere, once we finish moving - * away from SWIG .. */ +/* FIXME: These should be in a header file somewhere */ #define PyErr_LDB_OR_RAISE(py_ldb, ldb) \ /* if (!PyLdb_Check(py_ldb)) { \ PyErr_SetString(py_ldb_get_exception(), "Ldb connection object required"); \ return NULL; \ } */\ - ldb = PyLdb_AsLdbContext(py_ldb); + ldb = pyldb_Ldb_AsLdbContext(py_ldb); static PyObject *py_ldb_get_exception(void) { @@ -168,8 +167,8 @@ static PyObject *py_samdb_set_ntds_settings_dn(PyLdbObject *self, PyObject *args return NULL; } - if (!PyObject_AsDn(tmp_ctx, py_ntds_settings_dn, ldb, &ntds_settings_dn)) { - /* exception thrown by "PyObject_AsDn" */ + if (!pyldb_Object_AsDn(tmp_ctx, py_ntds_settings_dn, ldb, &ntds_settings_dn)) { + /* exception thrown by "pyldb_Object_AsDn" */ talloc_free(tmp_ctx); return NULL; } @@ -778,13 +777,13 @@ static PyObject *py_dsdb_load_partition_usn(PyObject *self, PyObject *args) mem_ctx = talloc_new(NULL); if (mem_ctx == NULL) { - PyErr_NoMemory(); - return NULL; + PyErr_NoMemory(); + return NULL; } - if (!PyObject_AsDn(mem_ctx, py_dn, ldb, &dn)) { - talloc_free(mem_ctx); - return NULL; + if (!pyldb_Object_AsDn(mem_ctx, py_dn, ldb, &dn)) { + talloc_free(mem_ctx); + return NULL; } ret = dsdb_load_partition_usn(ldb, dn, &highest_uSN, &urgent_uSN); @@ -916,7 +915,7 @@ static PyObject *py_dsdb_get_partitions_dn(PyObject *self, PyObject *args) PyErr_NoMemory(); return NULL; } - ret = PyLdbDn_FromDn(dn); + ret = pyldb_Dn_FromDn(dn); talloc_free(dn); return ret; } diff --git a/source4/libnet/py_net.c b/source4/libnet/py_net.c index 90fa1d56d6..895d2772b3 100644 --- a/source4/libnet/py_net.c +++ b/source4/libnet/py_net.c @@ -417,7 +417,7 @@ static PyObject *py_net_replicate_init(py_net_Object *self, PyObject *args, PyOb return NULL; } - samdb = PyLdb_AsLdbContext(py_ldb); + samdb = pyldb_Ldb_AsLdbContext(py_ldb); if (samdb == NULL) { PyErr_SetString(PyExc_TypeError, "Expected ldb object"); talloc_free(s); diff --git a/source4/param/provision.c b/source4/param/provision.c index 7b6e6e74b3..54b60730dd 100644 --- a/source4/param/provision.c +++ b/source4/param/provision.c @@ -186,7 +186,7 @@ NTSTATUS provision_bare(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, return NT_STATUS_UNSUCCESSFUL; } result->lp_ctx = lpcfg_from_py_object(mem_ctx, py_lp_ctx); - result->samdb = PyLdb_AsLdbContext(PyObject_GetAttrString(py_result, "samdb")); + result->samdb = pyldb_Ldb_AsLdbContext(PyObject_GetAttrString(py_result, "samdb")); return NT_STATUS_OK; } @@ -378,5 +378,5 @@ struct ldb_context *provision_get_schema(TALLOC_CTX *mem_ctx, struct loadparm_co return NULL; } - return PyLdb_AsLdbContext(PyObject_GetAttrString(py_result, "ldb")); + return pyldb_Ldb_AsLdbContext(PyObject_GetAttrString(py_result, "ldb")); } |