summaryrefslogtreecommitdiff
path: root/source4/lib/ldb-samba/pyldb.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb-samba/pyldb.c')
-rw-r--r--source4/lib/ldb-samba/pyldb.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/source4/lib/ldb-samba/pyldb.c b/source4/lib/ldb-samba/pyldb.c
index cce653e20a..472a4664ea 100644
--- a/source4/lib/ldb-samba/pyldb.c
+++ b/source4/lib/ldb-samba/pyldb.c
@@ -45,8 +45,6 @@ static void PyErr_SetLdbError(PyObject *error, int ret, struct ldb_context *ldb_
ldb_ctx == NULL?ldb_strerror(ret):ldb_errstring(ldb_ctx)));
}
-
-
static PyObject *py_ldb_set_loadparm(PyObject *self, PyObject *args)
{
PyObject *py_lp_ctx;
@@ -116,33 +114,33 @@ static PyObject *py_ldb_set_opaque_integer(PyObject *self, PyObject *args)
if (old_val) {
*old_val = value;
Py_RETURN_NONE;
- }
+ }
tmp_ctx = talloc_new(ldb);
if (tmp_ctx == NULL) {
PyErr_NoMemory();
return NULL;
}
-
+
new_val = talloc(tmp_ctx, int);
if (new_val == NULL) {
talloc_free(tmp_ctx);
PyErr_NoMemory();
return NULL;
}
-
+
opaque_name_talloc = talloc_strdup(tmp_ctx, py_opaque_name);
if (opaque_name_talloc == NULL) {
talloc_free(tmp_ctx);
PyErr_NoMemory();
return NULL;
}
-
+
*new_val = value;
/* cache the domain_sid in the ldb */
ret = ldb_set_opaque(ldb, opaque_name_talloc, new_val);
-
+
if (ret != LDB_SUCCESS) {
talloc_free(tmp_ctx);
PyErr_SetLdbError(py_ldb_error, ret, ldb);
@@ -240,13 +238,12 @@ static PyMethodDef py_samba_ldb_methods[] = {
};
static PyTypeObject PySambaLdb = {
- .tp_name = "samba.Ldb",
+ .tp_name = "samba._ldb.Ldb",
.tp_doc = "Connection to a LDB database.",
.tp_methods = py_samba_ldb_methods,
.tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE,
};
-
void init_ldb(void)
{
PyObject *m;