[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Python bindings



Michael Ströder wrote:
> Stefan Gohmann wrote:
>> we wrote some python heimdal bindings. You could find a source package here:
>> http://apt.univention.de/addons/1.3/tools/source/. In the parent directory you 
>> could find debian binary packages for i386 and powerpc.
>> The api is incomplete and we wrote it for heimdal 0.6. But maybe it helps.
> 
> I'd be interested in a Python KRB5 module too, e.g. for doing kinit
> before using LDAP SASL/GSSAPI bind. I tried to build your module
> (tweaking setup.py to let include_dirs/library_dirs point to my local
> heimdal installation) but got the error attached below.
> 
> Any hint is appreciated. To make things worse the MIT KRB libs are also
> installed (due to RPM dependencies of openSUSE).

Hmm, I commented out the offending constants in errors.c and python
setup.py build/install worked after also tweaking version argument (must
be a string).

The module seems to link ok (with LD_LIBRARY_PATH set):
$ ldd /usr/local/lib/python2.5/site-packages/heimdal.so
        linux-gate.so.1 =>  (0xffffe000)
        libkrb5.so.22 => /opt/heimdal/lib/libkrb5.so.22 (0xb7edc000)
        libkadm5clnt.so.7 => /opt/heimdal/lib/libkadm5clnt.so.7 (0xb7ed2000)
        libasn1.so.7 => /opt/heimdal/lib/libasn1.so.7 (0xb7e4b000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb7e16000)
        libc.so.6 => /lib/libc.so.6 (0xb7ce7000)
        libhx509.so.1 => /opt/heimdal/lib/libhx509.so.1 (0xb7cb1000)
        libcom_err.so.2 => /lib/libcom_err.so.2 (0xb7cad000)
        libcrypto.so.0.9.8 => /usr/lib/libcrypto.so.0.9.8 (0xb7b7a000)
        libroken.so.18 => /opt/heimdal/lib/libroken.so.18 (0xb7b64000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7b30000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7b2c000)
        libresolv.so.2 => /lib/libresolv.so.2 (0xb7b19000)
        /lib/ld-linux.so.2 (0x80000000)
        libz.so.1 => /lib/libz.so.1 (0xb7b06000)

But I can't import the module. Any hint? Stefan, could you please
provide a Python sample code snippet how to use it?

Ciao, Michael.