History log of /sssd/src/python/pyhbac.c
Revision Date Author Comments Expand
e0c86d21388bffe2e3919e780780c40d96186abb 12-Mar-2016 Jakub Hrozek <jhrozek@redhat.com>

libipa_hbac: Move the library to src/lib/ipa_hbac Moving the library to the lib directory will force maintainers to think twice about changes, because it would be obvious this is a library. Also don't use includes from sssd source tree paths, but add the util path to Makefile's CFLAGS so that other projects can copy the hbac_evaluator.c file verbatim. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>

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

pyhbac: Fix warning Wsign-compare src/python/pyhbac.c: In function ‘HbacRuleElement_repr’: src/python/pyhbac.c:506:59: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if (strnames == NULL || strgroups == NULL || category == -1) { ^ src/python/pyhbac.c: In function ‘HbacRuleElement_to_native’: src/python/pyhbac.c:614:51: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if (!el->names || !el->groups || el->category == -1) { ^ The static function native_category had type of terurn value uint32_t But it also could return -1 which indicated an error. It's better to don't mix return code with returned value. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>

e4796d5ed8e08be7f3767e12753389b18a2ce9f0 25-Feb-2015 Lukas Slebodnik <lslebodn@redhat.com>

UTIL: Remove python wrapper sss_python_unicode_from_string The function PyUnicode_FromString is available in python >= 2.6 Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>

a63b368a025a61edf41a3d5ce34f325b03295cf6 25-Feb-2015 Lukas Slebodnik <lslebodn@redhat.com>

UTIL: Remove python wrapper sss_python_set_check The macro PySet_Check is defined in python >= 2.6 Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>

887edd6b7c53fde44eb9f9060e09db5cd981ba37 25-Feb-2015 Lukas Slebodnik <lslebodn@redhat.com>

UTIL: Remove python wrapper sss_python_set_add The function PySet_Add is available in python >= 2.6 Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>

9eabaad5e0f3f20a6bcec0629342584c244a79bc 25-Feb-2015 Lukas Slebodnik <lslebodn@redhat.com>

UTIL: Remove python wrapper sss_python_set_new The function PySet_New is available in python >= 2.6 Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>

5085d263f2f084778b1314fc5e808668c3758d82 11-Feb-2015 Lukas Slebodnik <lslebodn@redhat.com>

Fix warning: equality comparison with extraneous parentheses Example of warning: src/sss_client/libwbclient/wbc_pwd_sssd.c:246:23: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality] if (((wbc_status) == WBC_ERR_SUCCESS)) { ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ src/sss_client/libwbclient/wbc_pwd_sssd.c:246:23: note: remove extraneous parentheses around the comparison to silence this warning if (((wbc_status) == WBC_ERR_SUCCESS)) { ~ ^ ~ src/sss_client/libwbclient/wbc_pwd_sssd.c:246:23: note: use '=' to turn this equality comparison into an assignment if (((wbc_status) == WBC_ERR_SUCCESS)) { ^~ = The reason is definition of some macros which were used in if conditions. Reviewed-by: Michal Židek <mzidek@redhat.com>

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

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

c52d7c41e4127a84f487777c0efa6996f6389c51 22-Oct-2014 Pavel Reichl <preichl@redhat.com>

pyhbac,pysss: fix reference leaks Resolves: https://fedorahosted.org/sssd/ticket/1195 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>

e625a14490d913aeb415a3acecb02af9e57ea233 02-May-2012 Jakub Hrozek <jhrozek@redhat.com>

PYHBAC: Return NULL on failure The error handler would simply fall through instead of returning NULL.

4a6a5421113ab662a665c62ed6a24b61a5a36950 28-Sep-2011 Jakub Hrozek <jhrozek@redhat.com>

Multiline macro cleanup This is mostly a cosmetic patch. The purpose of wrapping a multi-line macro in a do { } while(0) is to make the macro usable as a regular statement, not a compound statement. When the while(0) is terminated with a semicolon, the do { } while(0); block becomes a compound statement again.

8b6801a0b180ef87118e8f071eb2eeea4607baf1 04-Aug-2011 Jakub Hrozek <jhrozek@redhat.com>

pyhbac: Do not convert int to bool

1e710acc5ce225c7e6aa33bc0dfe8af65f49d182 01-Aug-2011 Jakub Hrozek <jhrozek@redhat.com>

HBAC rule validation Python bindings https://fedorahosted.org/sssd/ticket/943

d6354aa46716751a41ddab86bc64c1c7c218c5cc 27-Jul-2011 Jakub Hrozek <jhrozek@redhat.com>

Handle allocation error in python HBAC bindings https://fedorahosted.org/sssd/ticket/934

778d3b4ec69c0a8a59d3d23ebbf1e65a4ea286ef 27-Jul-2011 Jakub Hrozek <jhrozek@redhat.com>

Remove dead code from python HBAC bindings https://fedorahosted.org/sssd/ticket/935

72e60fd4eabcfbcdbfe01e8c38b94052bc6c2067 13-Jul-2011 Jakub Hrozek <jhrozek@redhat.com>

Fix python HBAC bindings for python <= 2.4 Several parts of the HBAC python bindings did not work with old Python versions, such as the one shipped in RHEL5. The changes include: * a compatibility wrapper around python set object * PyModule_AddIntMacro compat macro * Py_ssize_t compat definition * Do not use PyUnicode_FromFormat * several function prototypes and structures used to have "char arguments where they have "const char *" in recent versions. This caused compilation warnings this patch mitigates by using the discard_const hack on python 2.4

22d268c88f6d324b3a66846af007b06488eddae7 13-Jul-2011 Jakub Hrozek <jhrozek@redhat.com>

Fixes for python HBAC bindings These changes were proposed during a review: * Change the signature of str_concat_sequence() to const char * * use a getsetter for HbacRule.enabled to allow string true/false and integer 1/0 in addition to bool * fix a minor memory leak (HbacRequest.rule_name) * remove overzealous discard consts

667db40da4db362d7ca0a1f7f1c4ba40fb71795a 08-Jul-2011 Jakub Hrozek <jhrozek@redhat.com>

Provide python bindings for the HBAC evaluator library