Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

pykerberos: support for heimdal/linux #1

macosforgebot opened this Issue Aug 25, 2006 · 21 comments


None yet
2 participants

agx@… originally submitted this as ticket:37

  • Keywords: review

Hi, attached is a bunch of patches that adds support for linux/heimdal. They might not be as clean as possible but should show fairly well what to do. Please apply as approprioate. The patch order is:

  • printf-cleanups: generic cleanups
  • include-stdlib: include stdlib for definition of free(3)
  • kerberos-includes: fixup kerberos includes for non macosx
  • declare-nt-service: gss_krb5_nt_service_name is declared differently in heimdal
  • python-include: include "python.h"
  • fix-setup: detect "linux2" and pass correct linker flags


-- Guido

andrew@… originally submitted this as attachment:PyKerberos.patch:⁠ticket:37

Make the MacOS X specific includes more specific.

@wsanchez originally submitted this as comment:1:⁠ticket:37

  • Status changed from new to assigned
  • Priority changed from 5: Not set to 1: Blocker
  • Milestone set to Linux Port

@wsanchez originally submitted this as comment:2:⁠ticket:37

  • Keywords review added

agx@… originally submitted this as attachment:printf-cleanups:⁠ticket:37

agx@… originally submitted this as attachment:include-stdlib:⁠ticket:37

include stdlib.h for declaration of free(2)

agx@… originally submitted this as attachment:declare-nt-service:⁠ticket:37

agx@… originally submitted this as attachment:python-include:⁠ticket:37

agx@… originally submitted this as comment:3:⁠ticket:37

I've updated the patches so they apply against latest SVN. Please let me know about any issues with them.

@wsanchez originally submitted this as comment:4:⁠ticket:37

Where is C_MACOSX defined?

@wsanchez originally submitted this as comment:5:⁠ticket:37

printf-cleanups applied in r123

@wsanchez originally submitted this as comment:6:⁠ticket:37

include-stdlib applied in r124

@wsanchez originally submitted this as comment:7:⁠ticket:37

The #ifdef linux stuff is undesirable, and I think we can make it work without.

Specifically, in setup.py, we should find the framework and do the right -Ifoo magic so we don't need "Kerberos/" in the includes. Parking BSD stuff into frameworks is wonky, so we should use the "regular" includes in code and fix the OS X weirdness in setup.py. I think.

agx@… originally submitted this as attachment:kerberos-includes:⁠ticket:37

Remove Kerberos/ from the include statements

agx@… originally submitted this as comment:8:⁠ticket:37

I've updated fix-setup and kerberos-includes (as you suggested) to:

  • not use the Kerberos/ on OSX and gssapi/ prefixes on Linux
  • pass in the include patchs via setup.py
  • parse the correct link args on linux via krb5-config

declate-nt-service can be dropped since it's only needed for heimdal and I'm also building against MIT now. I'm not sure if the include patch is correct for Mac OSX, please modify if it isn't. Cheers,

-- Guido

@wsanchez originally submitted this as comment:9:⁠ticket:37

I put in a fix to setup.py in r200, which is based on your patch, but took out the sys.platform conditionals.  krb5-config should work on OS X also.

@wsanchez originally submitted this as comment:10:⁠ticket:37

  • Status changed from assigned to closed
  • Resolution set to fixed

python-include is covered in r201

@wsanchez originally submitted this as comment:11:⁠ticket:37

  • Status changed from closed to reopened
  • Resolution fixed deleted

kerberos-includes covered in r202

@wsanchez originally submitted this as comment:12:⁠ticket:37

  • Status changed from reopened to closed
  • Resolution set to fixed

I think r202 should work for you.  Let me know if anything else is needed.

agx@… originally submitted this as attachment:fix-setup:⁠ticket:37

Fix include path for linux

agx@… originally submitted this as comment:13:⁠ticket:37

  • Status changed from closed to reopened
  • Resolution fixed deleted

Looks almost fine now but "krb5-config --cflags" doesn't give anything reasonable on Linux either, that's why I hardcoded the include path previously. I've update "fix-setup" again. This one patch is all that's needed now, can it be applied?

@wsanchez originally submitted this as comment:14:⁠ticket:37

  • Status changed from reopened to closed
  • Resolution set to fixed

OK, I think the problem is actually that the #include is wrong, and OS X's krb5-config isn't broken either...

Try out r217 and let me know if that works.  (Thanks, Guido)

@macosforgebot macosforgebot added this to the Linux Port milestone Aug 4, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment