summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2013-05-22 16:36:51 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-05-23 11:04:15 +0200
commit4188968d18f31806da808d922bcd48501a02f92d (patch)
tree6ba9476b8da979a751a48e2772665577b9086f65
parent071962f5cb3bd8ddf33210640ff62c04f09ce5c3 (diff)
downloadsssd-4188968d18f31806da808d922bcd48501a02f92d.tar.gz
sssd-4188968d18f31806da808d922bcd48501a02f92d.tar.xz
sssd-4188968d18f31806da808d922bcd48501a02f92d.zip
pysss_nss_idmap: do not treat strings as sequences
The current PySequence_Check() also catches single strings with the effect that the string is split into characters which are send as arguments to SSSD individually. With this patch only tuples and lists are treated as sequences.
-rw-r--r--src/python/pysss_nss_idmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/python/pysss_nss_idmap.c b/src/python/pysss_nss_idmap.c
index 0d596390b..c938ff7ad 100644
--- a/src/python/pysss_nss_idmap.c
+++ b/src/python/pysss_nss_idmap.c
@@ -236,7 +236,7 @@ static PyObject *check_args(enum lookup_type type, PyObject *args)
return NULL;
}
- if (PySequence_Check(obj)) {
+ if (PyList_Check(obj) || PyTuple_Check(obj)) {
len = PySequence_Size(obj);
for(i=0; i < len; i++) {
py_value = PySequence_GetItem(obj, i);