diff options
author | Sumit Bose <sbose@redhat.com> | 2013-05-22 16:36:51 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-05-23 11:04:15 +0200 |
commit | 4188968d18f31806da808d922bcd48501a02f92d (patch) | |
tree | 6ba9476b8da979a751a48e2772665577b9086f65 /src/python | |
parent | 071962f5cb3bd8ddf33210640ff62c04f09ce5c3 (diff) | |
download | sssd-4188968d18f31806da808d922bcd48501a02f92d.tar.gz sssd-4188968d18f31806da808d922bcd48501a02f92d.tar.bz2 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.
Diffstat (limited to 'src/python')
-rw-r--r-- | src/python/pysss_nss_idmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/python/pysss_nss_idmap.c b/src/python/pysss_nss_idmap.c index 0d596390..c938ff7a 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); |