Re: SASL GSSAPI under Win32

2009-08-24 Thread Torsten Kurbad
Hi Michael,

  http://svn.kmrc.de/download/distribution/contrib/doc/Minimal-Cyrus-SASL-Win32-HowTo.txt
 
 Many thanks for this! I don't know how persistent this link will be.
 So do you mind if I add this as-is to python-ldap's source
 distribution? In the long run we can add this in file
 Doc/installing.rst.

yes, please do so.

As for the .dll inclusion in .eggs: You are right, .eggs are indeed
simply .zip files. But they are enriched by an internal directory and
file structure that has to be recorded during build.
There is an option (IMHO extra_data) to include .dlls and other
extras in a subdirectory called DATA. I didn't use that option so
far, since I'd still prefer a completely static solution.

Anyway, I'll try to build a combined solution (static libsasl2,
plugin .dlls) now. If I succeed building a static libsasl2 that loads
its plugins from the standard location, and also to include the plugin
.dlls into the .egg somehow, we could take it from there. What do you
think?

Best regards,
Torsten
-- 
Fon: +49-7071-700240 | Fax: +49-7071-700241 | http://www.tk-webart.de

Keep your boss's boss off your boss's back.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


Re: SASL GSSAPI under Win32

2009-08-23 Thread Michael Ströder
Torsten Kurbad wrote:
 
 I'd appreciate to have this in the official docs in a separate
 section under

 http://www.python-ldap.org/doc/html/installing.html#building-and-installing
 
 that would be great indeed.
 
 I had very little time this morning (the internet link of our institute
 was broken and I had to track down the failure). But I managed to put
 some basic documentation online under
 
 http://svn.kmrc.de/download/distribution/contrib/doc/Minimal-Cyrus-SASL-Win32-HowTo.txt

Many thanks for this! I don't know how persistent this link will be. So do you
mind if I add this as-is to python-ldap's source distribution? In the long run
we can add this in file Doc/installing.rst.

Ciao, Michael.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


Re: SASL GSSAPI under Win32

2009-08-23 Thread Michael Ströder
Waldemar Osuch wrote:
 My build is not static anymore.  Now I put all the required *.dll(s)
 into site-packages\ldap directory.
 I also put the _ldap.pyd in there too so the extension can find them.
 This approach work for all the dlls except the SASL plugins.
 
 If I put the SASL plugin dlls into into C:\CMU\bin\sasl2 then they
 will be found.

It's the same on Linux. If you install into a non-standard localtion make
install outputs the following text:


* WARNING:
* Plugins are being installed into /opt/cyrus-sasl/lib/sasl2,
* but the library will look for them in /usr/lib/sasl2.
* You need to make sure that the plugins will eventually
* be in /usr/lib/sasl2 -- the easiest way is to make a
* symbolic link from /usr/lib/sasl2 to /opt/cyrus-sasl/lib/sasl2,
* but this may not be appropriate for your site, so this
* installation procedure won't do it for you.
*
* If you don't want to do this for some reason, you can
* set the location where the library will look for plugins
* by setting the environment variable SASL_PATH to the path
* the library should use.


Well, symbolic links are not an option. But how about setting the SASL_PATH
env var? We could even try to add a os.env['SASL_PATH']=... to Lib/ldap/sasl.py.

Could you please provide a ZIP file or something which contains the
python-ldap build and the SASL plugin DLLs and I will play around a little bit.


 In my environment only DIGEST-MD5 and NTLM got loaded but NTLM did not work.
 I have got 'Authentication method not supported' error.
 
 Now the question is, should I continue to pretend that SASL mechanisms
 are supported?

If there's no way to load at least one SASL plugin it ldap.SASL_AVAIL should be 
0.

 Are the 2 or rather 1.5 available mechanisms worth the effort?

DIGEST-MD5 would be worth the effort.

 Unless Torsten is successful, the 2.3.9 build will not have it.

Waldemar, I can fully understand your frustration. And I really appreciate
your and Torsten's efforts. Please let's try another round.

If setting SASL_HOME is not successful it would be a good idea to raise this
issue on the OpenLDAP and Cyrus-SASL mailing lists and request a new feature.
Cyrus SASL 2.1.24 RC1 was released to public a couple of days ago. Maybe it
would be possible to have another SASL option passed through libldap to
cyrus-sasl lib which sets the path where to locate the SASL plugins.

