ptloader setup
Mike O'Rourke
morourke at opsouth.org
Wed Dec 29 18:14:02 EST 2004
Igor Brezac wrote on 12/22/04 05:59pm
>
>On Wed, 22 Dec 2004, Mike O'Rourke wrote:
>
>>> Index: ldap.c
>>> ===================================================================
>>> RCS file: /cvs/src/cyrus/ptclient/ldap.c,v
>>> retrieving revision 1.7
>>> diff -u -r1.7 ldap.c
>>> --- ldap.c 24 Jun 2004 19:28:39 -0000 1.7
>>> +++ ldap.c 21 Dec 2004 15:38:49 -0000
>>
>> Thanks, Igor.
>>
>> Neither of these patches would apply (using "patch -p0 <
>> ptclient_patch" on SuSE 9.1). They were both roundly rejected, so I
>> applied them manually.
>>
>> The first would go as far as a successful (according to the ldap
>> server) ldap bind (using the ldap_bind_dn) and there was no other
>> activity on the ldap server. Here is the imapd.log for an attempted
>> login:
>>
>> Dec 21 10:51:35 server12 master[20440]: about to exec
>> /usr/cyrus/bin/imapd
>> Dec 21 10:51:35 server12 imap[20440]: executed
>> Dec 21 10:51:35 server12 imap[20440]: accepted connection
>> Dec 21 10:51:35 server12 imap[20440]: ptload(): pinging ptloader
>> Dec 21 10:51:35 server12 ptloader[20218]: accepted connection
>> Dec 21 10:51:35 server12 imap[20440]: ptload(): bad response from
>> ptloader server: identifier not found
>> Dec 21 10:51:35 server12 imap[20440]: badlogin: server11.mydom.com
>> [192.168.7.11] plaintext test1 at testdom.mydom.com invalid user
>> Dec 21 10:52:36 server12 master[20215]: process 20440 exited, status 0
>>
>> The second patch would not even compile, complaining about some
>> undeclared variables in the patched area (perhaps I did not apply the
>> patch properly, although I did it three times and checked it each
>> time):
>>
>> ldap.c: In function `ptsmodule_get_dn':
>> ldap.c:835: error: `filter' undeclared (first use in this function)
>> ldap.c:835: error: (Each undeclared identifier is reported only once
>> ldap.c:835: error: for each function it appears in.)
>> ldap.c:839: error: `base' undeclared (first use in this function)
>> ldap.c:843: error: `attrs' undeclared (first use in this function)
>> ldap.c:843: error: `res' undeclared (first use in this function)
>> ldap.c:855: error: `entry' undeclared (first use in this function)
>>
>> Should the patch apply against ldap.c in the 2.2.10 distribution, or do
>> I need to grab the CVS? Should I simply invest the time to learn, setup
>> and use ldap_sasl?
>
>My bad. The first patch is not good and the second patch is incomplete.
>This patch is trivial; I am using a newer version of ldap.c than the one
>in cvs and I thought that I could just fix the original code without
>testing. Wrong... To make things worse, I pasted the patch in my email
>client which probably corrupted the patch.
>
>Ok, the attached patch should apply and compile without errors. Please
>report what you find.
>
Hi Igor,
Sorry this reply is so long in coming, but I was not receiving any posts since the CMU mail server refuses to talk to mine (since Dec. 7, in fact). I had to subscribe with another address to start getting the posts again. They still (try to) come to the old server as well.
I applied the most recent patch you sent, and it compiled and runs. It will not, however authenticate. When I try to login, the LDAP server returns one entry and the login fails. If I look at the cache with ptdump, I see the correct username and password dutifully and correctly cached. The logfile for a login attempt looks like:
Dec 29 16:38:42 server12 master[6466]: about to exec /usr/cyrus/bin/imapd
Dec 29 16:38:42 server12 imap[6466]: executed
Dec 29 16:38:42 server12 imap[6466]: accepted connection
Dec 29 16:38:43 server12 imap[6466]: mystore: starting txn 2147483656
Dec 29 16:38:43 server12 imap[6466]: mystore: committing txn 2147483656
Dec 29 16:38:43 server12 imap[6466]: starttls: TLSv1 with cipher AES256-SHA (256/256 bits new) no authentication
Dec 29 16:38:49 server12 imap[6466]: ptload(): pinging ptloader
Dec 29 16:38:49 server12 ptloader[5568]: accepted connection
Dec 29 16:38:49 server12 ptloader[5568]: mystore: starting txn 2147483658
Dec 29 16:38:49 server12 ptloader[5568]: mystore: committing txn 2147483658
Dec 29 16:38:49 server12 imap[6466]: badlogin: localhost [127.0.0.1] LOGIN [SASL(-13): user not found: checkpass failed]
Dec 29 16:40:15 server12 master[5565]: process 6466 exited, status 0
and
Dec 29 16:59:35 server12 imap[6852]: accepted connection
Dec 29 16:59:35 server12 imap[6852]: mydelete: starting txn 2147483653
Dec 29 16:59:35 server12 imap[6852]: mydelete: committing txn 2147483653
Dec 29 16:59:35 server12 imap[6852]: mystore: starting txn 2147483654
Dec 29 16:59:35 server12 imap[6852]: mystore: committing txn 2147483654
Dec 29 16:59:35 server12 imap[6852]: starttls: TLSv1 with cipher AES256-SHA (256/256 bits new) no authentication
Dec 29 16:59:39 server12 imap[6852]: ptload(): pinging ptloader
Dec 29 16:59:39 server12 ptloader[6849]: accepted connection
Dec 29 16:59:39 server12 imap[6852]: ptload(): bad response from ptloader server: identifier not found
Dec 29 16:59:39 server12 imap[6852]: badlogin: localhost [127.0.0.1] LOGIN [SASL(-13): authentication failure: bad userid authenticated]
I have tried both with and without the autocreate, autosieve and deletequota patches from Athens.
>From the LDAP server, I can see the entry being returned.
What next?
Mike.
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
More information about the Info-cyrus
mailing list