[Dovecot] Debugging password schemes

2008-09-23 Thread Ian R. Justman


Hi, all.

I managed to get my new password scheme routine written, but a couple of 
things:


1.  The example module lacks an init routine.  Since I used it as a 
model, my module also lacks one.  As such, my newly-built module is seen 
but not registered.  In the meantime, I moved the routines into 
password-scheme.c instead where I had access to all the MD5 routines 
already set up for me.


2.  Once in password-scheme.c and modified to the point where it builds 
without warnings or errors and it doesn't gag on itself, it doesn't seem 
to work properly.


What's the best way to debug password-scheme.c so I can see what's going 
on so I can fix things accordingly?  I have to manually break apart 
the value stored in a database a bit differently than other salted 
values (it's using salted MD5 values a bit differently than normal). 
The password format from a Post.Office server, but apparently, Netscape 
Messaging Server uses this same format.


Thanks!

--Ian.

--
Ian R. Justman
UNIX hacker.  Anime fan.  Any questions?
ianj (at) ian-justman.com


Re: [Dovecot] Debugging password schemes

2008-09-23 Thread Ian R. Justman

I wrote:


Hi, all.

I managed to get my new password scheme routine written, but a couple of 
things:


1.  The example module lacks an init routine.  Since I used it as a 
model, my module also lacks one.  As such, my newly-built module is seen 
but not registered.  In the meantime, I moved the routines into 
password-scheme.c instead where I had access to all the MD5 routines 
already set up for me.


This issue is minor for now, but see below for more details.

2.  Once in password-scheme.c and modified to the point where it builds 
without warnings or errors and it doesn't gag on itself, it doesn't seem 
to work properly.


Fixed.  Stupid mistake I completely failed to see, even after a lot of 
cleanup.  Was passing the wrong value to a function (and it was an 
explicit constant value of 32 when it should have been 16!).


And on that note, would there be interest in code to allow use of 
Post.Office/Netscape Messaging Server SMD5 values?


Thanks!

--Ian.

--
Ian R. Justman
UNIX hacker.  Anime fan.  Any questions?
ianj (at) ian-justman.com