SASL_IP(LOCAL|REMOTE)PORT broken in imapd 2.2.2beta?

Paul Boven p.boven at chello.nl
Wed Dec 17 09:34:45 EST 2003


Hi Roland, everyone,

Roland Rosenfeld wrote:

> I installed cyrus imapd 2.2.2beta on a SPARC Solaris 9 system and
> noted two auth-messages in the syslog on every pop3 and imap4 connect:
> 
> Dec 17 11:22:06 b3 pop3[14471]: [ID 702911 auth.notice] Bad IPLOCALPORT value
> Dec 17 11:22:06 b3 pop3[14471]: [ID 702911 auth.notice] Bad IPREMOTEPORT value
> 
> When digging in the code, I noticed that this message comes from SASL,
> but it is triggered in imap/pop3d.c:377:
> 
>     if(iptostring((struct sockaddr *)&popd_localaddr,
>                   salen, localip, 60) == 0) {
>         sasl_setprop(popd_saslconn, SASL_IPLOCALPORT, localip);
>         saslprops.iplocalport = xstrdup(localip);
>     }
> 
> I'd expect that localip would be the IP or <IP>;<Port> of the system
> in the {...} part of the above statement, but when I add a
> syslog(LOG_ERR,localip), I get "\377\277\352H;" in the logfile, which
> is (in decimal) 255 191 234 72 and no port given.  I get this value as
> localip and as remoteip, while both IPs are different and don't have
> to do anything with the above decimal numbers.

For some reason, the Solaris getnameinfo() system call and Cyrus 
IMAP/Sasl don't want to play nice with each other. The iptostring() uses 
getnameinfo and comes up with these strange values.

I've solved this by adding to my configure statement for Cyrus IMAP:
ac_cv_lib_socket_getnameinfo=no ac_cv_func_getnameinfo=no ./configure

This causes cyrus to not use the Solaris getnameinfo, but it's own 
version. The only drawback to that is that it no longer is properly IPv6
aware.

Regards, Paul Boven.





More information about the Info-cyrus mailing list