e7fd33642a16cbb2cd814d3578c28affcf16f68c |
|
13-Sep-2017 |
Lukas Slebodnik <lslebodn@redhat.com> |
pysss_nss_idmap: Fix typos in python documentation
s/dictonary/dictionary/g
Reviewed-by: Sumit Bose <sbose@redhat.com> |
cc4d6435ef49738a02ddfc6072f1197d7f8f7319 |
|
13-Sep-2017 |
Lukas Slebodnik <lslebodn@redhat.com> |
pysss_nss_idmap: return same type as it is in module constants
The python module pysss_nss_idmap contains few module constants
which should be used (based on python documentation) for checking
type of results.
e.g.
getsidbyid(...)
getsidbyid(id or list/tuple of id) -> dict(id => dict(results))
Returns a dictionary with a dictionary of results for each given
POSIX ID. The result dictionary contains the SID and the type of the
object which can be accessed with the key constants SID_KEY and
TYPE_KEY, respectively.
However, type of module constant and type of returned key had different type
with python3 due to different handling of strings. This patch unifies it
to string. The same as it is in python2.
Resolves:
https://pagure.io/SSSD/sssd/issue/3491
Reviewed-by: Sumit Bose <sbose@redhat.com> |
53f74f54209120060cd020d65646b3a471d90988 |
|
13-Sep-2017 |
Lukas Slebodnik <lslebodn@redhat.com> |
Revert "PYTHON: Define constants as bytes instead of strings"
This reverts commit 9375eae59550437c85ada9212be430a4242b25a4.
Patch introduced difference between python2 and python3.
constant should be strings in both versions.
sh$ python2
Python 2.7.13 (default, Aug 16 2017, 12:56:26)
[GCC 7.1.1 20170802 (Red Hat 7.1.1-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pysss_nss_idmap
>>> type(pysss_nss_idmap.SID_KEY)
<type 'str'>
sh$ python3
Python 3.6.2 (default, Sep 1 2017, 12:03:48)
[GCC 7.1.1 20170802 (Red Hat 7.1.1-7)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pysss_nss_idmap
>>> type(pysss_nss_idmap.SID_KEY)
<class 'bytes'>
Reviewed-by: Sumit Bose <sbose@redhat.com> |
9375eae59550437c85ada9212be430a4242b25a4 |
|
31-Aug-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
PYTHON: Define constants as bytes instead of strings
When using python3 getsidbyname() and getnamebysid() expect the key as
bytes instead of strings, and currently those are defined as strings.
So, in order to avoid people working around this by doing
`pysss_nss_idmap.SID_KEY.encode('utf-8')` let's make their life easier
and properly have those constants defined as bytes.
Resolves: https://pagure.io/SSSD/sssd/issue/3491
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Michal Židek <mzidek@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
440797cba931aa491bf418035f55935943e22b4b |
|
23-Mar-2017 |
Sumit Bose <sbose@redhat.com> |
nss-idmap: add sss_nss_getlistbycert()
This patch adds a getlistbycert() call to libsss_nss_idmap to make it on
par with InfoPipe.
Related to https://pagure.io/SSSD/sssd/issue/3050
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
69fb159e1464ef91376f56e65afa9704d5bafad8 |
|
02-Jan-2017 |
Lukas Slebodnik <lslebodn@redhat.com> |
Fix compilation with python3.6
Autotools does not generate defines in conditional way (ifndef .. define)
and therefore it might happen that "defines" in config.h migt redefine
some macros in different way and generate a warning.
e.g.
In file included from /home/build/sssd/src/util/util.h:24:0,
from /home/build/sssd/src/python/pyhbac.c:24:
./config.h:322:0: error: "HAVE_LONG_LONG" redefined [-Werror]
#define HAVE_LONG_LONG 1
In file included from /usr/include/python3.6m/Python.h:50:0,
from /home/build/sssd/src/python/pyhbac.c:21:
/usr/include/python3.6m/pyport.h:42:0: note: this is the location of the previous definition
#define HAVE_LONG_LONG
We need to include config.h before Python.h to avoid redefinition of
HAVE_LONG_LONG which is definded conditionally in Python.h
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
9c88f837ffacf6548c13825589b327de1a5525f3 |
|
09-Jun-2016 |
Sumit Bose <sbose@redhat.com> |
nss-idmap: add sss_nss_getnamebycert()
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
341a00311680a440d7f979f06c34c70d86c9367a |
|
13-Jan-2015 |
Bohuslav Kabrda <bkabrda@redhat.com> |
Python3 support in SSSD
https://fedorahosted.org/sssd/ticket/2017 |
fed544f8c960bf346679870843854bf43e83c453 |
|
29-Jul-2013 |
Ondrej Kos <okos@redhat.com> |
Clarify that getnamebysid currently works only with ipa/ad id_provider
https://fedorahosted.org/sssd/ticket/2035 |
4188968d18f31806da808d922bcd48501a02f92d |
|
23-May-2013 |
Sumit Bose <sbose@redhat.com> |
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. |
e1a9780b5c75602618773b1510e076897e129b36 |
|
13-May-2013 |
Sumit Bose <sbose@redhat.com> |
Add support for tuples and unicode pysss_nss_idmap.so
https://fedorahosted.org/sssd/ticket/1905
https://fedorahosted.org/sssd/ticket/1914
This patch allows tuples as well as lists as input and adds support for
Unicode objects as input and always returns the results as Unicode
objects. |
e506a551187dc92683f0903515dd1d2b57ce05e5 |
|
10-May-2013 |
Sumit Bose <sbose@redhat.com> |
Fix missing initialization in Python bindings for libsss_nss_idmap
If sss_nss_getsidbyid() fails free() will try to work on an
uninitialized value. |
c080a11e9e88f35e40aff4e476cabbd971833019 |
|
03-May-2013 |
Sumit Bose <sbose@redhat.com> |
Add python interface to libsss_nss_idmap
To allow to use libsss_nss_idmap from python applications, e.g. the
FreeIPA server, the patch adds pythin bindings to libsss_nss_idmap. The
contributed spec file will place the python bindings in a new package
called libsss_nss_idmap-python.
Alexander Bokovoy <abokovoy@redhat.com> kindly provided the code to
check the type of the python objects and loop over the list entries. |