Ciao, Michael.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


Re: SASL GSSAPI under Win32

2009-08-20 Thread Torsten Kurbad
Hi Waldemar,

 My build is not static anymore.  Now I put all the required *.dll(s)
 into site-packages\ldap directory.
 I also put the _ldap.pyd in there too so the extension can find them.
 This approach work for all the dlls except the SASL plugins.

unfortunately, .dlls are relatively useless in conjunction with .eggs,
since there seems to be no proper way to bundle the two. That was the
reason for my static approach.

But here's my idea: I'll put up a documentation today on what I did to
get cyrus-sasl compiling successfully using MinGW.
Some minor modifications to that method should get us .dlls again
instead of static libs. When configuring the build, you can provide a
prospective location of the plugin .dlls, e.g. C:\sasl2. Perhaps that
would help to find all of the mechanisms.

If you have the time and nerves, we could do some 'conferencing' in
Google talk on the way...

Best regards,
Torsten
-- 
Never make anything simple and efficient when a way can be found to
make it complex and wonderful.  - Murphy's Law No. 13 -


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


Re: SASL GSSAPI under Win32

2009-08-20 Thread Torsten Kurbad
Hi Michael,

 I'd appreciate to have this in the official docs in a separate
 section under
 
 http://www.python-ldap.org/doc/html/installing.html#building-and-installing

that would be great indeed.

I had very little time this morning (the internet link of our institute
was broken and I had to track down the failure). But I managed to put
some basic documentation online under

http://svn.kmrc.de/download/distribution/contrib/doc/Minimal-Cyrus-SASL-Win32-HowTo.txt

Feedback is more than welcome! :-)

Best regards,
Torsten
-- 
McDonald's -- Because you're worth it.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


Re: SASL GSSAPI under Win32

2009-08-19 Thread Torsten Kurbad
Hi list,

 I think, I'm almost there. I have a static libsasl and several static
 plugin libs, but when I try to link one of the plugins with
 _ldap.pyd, I get:
 
 e:\projects\prereq\built\cyrus-sasl\lib\sasl2\libcrammd5.a(plugin_common.o):
   In function `plug_ipfromstring':
   e:/projects/prereq/src/cyrus-sasl-2.1.23/plugins/plugin_common.c:150:
   undefined reference to `sasl_getaddrinfo'
   e:/projects/prereq/src/cyrus-sasl-2.1.23/plugins/plugin_common.c:157:
   undefined reference to `sasl_freeaddrinfo'
 collect2: ld returned 1 exit status
 error: command 'gcc' failed with exit status 1
 
 Should be a matter of proper includes. I'll track that down
 tomorrow...

in fact, it was a bit more than just proper includes, that's why it took
me so long. ;-)

But anyway, here's a new .egg for testing:

http://svn.kmrc.de/download/distribution/contrib/python_ldap-2.3.9-py2.6-win32.egg

Good luck and best regards,
Torsten

PS: Waldemar, in case it still doesn't work: Do you have IRC, ICQ, Skype
or the like?
-- 
Happiness is a positive cash flow.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


Re: SASL GSSAPI under Win32

2009-08-19 Thread Michael Ströder
Torsten Kurbad wrote:
 I think, I'm almost there. I have a static libsasl and several static
 plugin libs, but when I try to link one of the plugins with
 _ldap.pyd, I get:

 e:\projects\prereq\built\cyrus-sasl\lib\sasl2\libcrammd5.a(plugin_common.o):
  In function `plug_ipfromstring':
  e:/projects/prereq/src/cyrus-sasl-2.1.23/plugins/plugin_common.c:150:
  undefined reference to `sasl_getaddrinfo'
  e:/projects/prereq/src/cyrus-sasl-2.1.23/plugins/plugin_common.c:157:
  undefined reference to `sasl_freeaddrinfo'
 collect2: ld returned 1 exit status
 error: command 'gcc' failed with exit status 1

 Should be a matter of proper includes. I'll track that down
 tomorrow...
 
 in fact, it was a bit more than just proper includes, that's why it took
 me so long. ;-)
 
 But anyway, here's a new .egg for testing:
 
 http://svn.kmrc.de/download/distribution/contrib/python_ldap-2.3.9-py2.6-win32.egg

