On Jun 14, 2004, at 9:24 PM, I wrote:
On Jun 11, 2004, at 7:01 PM, Sam Varshavchik wrote:
From: Sam Varshavchik <[EMAIL PROTECTED]>
Date: June 11, 2004 7:01:23 PM PDT
To: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: [courier-users] Courier 0.45.6/Courier-IMAP 3.0.5


Download: http://www.courier-mta.org/download.php

Changes:

• IMAP server: Fix #shared in NAMESPACE reply, and announce XMAGICTRASH
capability.

I can't compile 0.45.6 on my Solaris 9 box due to this change to authlib/authldaplib.c:

***************
*** 1279,1282 ****
! #if HAVE_LDAP_TLS
! if(my_ldap.tls && enable_tls_on(bindp)) {
! #if HAVE_SYSLOG_H
! syslog(LOG_DAEMON|LOG_CRIT, "authlib: LDAP_TLS enabled but I'm unable to start tls, check your config\n");
--- 1346,1356 ----
! #ifdef LDAP_OPT_PROTOCOL_VERSION
! /* Set protocol version */
! if (my_ldap.protocol_version &&
! ldap_set_option(bindp, LDAP_OPT_PROTOCOL_VERSION,
! (void *) & my_ldap.protocol_version) != LDAP_OPT_SUCCESS)
! {
! err("ldap_set_option(PROTOCOL_VERSION %d) failed",
! my_ldap.protocol_version);
! rc = 1;
! }
! else


Making all in authlib
make all-am
Compiling authldaplib.c
authldaplib.c: In function `auth_ldap_do3':
authldaplib.c:1350: error: `LDAP_OPT_SUCCESS' undeclared (first use in this function)
authldaplib.c:1350: error: (Each undeclared identifier is reported only once
authldaplib.c:1350: error: for each function it appears in.)
*** Error code 1
make: Fatal error: Command failed for target `authldaplib.o'
Current working directory /pkg/src/mail/courier/courier-0.45.6/authlib


Shouldn't that be "LDAP_SUCCESS" instead of "LDAP_OPT_SUCCESS"? I can't
find "LDAP_OPT_SUCCESS" #define'd anywhere ... it's definitely not in
the Solaris 9-supplied <ldap.h>.

[Following up my own post]

It appears that Linux and Mac OS X supply a pretty stock OpenLDAP
version of <ldap.h> (Red Hat Enterprise 3 contains version 1.65.2.43,
Mac OS X 10.3.4 contains version 1.168.2.16), which contains
LDAP_OPT_SUCCESS ... but Sun's Solaris 7/8/9 <ldap.h> appears to be
based on some sort of Netscape/Mozilla client code, and only bears
a passing resemblance (though many of the constants and structures
have the exact same names as the OpenLDAP version) to the
OpenLDAP-derived version of <ldap.h>.

I've kludged around it in authlib/authldaplib.c but obviously this
isn't a good/correct fix ...

*** courier-0.45.6/authlib/authldaplib.c.dist Sat May 8 20:04:25 2004
--- courier-0.45.6/authlib/authldaplib.c Tue Jun 15 11:55:49 2004
***************
*** 1346 ****
--- 1347,1356 ----
+ #ifndef LDAP_OPT_SUCCESS /*Sun doesn't ship a proper OpenLDAP <ldap.h>*/
+ /*
+ * ldap_get_option() and ldap_set_option() return values.
+ * As later versions may return other values indicating
+ * failure, current applications should only compare returned
+ * value against LDAP_OPT_SUCCESS.
+ */
+ #define LDAP_OPT_SUCCESS 0
+ #define LDAP_OPT_ERROR (-1)
+ #endif


-------

Suggestion Box:

Also, on an unrelated note, it would be nice if the top-level
"configure" had a switch to specify where your top-level OpenSSL
directory is (e.g. where you can find include/openssl/ssl.h under),
e.g. "--with-ssl=[DIR]".  My "make" fell over in "tcpd" because of
this ...

(I realize this can probably be done via CPPFLAGS/LDFLAGS as well,
 but it seems to be a common "configure" option in lots of
 programs that use OpenSSL these days ... )

        - Greg



-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to