History log of /sssd-io/src/python/pysss_murmur.c
Revision Date Author Comments Expand
1c42c3962577ea4b2d9ed6a8a07179d33756b3b4 16-Feb-2018 Fabiano Fidêncio <fidencio@redhat.com>

PYSSS_MURMUR: Fix [-Wsign-compare] found by gcc While building the project I've noticed the following warning: ../src/python/pysss_murmur.c: In function ‘py_murmurhash3’: ../src/python/pysss_murmur.c:50:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] (size_t)key_len > input_len) { ^ Previously we were comparing key_len(long) with the output of strlen(key) (size_t), thus the (size_t) cast. Currently, we can jut compare key_len with input_len without issues and without the needed to the cast. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> Related to: https://pagure.io/SSSD/sssd/issue/3592

41454a64c714e984423fd6e94ea89d183a73cc67 15-Feb-2018 Lukas Slebodnik <lslebodn@redhat.com>

pysss_murmur: Allow to have NUL character in python bindings Reviewed-by: Sumit Bose <sbose@redhat.com>

3996e391054a1c02ab62e1541ae21a8204bd5d0a 03-Aug-2017 AmitKumar <amitkuma@redhat.com>

Moving headers used by both server and client to special folder These are the header files which are used by both client and server: src/util/io.h src/util/murmurhash3.h src/util/util_safealign.h This patch is about moving these header files to special folder (src/shared). It will be easier to identify these headers when looking for them in the src tree. util_safalign.h is renamed as safalign.h because util_ namespace is appropriate when this file belonged to the util's folder which is no longer the case. Resolves: https://pagure.io/SSSD/sssd/issue/1898 Reviewed-by: Fabiano Fidêncio <fidencio@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>

2ff8131cf02decaf0dd0754e843732fe7774fc59 29-Jan-2016 Lukas Slebodnik <lslebodn@redhat.com>

pysss_murmur: Fix warning Wsign-compare src/python/pysss_murmur.c: In function ‘py_murmurhash3’: src/python/pysss_murmur.c:47:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] key_len > strlen(key)) { ^ uint32_t murmurhash3(const char *key, int len, uint32_t seed) The second argument of the function murmurhash3 has type int. But the code expects to be unsigned integer. There is code in python wrapper py_murmurhash3 which check boundaries of that argument. It should be an unsigned "key_len > INT_MAX || key_len < 0". An exception should be thrown for negative number. Moreover, the length should be shorter then a length of input string. The strlen returns size_t which is unsigned and key_len is signed long. We already checked that value is unsigned so we can safely cast key_len to size_t Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>

341a00311680a440d7f979f06c34c70d86c9367a 13-Jan-2015 Bohuslav Kabrda <bkabrda@redhat.com>

Python3 support in SSSD https://fedorahosted.org/sssd/ticket/2017

56ad566af1e595dacfcc5a213d906e8070bb263c 16-Aug-2012 Jakub Hrozek <jhrozek@redhat.com>

Fix compilation error in Python murmurhash bindings The compilation produced an error due to missing declaration of uint32_t and a couple of warnings caused by different prototypes of argument parsing functions in older Python releases.

60e51fd2764291df2332f36ff478777627d92b57 15-Aug-2012 Sumit Bose <sbose@redhat.com>

Add python bindings for murmurhash3