From 1779a00cf0e4afaec784a3d0fab7232475b341b9 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 29 Oct 2014 11:52:37 +0100 Subject: [PATCH 01/13] lib/ldb: fix compiler warnings in ldb_modules_list_from_string() Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison (cherry picked from commit edc6a89398f1fff9de55e77e84b441bfab955869) --- lib/ldb/common/ldb_modules.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ldb/common/ldb_modules.c b/lib/ldb/common/ldb_modules.c index 05a8d8a..91412a6 100644 --- a/lib/ldb/common/ldb_modules.c +++ b/lib/ldb/common/ldb_modules.c @@ -87,7 +87,7 @@ const char **ldb_modules_list_from_string(struct ldb_context *ldb, TALLOC_CTX *m if (modstr[0] == '\0') { modules[0] = NULL; - m = (const char **)modules; + m = discard_const_p(const char *, modules); return m; } @@ -110,7 +110,7 @@ const char **ldb_modules_list_from_string(struct ldb_context *ldb, TALLOC_CTX *m modules[i + 1] = NULL; - m = (const char **)modules; + m = discard_const_p(const char *, modules); return m; } -- 1.9.1 From 2887797a26e12b3790547dc93c9c82de728fb064 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 29 Oct 2014 11:53:06 +0100 Subject: [PATCH 02/13] lib/ldb: fix compiler warnings in ldb_tdb.c Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison (cherry picked from commit 8ac49f9f05415a49619e160c468a3fa261b0320b) --- lib/ldb/ldb_tdb/ldb_tdb.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/ldb/ldb_tdb/ldb_tdb.c b/lib/ldb/ldb_tdb/ldb_tdb.c index d3c83f5..bcb8f0f 100644 --- a/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/lib/ldb/ldb_tdb/ldb_tdb.c @@ -264,6 +264,7 @@ int ltdb_store(struct ldb_module *module, const struct ldb_message *msg, int flg void *data = ldb_module_get_private(module); struct ltdb_private *ltdb = talloc_get_type(data, struct ltdb_private); TDB_DATA tdb_key, tdb_data; + struct ldb_val ldb_data; int ret = LDB_SUCCESS; tdb_key = ltdb_key(module, msg->dn); @@ -272,12 +273,15 @@ int ltdb_store(struct ldb_module *module, const struct ldb_message *msg, int flg } ret = ldb_pack_data(ldb_module_get_ctx(module), - msg, (struct ldb_val *)&tdb_data); + msg, &ldb_data); if (ret == -1) { talloc_free(tdb_key.dptr); return LDB_ERR_OTHER; } + tdb_data.dptr = ldb_data.data; + tdb_data.dsize = ldb_data.length; + ret = tdb_store(ltdb->tdb, tdb_key, tdb_data, flgs); if (ret != 0) { ret = ltdb_err_map(tdb_error(ltdb->tdb)); @@ -286,7 +290,7 @@ int ltdb_store(struct ldb_module *module, const struct ldb_message *msg, int flg done: talloc_free(tdb_key.dptr); - talloc_free(tdb_data.dptr); + talloc_free(ldb_data.data); return ret; } @@ -673,6 +677,7 @@ int ltdb_modify_internal(struct ldb_module *module, void *data = ldb_module_get_private(module); struct ltdb_private *ltdb = talloc_get_type(data, struct ltdb_private); TDB_DATA tdb_key, tdb_data; + struct ldb_val ldb_data; struct ldb_message *msg2; unsigned int i, j, k; int ret = LDB_SUCCESS, idx; @@ -701,7 +706,10 @@ int ltdb_modify_internal(struct ldb_module *module, goto done; } - ret = ldb_unpack_data(ldb_module_get_ctx(module), (struct ldb_val *)&tdb_data, msg2); + ldb_data.data = tdb_data.dptr; + ldb_data.length = tdb_data.dsize; + + ret = ldb_unpack_data(ldb_module_get_ctx(module), &ldb_data, msg2); free(tdb_data.dptr); if (ret == -1) { ret = LDB_ERR_OTHER; -- 1.9.1 From 832f52093e78d7c755137cfb1707526e1255da01 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 29 Oct 2014 11:56:25 +0100 Subject: [PATCH 03/13] lib/ldb: remove unused 'allow_warnings=True' Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison (cherry picked from commit 94fadfc89bab0c28f5c126c653569c5f1b99a64e) --- lib/ldb/wscript | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/ldb/wscript b/lib/ldb/wscript index 027c8cb..cb6b5c8 100755 --- a/lib/ldb/wscript +++ b/lib/ldb/wscript @@ -153,7 +153,6 @@ def build(bld): pc_files='ldb.pc', vnum=VERSION, private_library=private_library, - allow_warnings=True, manpages='man/ldb.3', abi_directory='ABI', abi_match = abi_match) @@ -255,7 +254,6 @@ def build(bld): 'common/ldb.c', deps='tevent tdb', includes='include', - allow_warnings=True, cflags=['-DLDB_MODULESDIR=\"%s\"' % modules_dir]) LDB_TOOLS='ldbadd ldbsearch ldbdel ldbmodify ldbedit ldbrename' -- 1.9.1 From 146b44d4704f387d96354db43e401ff179d0e3ff Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Sun, 9 Nov 2014 04:28:47 +0100 Subject: [PATCH 04/13] lib-pyldb: Avoid SEGFAULT in case we can't convert passed value to py_String Signed-off-by: Kamen Mazdrashki Reviewed-by: Andrew Bartlett (cherry picked from commit a48b533ea5c9faae3429b0fb680b52b14676cd22) --- lib/ldb/pyldb.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c index 78b8012..c541b72 100644 --- a/lib/ldb/pyldb.c +++ b/lib/ldb/pyldb.c @@ -1629,6 +1629,11 @@ static PyObject *py_ldb_schema_format_value(PyLdbObject *self, PyObject *args) old_val.data = (uint8_t *)PyString_AsString(val); old_val.length = PyString_Size(val); + if (old_val.data == NULL) { + PyErr_SetString(PyExc_RuntimeError, "Failed to convert passed value to String"); + return NULL; + } + a = ldb_schema_attribute_by_name(pyldb_Ldb_AsLdbContext(self), element_name); if (a == NULL) { -- 1.9.1 From f6026298778defb4e98de0cdcc4a12fba5e99199 Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Sun, 9 Nov 2014 04:31:36 +0100 Subject: [PATCH 05/13] lib-pyldb: Avoid leaking memory in error cases Signed-off-by: Kamen Mazdrashki Reviewed-by: Andrew Bartlett (cherry picked from commit 18f879b857c174371a9fe27722c70051ed68ed64) --- lib/ldb/pyldb.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c index c541b72..efac7b1 100644 --- a/lib/ldb/pyldb.c +++ b/lib/ldb/pyldb.c @@ -1624,8 +1624,6 @@ static PyObject *py_ldb_schema_format_value(PyLdbObject *self, PyObject *args) if (!PyArg_ParseTuple(args, "sO", &element_name, &val)) return NULL; - mem_ctx = talloc_new(NULL); - old_val.data = (uint8_t *)PyString_AsString(val); old_val.length = PyString_Size(val); @@ -1640,6 +1638,12 @@ static PyObject *py_ldb_schema_format_value(PyLdbObject *self, PyObject *args) Py_RETURN_NONE; } + mem_ctx = talloc_new(NULL); + if (mem_ctx == NULL) { + PyErr_NoMemory(); + return NULL; + } + if (a->syntax->ldif_write_fn(pyldb_Ldb_AsLdbContext(self), mem_ctx, &old_val, &new_val) != 0) { talloc_free(mem_ctx); Py_RETURN_NONE; -- 1.9.1 From 1f5bfbd6ee3e082c93fe2aefa8060644aeb80f2c Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Mon, 10 Nov 2014 22:59:07 +0100 Subject: [PATCH 06/13] lib-pyldb: Throw exception when we can't create MessageElement object At the moment we return an error, but no exception and it is hard to instantly see what the problem is from Python Signed-off-by: Kamen Mazdrashki Reviewed-by: Andrew Bartlett (cherry picked from commit 4d25dfd611e7786a17975fcaed039be971bac7da) --- lib/ldb/pyldb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c index efac7b1..40c802f 100644 --- a/lib/ldb/pyldb.c +++ b/lib/ldb/pyldb.c @@ -2352,6 +2352,8 @@ static struct ldb_message_element *PyObject_AsMessageElement( (uint8_t *)PyString_AsString(obj), me->values[i].length+1); } } else { + PyErr_Format(PyExc_TypeError, + "String or List type expected for '%s' attribute", attr_name); talloc_free(me); me = NULL; } -- 1.9.1 From 49847646895dcbe7ba4edecce6f97fd0d22d4367 Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Tue, 11 Nov 2014 02:56:32 +0100 Subject: [PATCH 07/13] lib-ldb: Check for input parameter when searching attributes by name This prevents a segfault that is hard to be tracked down from Python bindings for instance. Signed-off-by: Kamen Mazdrashki Reviewed-by: Andrew Bartlett (cherry picked from commit ea7778697e22ffbe22634974144c6e5c142a85d6) --- lib/ldb/common/ldb_attributes.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/ldb/common/ldb_attributes.c b/lib/ldb/common/ldb_attributes.c index 21a3e6e..767f69c 100644 --- a/lib/ldb/common/ldb_attributes.c +++ b/lib/ldb/common/ldb_attributes.c @@ -116,8 +116,14 @@ static const struct ldb_schema_attribute ldb_attribute_default = { }; /* - return the attribute handlers for a given attribute -*/ + * Return the attribute handlers for a given attribute + * + * @param ldb ldb context + * @param name attribute name to search for + * @return Always return valid pointer to schema attribute. + * In case there is no attribute with name, + * ldb_attribute_default is returned + */ static const struct ldb_schema_attribute *ldb_schema_attribute_by_name_internal( struct ldb_context *ldb, const char *name) @@ -127,6 +133,11 @@ static const struct ldb_schema_attribute *ldb_schema_attribute_by_name_internal( int r; const struct ldb_schema_attribute *def = &ldb_attribute_default; + /* fallback to default attribute implementation */ + if (name == NULL) { + return def; + } + /* as handlers are sorted, '*' must be the first if present */ if (strcmp(ldb->schema.attributes[0].name, "*") == 0) { def = &ldb->schema.attributes[0]; -- 1.9.1 From 7d229233d1f27552eae27b73b3dcd3906f5f6fd7 Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Wed, 12 Nov 2014 01:12:31 +0100 Subject: [PATCH 08/13] lib-ldb_ldif: Stop processing if ldb_message element name is NULL I have hit this while using Python bindings for testing and forgot to pass 'name' argument to MessageElement constructor Passing NULL as 'name' is obviously a mistake and this commits aims to warn about such unintetional mistakes. Signed-off-by: Kamen Mazdrashki Reviewed-by: Andrew Bartlett (cherry picked from commit 7f121d3860ee3289f5fd397ab3312634d11cb2f2) --- lib/ldb/common/ldb_ldif.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/ldb/common/ldb_ldif.c b/lib/ldb/common/ldb_ldif.c index a2e4488..f9743dc 100644 --- a/lib/ldb/common/ldb_ldif.c +++ b/lib/ldb/common/ldb_ldif.c @@ -312,6 +312,13 @@ static int ldb_ldif_write_trace(struct ldb_context *ldb, for (i=0;inum_elements;i++) { const struct ldb_schema_attribute *a; + if (msg->elements[i].name == NULL) { + ldb_debug(ldb, LDB_DEBUG_ERROR, + "Error: Invalid element name (NULL) at position %d", i); + talloc_free(mem_ctx); + return -1; + } + a = ldb_schema_attribute_by_name(ldb, msg->elements[i].name); if (ldif->changetype == LDB_CHANGETYPE_MODIFY) { -- 1.9.1 From b73daf6939da40ea9ceb151004301768d09f47c0 Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Wed, 12 Nov 2014 01:17:56 +0100 Subject: [PATCH 09/13] lib-pyldb: Avoid crash when copying MessageElements between Python Message objects This patch allows for following snipets in Python: res = ldb.search(...) m_from = res[0] m_to = Message() m_to.add(m_from["attrName"]) The problem previously is that we are trying to reference a ldb_message_element that may not be a memory context on its own. For instance, when search request from above example returns Messages with more than one attribute, this leads immediately to "Bad talloc magic value" crash, every message element beside the first one is not a memory context Signed-off-by: Kamen Mazdrashki Reviewed-by: Andrew Bartlett (cherry picked from commit 2d67335f681a60a636e48107d908778806a0b15f) --- lib/ldb/pyldb.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c index 40c802f..e50bdea 100644 --- a/lib/ldb/pyldb.c +++ b/lib/ldb/pyldb.c @@ -2775,21 +2775,39 @@ static PyObject *py_ldb_msg_add(PyLdbMessageObject *self, PyObject *args) { struct ldb_message *msg = pyldb_Message_AsMessage(self); PyLdbMessageElementObject *py_element; - int ret; + int i, ret; struct ldb_message_element *el; + struct ldb_message_element *el_new; if (!PyArg_ParseTuple(args, "O!", &PyLdbMessageElement, &py_element)) return NULL; - el = talloc_reference(msg, py_element->el); + el = py_element->el; if (el == NULL) { - PyErr_NoMemory(); + PyErr_SetString(PyExc_ValueError, "Invalid MessageElement object"); return NULL; } - ret = ldb_msg_add(msg, el, el->flags); + ret = ldb_msg_add_empty(msg, el->name, el->flags, &el_new); PyErr_LDB_ERROR_IS_ERR_RAISE(PyExc_LdbError, ret, NULL); + /* now deep copy all attribute values */ + el_new->values = talloc_array(msg->elements, struct ldb_val, el->num_values); + if (el_new->values == NULL) { + PyErr_NoMemory(); + return NULL; + } + el_new->num_values = el->num_values; + + for (i = 0; i < el->num_values; i++) { + el_new->values[i] = ldb_val_dup(el_new->values, &el->values[i]); + if (el_new->values[i].data == NULL + && el->values[i].length != 0) { + PyErr_NoMemory(); + return NULL; + } + } + Py_RETURN_NONE; } -- 1.9.1 From 00d29660d585f63ecfb45799e8ea93fa5c0dff25 Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Tue, 25 Nov 2014 03:50:52 +0100 Subject: [PATCH 10/13] lib-ldb-test: Test copying message element from a message to a new message Change-Id: Iefcafb418a170ee410aec900bb36eb8e01e946b1 Signed-off-by: Kamen Mazdrashki Reviewed-by: Andrew Bartlett (cherry picked from commit 1d14af77299e88b5f0d3230ec0481ed5abaf4bdd) --- lib/ldb/tests/python/api.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/ldb/tests/python/api.py b/lib/ldb/tests/python/api.py index 7df40e4..7f5c504 100755 --- a/lib/ldb/tests/python/api.py +++ b/lib/ldb/tests/python/api.py @@ -592,6 +592,20 @@ class LdbMsgTests(TestCase): err_rec = {"a1": ["a1-val1", "a1-val1"]} self.assertRaises(TypeError, ldb.Message.from_dict, l, err_rec, ldb.FLAG_MOD_REPLACE) + def test_copy_add_message_element(self): + m = ldb.Message() + m["1"] = ldb.MessageElement(["val 111"], ldb.FLAG_MOD_ADD, "1") + m["2"] = ldb.MessageElement(["val 222"], ldb.FLAG_MOD_ADD, "2") + mto = ldb.Message() + mto["1"] = m["1"] + mto["2"] = m["2"] + self.assertEqual(mto["1"], m["1"]) + self.assertEqual(mto["2"], m["2"]) + mto = ldb.Message() + mto.add(m["1"]) + mto.add(m["2"]) + self.assertEqual(mto["1"], m["1"]) + self.assertEqual(mto["2"], m["2"]) class MessageElementTests(TestCase): -- 1.9.1 From a56b60b4c2bf47345141b275043c9e6bb1a0f0c6 Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Thu, 20 Nov 2014 04:06:01 +0100 Subject: [PATCH 11/13] lib-pyldb: Fix docstring for msg.add() method - it was "S.append()" Change-Id: I9492d3c3993fc3d68d7bf24405db6e8cd746eaac Signed-off-by: Kamen Mazdrashki Reviewed-by: Andrew Bartlett (cherry picked from commit 322320889c60f31cc536342bc9a54ae258f41139) --- lib/ldb/pyldb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c index e50bdea..a9ec637 100644 --- a/lib/ldb/pyldb.c +++ b/lib/ldb/pyldb.c @@ -2831,7 +2831,7 @@ static PyMethodDef py_ldb_msg_methods[] = { { "items", (PyCFunction)py_ldb_msg_items, METH_NOARGS, NULL }, { "elements", (PyCFunction)py_ldb_msg_elements, METH_NOARGS, NULL }, { "add", (PyCFunction)py_ldb_msg_add, METH_VARARGS, - "S.append(element)\n\n" + "S.add(element)\n\n" "Add an element to this message." }, { NULL }, }; -- 1.9.1 From 4eccda7e69153e38db28368209f979cdaf229796 Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Thu, 20 Nov 2014 04:07:47 +0100 Subject: [PATCH 12/13] lib-pyldb: Block elements should be surrounded by {} in py_msg.setitem() Change-Id: I0d09374b27708fcaad3523d985a2db7983dbd81a Signed-off-by: Kamen Mazdrashki Reviewed-by: Andrew Bartlett Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Tue Nov 25 07:24:12 CET 2014 on sn-devel-104 (cherry picked from commit 30c07907749063d0b0c663f1b43b02b4c6b0049d) --- lib/ldb/pyldb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c index a9ec637..ee751b3 100644 --- a/lib/ldb/pyldb.c +++ b/lib/ldb/pyldb.c @@ -2863,8 +2863,9 @@ static int py_ldb_msg_setitem(PyLdbMessageObject *self, PyObject *name, PyObject int ret; struct ldb_message_element *el = PyObject_AsMessageElement(self->msg, value, 0, attr_name); - if (el == NULL) + if (el == NULL) { return -1; + } ldb_msg_remove_attr(pyldb_Message_AsMessage(self), attr_name); ret = ldb_msg_add(pyldb_Message_AsMessage(self), el, el->flags); if (ret != LDB_SUCCESS) { -- 1.9.1 From f3d61005c019359879ba9d31657753bfedc1da09 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 29 Nov 2014 11:43:53 +0100 Subject: [PATCH 13/13] ldb: version 1.1.18 This release contains: - fixes for segfaults in pyldb - documentation fixes - build system improvements Signed-off-by: Stefan Metzmacher Reviewed-by: Volker Lendecke Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Sat Nov 29 14:45:56 CET 2014 on sn-devel-104 (cherry picked from commit 13a1406fa11f4c7eb1996a5ac1e33c966b886082) --- lib/ldb/ABI/ldb-1.1.18.sigs | 262 +++++++++++++++++++++++++++++++++++++ lib/ldb/ABI/pyldb-util-1.1.18.sigs | 2 + lib/ldb/wscript | 2 +- 3 files changed, 265 insertions(+), 1 deletion(-) create mode 100644 lib/ldb/ABI/ldb-1.1.18.sigs create mode 100644 lib/ldb/ABI/pyldb-util-1.1.18.sigs diff --git a/lib/ldb/ABI/ldb-1.1.18.sigs b/lib/ldb/ABI/ldb-1.1.18.sigs new file mode 100644 index 0000000..eac5194 --- /dev/null +++ b/lib/ldb/ABI/ldb-1.1.18.sigs @@ -0,0 +1,262 @@ +ldb_add: int (struct ldb_context *, const struct ldb_message *) +ldb_any_comparison: int (struct ldb_context *, void *, ldb_attr_handler_t, const struct ldb_val *, const struct ldb_val *) +ldb_asprintf_errstring: void (struct ldb_context *, const char *, ...) +ldb_attr_casefold: char *(TALLOC_CTX *, const char *) +ldb_attr_dn: int (const char *) +ldb_attr_in_list: int (const char * const *, const char *) +ldb_attr_list_copy: const char **(TALLOC_CTX *, const char * const *) +ldb_attr_list_copy_add: const char **(TALLOC_CTX *, const char * const *, const char *) +ldb_base64_decode: int (char *) +ldb_base64_encode: char *(TALLOC_CTX *, const char *, int) +ldb_binary_decode: struct ldb_val (TALLOC_CTX *, const char *) +ldb_binary_encode: char *(TALLOC_CTX *, struct ldb_val) +ldb_binary_encode_string: char *(TALLOC_CTX *, const char *) +ldb_build_add_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) +ldb_build_del_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) +ldb_build_extended_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, const char *, void *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) +ldb_build_mod_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) +ldb_build_rename_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, struct ldb_dn *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) +ldb_build_search_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, enum ldb_scope, const char *, const char * const *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) +ldb_build_search_req_ex: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, enum ldb_scope, struct ldb_parse_tree *, const char * const *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *) +ldb_casefold: char *(struct ldb_context *, TALLOC_CTX *, const char *, size_t) +ldb_casefold_default: char *(void *, TALLOC_CTX *, const char *, size_t) +ldb_check_critical_controls: int (struct ldb_control **) +ldb_comparison_binary: int (struct ldb_context *, void *, const struct ldb_val *, const struct ldb_val *) +ldb_comparison_fold: int (struct ldb_context *, void *, const struct ldb_val *, const struct ldb_val *) +ldb_connect: int (struct ldb_context *, const char *, unsigned int, const char **) +ldb_control_to_string: char *(TALLOC_CTX *, const struct ldb_control *) +ldb_controls_except_specified: struct ldb_control **(struct ldb_control **, TALLOC_CTX *, struct ldb_control *) +ldb_debug: void (struct ldb_context *, enum ldb_debug_level, const char *, ...) +ldb_debug_add: void (struct ldb_context *, const char *, ...) +ldb_debug_end: void (struct ldb_context *, enum ldb_debug_level) +ldb_debug_set: void (struct ldb_context *, enum ldb_debug_level, const char *, ...) +ldb_delete: int (struct ldb_context *, struct ldb_dn *) +ldb_dn_add_base: bool (struct ldb_dn *, struct ldb_dn *) +ldb_dn_add_base_fmt: bool (struct ldb_dn *, const char *, ...) +ldb_dn_add_child: bool (struct ldb_dn *, struct ldb_dn *) +ldb_dn_add_child_fmt: bool (struct ldb_dn *, const char *, ...) +ldb_dn_alloc_casefold: char *(TALLOC_CTX *, struct ldb_dn *) +ldb_dn_alloc_linearized: char *(TALLOC_CTX *, struct ldb_dn *) +ldb_dn_canonical_ex_string: char *(TALLOC_CTX *, struct ldb_dn *) +ldb_dn_canonical_string: char *(TALLOC_CTX *, struct ldb_dn *) +ldb_dn_check_local: bool (struct ldb_module *, struct ldb_dn *) +ldb_dn_check_special: bool (struct ldb_dn *, const char *) +ldb_dn_compare: int (struct ldb_dn *, struct ldb_dn *) +ldb_dn_compare_base: int (struct ldb_dn *, struct ldb_dn *) +ldb_dn_copy: struct ldb_dn *(TALLOC_CTX *, struct ldb_dn *) +ldb_dn_escape_value: char *(TALLOC_CTX *, struct ldb_val) +ldb_dn_extended_add_syntax: int (struct ldb_context *, unsigned int, const struct ldb_dn_extended_syntax *) +ldb_dn_extended_filter: void (struct ldb_dn *, const char * const *) +ldb_dn_extended_syntax_by_name: const struct ldb_dn_extended_syntax *(struct ldb_context *, const char *) +ldb_dn_from_ldb_val: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const struct ldb_val *) +ldb_dn_get_casefold: const char *(struct ldb_dn *) +ldb_dn_get_comp_num: int (struct ldb_dn *) +ldb_dn_get_component_name: const char *(struct ldb_dn *, unsigned int) +ldb_dn_get_component_val: const struct ldb_val *(struct ldb_dn *, unsigned int) +ldb_dn_get_extended_comp_num: int (struct ldb_dn *) +ldb_dn_get_extended_component: const struct ldb_val *(struct ldb_dn *, const char *) +ldb_dn_get_extended_linearized: char *(TALLOC_CTX *, struct ldb_dn *, int) +ldb_dn_get_linearized: const char *(struct ldb_dn *) +ldb_dn_get_parent: struct ldb_dn *(TALLOC_CTX *, struct ldb_dn *) +ldb_dn_get_rdn_name: const char *(struct ldb_dn *) +ldb_dn_get_rdn_val: const struct ldb_val *(struct ldb_dn *) +ldb_dn_has_extended: bool (struct ldb_dn *) +ldb_dn_is_null: bool (struct ldb_dn *) +ldb_dn_is_special: bool (struct ldb_dn *) +ldb_dn_is_valid: bool (struct ldb_dn *) +ldb_dn_map_local: struct ldb_dn *(struct ldb_module *, void *, struct ldb_dn *) +ldb_dn_map_rebase_remote: struct ldb_dn *(struct ldb_module *, void *, struct ldb_dn *) +ldb_dn_map_remote: struct ldb_dn *(struct ldb_module *, void *, struct ldb_dn *) +ldb_dn_minimise: bool (struct ldb_dn *) +ldb_dn_new: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const char *) +ldb_dn_new_fmt: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const char *, ...) +ldb_dn_remove_base_components: bool (struct ldb_dn *, unsigned int) +ldb_dn_remove_child_components: bool (struct ldb_dn *, unsigned int) +ldb_dn_remove_extended_components: void (struct ldb_dn *) +ldb_dn_replace_components: bool (struct ldb_dn *, struct ldb_dn *) +ldb_dn_set_component: int (struct ldb_dn *, int, const char *, const struct ldb_val) +ldb_dn_set_extended_component: int (struct ldb_dn *, const char *, const struct ldb_val *) +ldb_dn_update_components: int (struct ldb_dn *, const struct ldb_dn *) +ldb_dn_validate: bool (struct ldb_dn *) +ldb_dump_results: void (struct ldb_context *, struct ldb_result *, FILE *) +ldb_error_at: int (struct ldb_context *, int, const char *, const char *, int) +ldb_errstring: const char *(struct ldb_context *) +ldb_extended: int (struct ldb_context *, const char *, void *, struct ldb_result **) +ldb_extended_default_callback: int (struct ldb_request *, struct ldb_reply *) +ldb_filter_from_tree: char *(TALLOC_CTX *, const struct ldb_parse_tree *) +ldb_get_config_basedn: struct ldb_dn *(struct ldb_context *) +ldb_get_create_perms: unsigned int (struct ldb_context *) +ldb_get_default_basedn: struct ldb_dn *(struct ldb_context *) +ldb_get_event_context: struct tevent_context *(struct ldb_context *) +ldb_get_flags: unsigned int (struct ldb_context *) +ldb_get_opaque: void *(struct ldb_context *, const char *) +ldb_get_root_basedn: struct ldb_dn *(struct ldb_context *) +ldb_get_schema_basedn: struct ldb_dn *(struct ldb_context *) +ldb_global_init: int (void) +ldb_handle_new: struct ldb_handle *(TALLOC_CTX *, struct ldb_context *) +ldb_handler_copy: int (struct ldb_context *, void *, const struct ldb_val *, struct ldb_val *) +ldb_handler_fold: int (struct ldb_context *, void *, const struct ldb_val *, struct ldb_val *) +ldb_init: struct ldb_context *(TALLOC_CTX *, struct tevent_context *) +ldb_ldif_message_string: char *(struct ldb_context *, TALLOC_CTX *, enum ldb_changetype, const struct ldb_message *) +ldb_ldif_parse_modrdn: int (struct ldb_context *, const struct ldb_ldif *, TALLOC_CTX *, struct ldb_dn **, struct ldb_dn **, bool *, struct ldb_dn **, struct ldb_dn **) +ldb_ldif_read: struct ldb_ldif *(struct ldb_context *, int (*)(void *), void *) +ldb_ldif_read_file: struct ldb_ldif *(struct ldb_context *, FILE *) +ldb_ldif_read_file_state: struct ldb_ldif *(struct ldb_context *, struct ldif_read_file_state *) +ldb_ldif_read_free: void (struct ldb_context *, struct ldb_ldif *) +ldb_ldif_read_string: struct ldb_ldif *(struct ldb_context *, const char **) +ldb_ldif_write: int (struct ldb_context *, int (*)(void *, const char *, ...), void *, const struct ldb_ldif *) +ldb_ldif_write_file: int (struct ldb_context *, FILE *, const struct ldb_ldif *) +ldb_ldif_write_redacted_trace_string: char *(struct ldb_context *, TALLOC_CTX *, const struct ldb_ldif *) +ldb_ldif_write_string: char *(struct ldb_context *, TALLOC_CTX *, const struct ldb_ldif *) +ldb_load_modules: int (struct ldb_context *, const char **) +ldb_map_add: int (struct ldb_module *, struct ldb_request *) +ldb_map_delete: int (struct ldb_module *, struct ldb_request *) +ldb_map_init: int (struct ldb_module *, const struct ldb_map_attribute *, const struct ldb_map_objectclass *, const char * const *, const char *, const char *) +ldb_map_modify: int (struct ldb_module *, struct ldb_request *) +ldb_map_rename: int (struct ldb_module *, struct ldb_request *) +ldb_map_search: int (struct ldb_module *, struct ldb_request *) +ldb_match_msg: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, struct ldb_dn *, enum ldb_scope) +ldb_match_msg_error: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, struct ldb_dn *, enum ldb_scope, bool *) +ldb_match_msg_objectclass: int (const struct ldb_message *, const char *) +ldb_mod_register_control: int (struct ldb_module *, const char *) +ldb_modify: int (struct ldb_context *, const struct ldb_message *) +ldb_modify_default_callback: int (struct ldb_request *, struct ldb_reply *) +ldb_module_call_chain: char *(struct ldb_request *, TALLOC_CTX *) +ldb_module_connect_backend: int (struct ldb_context *, const char *, const char **, struct ldb_module **) +ldb_module_done: int (struct ldb_request *, struct ldb_control **, struct ldb_extended *, int) +ldb_module_flags: uint32_t (struct ldb_context *) +ldb_module_get_ctx: struct ldb_context *(struct ldb_module *) +ldb_module_get_name: const char *(struct ldb_module *) +ldb_module_get_ops: const struct ldb_module_ops *(struct ldb_module *) +ldb_module_get_private: void *(struct ldb_module *) +ldb_module_init_chain: int (struct ldb_context *, struct ldb_module *) +ldb_module_load_list: int (struct ldb_context *, const char **, struct ldb_module *, struct ldb_module **) +ldb_module_new: struct ldb_module *(TALLOC_CTX *, struct ldb_context *, const char *, const struct ldb_module_ops *) +ldb_module_next: struct ldb_module *(struct ldb_module *) +ldb_module_popt_options: struct poptOption **(struct ldb_context *) +ldb_module_send_entry: int (struct ldb_request *, struct ldb_message *, struct ldb_control **) +ldb_module_send_referral: int (struct ldb_request *, char *) +ldb_module_set_next: void (struct ldb_module *, struct ldb_module *) +ldb_module_set_private: void (struct ldb_module *, void *) +ldb_modules_hook: int (struct ldb_context *, enum ldb_module_hook_type) +ldb_modules_list_from_string: const char **(struct ldb_context *, TALLOC_CTX *, const char *) +ldb_modules_load: int (const char *, const char *) +ldb_msg_add: int (struct ldb_message *, const struct ldb_message_element *, int) +ldb_msg_add_empty: int (struct ldb_message *, const char *, int, struct ldb_message_element **) +ldb_msg_add_fmt: int (struct ldb_message *, const char *, const char *, ...) +ldb_msg_add_linearized_dn: int (struct ldb_message *, const char *, struct ldb_dn *) +ldb_msg_add_steal_string: int (struct ldb_message *, const char *, char *) +ldb_msg_add_steal_value: int (struct ldb_message *, const char *, struct ldb_val *) +ldb_msg_add_string: int (struct ldb_message *, const char *, const char *) +ldb_msg_add_value: int (struct ldb_message *, const char *, const struct ldb_val *, struct ldb_message_element **) +ldb_msg_canonicalize: struct ldb_message *(struct ldb_context *, const struct ldb_message *) +ldb_msg_check_string_attribute: int (const struct ldb_message *, const char *, const char *) +ldb_msg_copy: struct ldb_message *(TALLOC_CTX *, const struct ldb_message *) +ldb_msg_copy_attr: int (struct ldb_message *, const char *, const char *) +ldb_msg_copy_shallow: struct ldb_message *(TALLOC_CTX *, const struct ldb_message *) +ldb_msg_diff: struct ldb_message *(struct ldb_context *, struct ldb_message *, struct ldb_message *) +ldb_msg_difference: int (struct ldb_context *, TALLOC_CTX *, struct ldb_message *, struct ldb_message *, struct ldb_message **) +ldb_msg_element_compare: int (struct ldb_message_element *, struct ldb_message_element *) +ldb_msg_element_compare_name: int (struct ldb_message_element *, struct ldb_message_element *) +ldb_msg_element_equal_ordered: bool (const struct ldb_message_element *, const struct ldb_message_element *) +ldb_msg_find_attr_as_bool: int (const struct ldb_message *, const char *, int) +ldb_msg_find_attr_as_dn: struct ldb_dn *(struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, const char *) +ldb_msg_find_attr_as_double: double (const struct ldb_message *, const char *, double) +ldb_msg_find_attr_as_int: int (const struct ldb_message *, const char *, int) +ldb_msg_find_attr_as_int64: int64_t (const struct ldb_message *, const char *, int64_t) +ldb_msg_find_attr_as_string: const char *(const struct ldb_message *, const char *, const char *) +ldb_msg_find_attr_as_uint: unsigned int (const struct ldb_message *, const char *, unsigned int) +ldb_msg_find_attr_as_uint64: uint64_t (const struct ldb_message *, const char *, uint64_t) +ldb_msg_find_element: struct ldb_message_element *(const struct ldb_message *, const char *) +ldb_msg_find_ldb_val: const struct ldb_val *(const struct ldb_message *, const char *) +ldb_msg_find_val: struct ldb_val *(const struct ldb_message_element *, struct ldb_val *) +ldb_msg_new: struct ldb_message *(TALLOC_CTX *) +ldb_msg_normalize: int (struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, struct ldb_message **) +ldb_msg_remove_attr: void (struct ldb_message *, const char *) +ldb_msg_remove_element: void (struct ldb_message *, struct ldb_message_element *) +ldb_msg_rename_attr: int (struct ldb_message *, const char *, const char *) +ldb_msg_sanity_check: int (struct ldb_context *, const struct ldb_message *) +ldb_msg_sort_elements: void (struct ldb_message *) +ldb_next_del_trans: int (struct ldb_module *) +ldb_next_end_trans: int (struct ldb_module *) +ldb_next_init: int (struct ldb_module *) +ldb_next_prepare_commit: int (struct ldb_module *) +ldb_next_remote_request: int (struct ldb_module *, struct ldb_request *) +ldb_next_request: int (struct ldb_module *, struct ldb_request *) +ldb_next_start_trans: int (struct ldb_module *) +ldb_op_default_callback: int (struct ldb_request *, struct ldb_reply *) +ldb_options_find: const char *(struct ldb_context *, const char **, const char *) +ldb_pack_data: int (struct ldb_context *, const struct ldb_message *, struct ldb_val *) +ldb_parse_control_from_string: struct ldb_control *(struct ldb_context *, TALLOC_CTX *, const char *) +ldb_parse_control_strings: struct ldb_control **(struct ldb_context *, TALLOC_CTX *, const char **) +ldb_parse_tree: struct ldb_parse_tree *(TALLOC_CTX *, const char *) +ldb_parse_tree_attr_replace: void (struct ldb_parse_tree *, const char *, const char *) +ldb_parse_tree_copy_shallow: struct ldb_parse_tree *(TALLOC_CTX *, const struct ldb_parse_tree *) +ldb_parse_tree_walk: int (struct ldb_parse_tree *, int (*)(struct ldb_parse_tree *, void *), void *) +ldb_qsort: void (void * const, size_t, size_t, void *, ldb_qsort_cmp_fn_t) +ldb_register_backend: int (const char *, ldb_connect_fn, bool) +ldb_register_hook: int (ldb_hook_fn) +ldb_register_module: int (const struct ldb_module_ops *) +ldb_rename: int (struct ldb_context *, struct ldb_dn *, struct ldb_dn *) +ldb_reply_add_control: int (struct ldb_reply *, const char *, bool, void *) +ldb_reply_get_control: struct ldb_control *(struct ldb_reply *, const char *) +ldb_req_get_custom_flags: uint32_t (struct ldb_request *) +ldb_req_is_untrusted: bool (struct ldb_request *) +ldb_req_location: const char *(struct ldb_request *) +ldb_req_mark_trusted: void (struct ldb_request *) +ldb_req_mark_untrusted: void (struct ldb_request *) +ldb_req_set_custom_flags: void (struct ldb_request *, uint32_t) +ldb_req_set_location: void (struct ldb_request *, const char *) +ldb_request: int (struct ldb_context *, struct ldb_request *) +ldb_request_add_control: int (struct ldb_request *, const char *, bool, void *) +ldb_request_done: int (struct ldb_request *, int) +ldb_request_get_control: struct ldb_control *(struct ldb_request *, const char *) +ldb_request_get_status: int (struct ldb_request *) +ldb_request_replace_control: int (struct ldb_request *, const char *, bool, void *) +ldb_request_set_state: void (struct ldb_request *, int) +ldb_reset_err_string: void (struct ldb_context *) +ldb_save_controls: int (struct ldb_control *, struct ldb_request *, struct ldb_control ***) +ldb_schema_attribute_add: int (struct ldb_context *, const char *, unsigned int, const char *) +ldb_schema_attribute_add_with_syntax: int (struct ldb_context *, const char *, unsigned int, const struct ldb_schema_syntax *) +ldb_schema_attribute_by_name: const struct ldb_schema_attribute *(struct ldb_context *, const char *) +ldb_schema_attribute_remove: void (struct ldb_context *, const char *) +ldb_schema_attribute_set_override_handler: void (struct ldb_context *, ldb_attribute_handler_override_fn_t, void *) +ldb_search: int (struct ldb_context *, TALLOC_CTX *, struct ldb_result **, struct ldb_dn *, enum ldb_scope, const char * const *, const char *, ...) +ldb_search_default_callback: int (struct ldb_request *, struct ldb_reply *) +ldb_sequence_number: int (struct ldb_context *, enum ldb_sequence_type, uint64_t *) +ldb_set_create_perms: void (struct ldb_context *, unsigned int) +ldb_set_debug: int (struct ldb_context *, void (*)(void *, enum ldb_debug_level, const char *, va_list), void *) +ldb_set_debug_stderr: int (struct ldb_context *) +ldb_set_default_dns: void (struct ldb_context *) +ldb_set_errstring: void (struct ldb_context *, const char *) +ldb_set_event_context: void (struct ldb_context *, struct tevent_context *) +ldb_set_flags: void (struct ldb_context *, unsigned int) +ldb_set_modules_dir: void (struct ldb_context *, const char *) +ldb_set_opaque: int (struct ldb_context *, const char *, void *) +ldb_set_timeout: int (struct ldb_context *, struct ldb_request *, int) +ldb_set_timeout_from_prev_req: int (struct ldb_context *, struct ldb_request *, struct ldb_request *) +ldb_set_utf8_default: void (struct ldb_context *) +ldb_set_utf8_fns: void (struct ldb_context *, void *, char *(*)(void *, void *, const char *, size_t)) +ldb_setup_wellknown_attributes: int (struct ldb_context *) +ldb_should_b64_encode: int (struct ldb_context *, const struct ldb_val *) +ldb_standard_syntax_by_name: const struct ldb_schema_syntax *(struct ldb_context *, const char *) +ldb_strerror: const char *(int) +ldb_string_to_time: time_t (const char *) +ldb_string_utc_to_time: time_t (const char *) +ldb_timestring: char *(TALLOC_CTX *, time_t) +ldb_timestring_utc: char *(TALLOC_CTX *, time_t) +ldb_transaction_cancel: int (struct ldb_context *) +ldb_transaction_cancel_noerr: int (struct ldb_context *) +ldb_transaction_commit: int (struct ldb_context *) +ldb_transaction_prepare_commit: int (struct ldb_context *) +ldb_transaction_start: int (struct ldb_context *) +ldb_unpack_data: int (struct ldb_context *, const struct ldb_val *, struct ldb_message *) +ldb_val_dup: struct ldb_val (TALLOC_CTX *, const struct ldb_val *) +ldb_val_equal_exact: int (const struct ldb_val *, const struct ldb_val *) +ldb_val_map_local: struct ldb_val (struct ldb_module *, void *, const struct ldb_map_attribute *, const struct ldb_val *) +ldb_val_map_remote: struct ldb_val (struct ldb_module *, void *, const struct ldb_map_attribute *, const struct ldb_val *) +ldb_val_string_cmp: int (const struct ldb_val *, const char *) +ldb_val_to_time: int (const struct ldb_val *, time_t *) +ldb_valid_attr_name: int (const char *) +ldb_vdebug: void (struct ldb_context *, enum ldb_debug_level, const char *, va_list) +ldb_wait: int (struct ldb_handle *, enum ldb_wait_type) diff --git a/lib/ldb/ABI/pyldb-util-1.1.18.sigs b/lib/ldb/ABI/pyldb-util-1.1.18.sigs new file mode 100644 index 0000000..74d6719 --- /dev/null +++ b/lib/ldb/ABI/pyldb-util-1.1.18.sigs @@ -0,0 +1,2 @@ +pyldb_Dn_FromDn: PyObject *(struct ldb_dn *) +pyldb_Object_AsDn: bool (TALLOC_CTX *, PyObject *, struct ldb_context *, struct ldb_dn **) diff --git a/lib/ldb/wscript b/lib/ldb/wscript index cb6b5c8..0fba225 100755 --- a/lib/ldb/wscript +++ b/lib/ldb/wscript @@ -1,7 +1,7 @@ #!/usr/bin/env python APPNAME = 'ldb' -VERSION = '1.1.17' +VERSION = '1.1.18' blddir = 'bin' -- 1.9.1