From 4188968d18f31806da808d922bcd48501a02f92d Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Wed, 22 May 2013 16:36:51 +0200 Subject: 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. --- src/python/pysss_nss_idmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/python') 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); -- cgit