summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2012-02-11 12:48:20 +0100
committerAndrew Bartlett <abartlet@samba.org>2012-02-13 09:49:12 +1100
commit1e46ccba5ada1be310be4bbf4a954df73cde6c3a (patch)
treedb0d016bbf4a2d0c62a54040bc2c03d1e197af97 /lib
parent2d66d16af09239d285d572b9e3749b0132b69f99 (diff)
downloadsamba-1e46ccba5ada1be310be4bbf4a954df73cde6c3a.tar.gz
samba-1e46ccba5ada1be310be4bbf4a954df73cde6c3a.tar.bz2
samba-1e46ccba5ada1be310be4bbf4a954df73cde6c3a.zip
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 <abartlet@samba.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/ldb/pyldb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c
index b253bcd28e..2f99d1404a 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) {