Sorry, still does not work. This is the console output:

U:\Proj\python-ldap\python-ldap\Democ:\Python26\python.exe sasl_bind.py
 CRAM-MD5 
Error using SASL mechanism CRAM-MD5 {'desc': 'Success'}
 PLAIN 
Error using SASL mechanism PLAIN {'desc': 'Success'}
 LOGIN 
Error using SASL mechanism LOGIN {'desc': 'Success'}
 EXTERNAL 
Error using SASL mechanism EXTERNAL {'desc': 'Success'}
 GSSAPI 
Error using SASL mechanism GSSAPI {'desc': 'Success'}
 NTLM 
Error using SASL mechanism NTLM {'desc': 'Success'}
 DIGEST-MD5 
Error using SASL mechanism DIGEST-MD5 {'desc': 'Success'}

BTW: You could test yourself e.g. against MS AD but take the FQDN in the LDAP
URI then.

Are there any options in cyrus-sasl to turn on debug logs? (Aargh! Tried to
use mod_auth_kerb today and the debugging also pretty much sucks with MIT
Kerberos.)

Ciao, Michael.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


Re: SASL GSSAPI under Win32

2009-08-19 Thread Waldemar Osuch
On Wed, Aug 19, 2009 at 11:25 AM, Torsten
Kurbadpython-l...@tk-webart.de wrote:
 Hi list,



 But anyway, here's a new .egg for testing:

 http://svn.kmrc.de/download/distribution/contrib/python_ldap-2.3.9-py2.6-win32.egg


Unfortunately it did not work for me either but your dedication to the
cause prompted
me to test my version of the build some more :)

My build is not static anymore.  Now I put all the required *.dll(s)
into site-packages\ldap directory.
I also put the _ldap.pyd in there too so the extension can find them.
This approach work for all the dlls except the SASL plugins.

If I put the SASL plugin dlls into into C:\CMU\bin\sasl2 then they
will be found.
In my environment only DIGEST-MD5 and NTLM got loaded but NTLM did not work.
I have got 'Authentication method not supported' error.

Now the question is, should I continue to pretend that SASL mechanisms
are supported?
Are the 2 or rather 1.5 available mechanisms worth the effort?

I hope Torsten will be successful but I feel ready to give up on SASL
support in my builds.
They never really worked out of the box anyway.

If you are depending on existing SASL support in my builds it is time
to speak up.
Unless Torsten is successful, the 2.3.9 build will not have it.

Waldemar

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


Re: SASL GSSAPI under Win32

2009-08-17 Thread Torsten Kurbad
Hi Michael,

thanks for testing the new .egg so quickly.

 Unfortunately it does not seem to work:

That's really unfortunate. I'll try now to dig into the configure
scripts of Cyrus-SASL to get rid of most of the dependencies (as the
Mozilla guys did with the NTMakefile). Then it should be possible to
do a real static build of library and plugins using MinGW.

Regards,
Torsten
-- 
  His honour rooted in dishonour stood,
  And faith unfaithful kept him falsely true.
  -Alfred Lord Tennyson

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


Re: SASL GSSAPI under Win32

2009-08-17 Thread Torsten Kurbad
 I'll try now to dig into the configure
 scripts of Cyrus-SASL to get rid of most of the dependencies (as the
 Mozilla guys did with the NTMakefile). Then it should be possible to
 do a real static build of library and plugins using MinGW.

I think, I'm almost there. I have a static libsasl and several static
plugin libs, but when I try to link one of the plugins with
_ldap.pyd, I get:

e:\projects\prereq\built\cyrus-sasl\lib\sasl2\libcrammd5.a(plugin_common.o):
In function `plug_ipfromstring':
e:/projects/prereq/src/cyrus-sasl-2.1.23/plugins/plugin_common.c:150:
undefined reference to `sasl_getaddrinfo'
e:/projects/prereq/src/cyrus-sasl-2.1.23/plugins/plugin_common.c:157:
undefined reference to `sasl_freeaddrinfo'
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

Should be a matter of proper includes. I'll track that down tomorrow...

Regards,
Torsten
-- 
  It's more than magnificent-it's mediocre. -Samuel Goldwyn

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev