On 2015-07-21 14:02, Michael Simacek wrote: > Hi, > > This is a first part of my effort to port FreeIPA from Python3-incompatible > Kerberos libraries to python-gssapi. This patch should replace python-kerberos > with python-gssapi (both use C GSSAPI behind the scenes).
> def _handle_exception(self, e, service=None): > - (major, minor) = ipautil.get_gsserror(e) > - if minor == KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN: > + # kerberos library coerced error codes to signed, gssapi uses > unsigned > + minor = e.min_code - (1 << 32) > + if minor == KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN: The unsigned to sign conversion is not correct. Although it doesn't make a difference here, please use the technical correct way: minor = e.min_code if minor & (1 << 31): minor -= 1 << 32 or if you prefer hex: if minor & 0x80000000: minor -= 0x100000000 Christian
Description: OpenPGP digital signature
-- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code