From 1e46ccba5ada1be310be4bbf4a954df73cde6c3a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Matthias=20Dieter=20Walln=C3=B6fer?= Date: Sat, 11 Feb 2012 12:48:20 +0100 Subject: [PATCH] LDB:pyldb.c - use always the case insensitive comparison for attribute names We can make no assumptions about our users Signed-off-by: Andrew Bartlett --- lib/ldb/pyldb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c index b253bcd28e6..2f99d1404ad 100644 --- a/lib/ldb/pyldb.c +++ b/lib/ldb/pyldb.c @@ -1051,7 +1051,7 @@ static struct ldb_message *PyDict_AsMessage(TALLOC_CTX *mem_ctx, while (PyDict_Next(py_obj, &dict_pos, &key, &value)) { char *key_str = PyString_AsString(key); - if (strcmp(key_str, "dn") != 0) { + if (ldb_attr_cmp(key_str, "dn") != 0) { msg_el = PyObject_AsMessageElement(msg->elements, value, mod_flags, key_str); if (msg_el == NULL) { @@ -2516,7 +2516,7 @@ static PyObject *py_ldb_msg_getitem_helper(PyLdbMessageObject *self, PyObject *p return NULL; } name = PyString_AsString(py_name); - if (!strcmp(name, "dn")) + if (!ldb_attr_cmp(name, "dn")) return pyldb_Dn_FromDn(msg->dn); el = ldb_msg_find_element(msg, name); if (el == NULL) { -- 2.34.1