Bug 38973

Summary: Error code 1 building cyrus-sasl-1.5.27_3
Product: Ports & Packages Reporter: clabadie <clabadie>
Component: Individual Port(s)Assignee: freebsd-ports (Nobody) <ports>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description clabadie 2002-06-07 08:20:01 UTC
Compilation would not complete sucessfully because of warnings in cc checkpw.c
I have been trying for days to build cyrus-sasl-1.5.27_3 port without any
luck.

Please help! I badly need it to implement SMTP AUTH.

I even tried the patch provided for PR-38646 which is a very similar problem in appearance. It did not have any impact.

all details follow.

Thank you,

Claude LaBadie
...

How-To-Repeat: 
rm /usr/ports/distfiles/*

cd /usr/ports/security/cyrus-sasl

make clean
===>  Cleaning for autoconf213-2.13.000227_1
===>  Cleaning for automake14-1.4.5
===>  Cleaning for libtool-1.3.4_3
===>  Cleaning for m4-1.4_1
===>  Cleaning for cyrus-sasl-1.5.27_3

rm *

rm files/*

rm scripts/*

ftp ftp.freebsd.org
Connected to ftp.beastie.tdk.net.
220 ftp.beastie.tdk.net FTP server (Version 6.00LS) ready.
Name (ftp.freebsd.org:root): anonymous
331 Guest login ok, send your email address as password.
Password:
230- The FreeBSD mirror at Tele Danmark Internet.
230-
230- Contact: beastie@tdk.net
230-
230- Use wisely.
230-
230- ####################################################################
230- ####################################################################
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> prompt
Interactive mode off.

ftp> cd /pub/FreeBSD/branches/-current/ports/security/cyrus-sasl
250 CWD command successful.

ftp> mget *
local: Makefile remote: Makefile
150 Opening BINARY mode data connection for 'Makefile' (5054 bytes).
100% |**************************************************|  5054       00:00
ETA
226 Transfer complete.
5054 bytes received in 0.14 seconds (36.26 KB/s)
local: distinfo remote: distinfo
150 Opening BINARY mode data connection for 'distinfo' (293 bytes).
100% |**************************************************|   293       00:00
ETA
226 Transfer complete.
293 bytes received in 0.01 seconds (48.47 KB/s)
local: files/Sendmail.README remote: files/Sendmail.README
150 Opening BINARY mode data connection for 'files/Sendmail.README' (1521
bytes)
.
100% |**************************************************|  1521       00:00
ETA
226 Transfer complete.
1521 bytes received in 0.01 seconds (177.82 KB/s)
local: files/patch-ab remote: files/patch-ab
150 Opening BINARY mode data connection for 'files/patch-ab' (2729 bytes).
100% |**************************************************|  2729       00:00
ETA
226 Transfer complete.
2729 bytes received in 0.01 seconds (265.28 KB/s)
local: files/patch-java::CyrusSasl::Makefile.am remote:
files/patch-java::CyrusS
asl::Makefile.am
150 Opening BINARY mode data connection for
'files/patch-java::CyrusSasl::Makefi
le.am' (369 bytes).
100% |**************************************************|   369       00:00
ETA
226 Transfer complete.
369 bytes received in 0.01 seconds (24.54 KB/s)
local: files/pwcheck.sh remote: files/pwcheck.sh
150 Opening BINARY mode data connection for 'files/pwcheck.sh' (1326 bytes).
100% |**************************************************|  1326       00:00
ETA
226 Transfer complete.
1326 bytes received in 0.01 seconds (110.38 KB/s)
local: files/patch-pwcheck::Makefile.am remote:
files/patch-pwcheck::Makefile.am
150 Opening BINARY mode data connection for
'files/patch-pwcheck::Makefile.am' (
559 bytes).
100% |**************************************************|   559       00:00
ETA
226 Transfer complete.
559 bytes received in 0.01 seconds (42.49 KB/s)
local: files/pwcheck_pam.c remote: files/pwcheck_pam.c
150 Opening BINARY mode data connection for 'files/pwcheck_pam.c' (2751
bytes).
100% |**************************************************|  2751       00:00
ETA
226 Transfer complete.
2751 bytes received in 0.01 seconds (208.92 KB/s)
local: files/patch-java::javax::security::auth::callback::Makefile.am
remote: fi
les/patch-java::javax::security::auth::callback::Makefile.am
150 Opening BINARY mode data connection for
'files/patch-java::javax::security::
auth::callback::Makefile.am' (476 bytes).
100% |**************************************************|   476       00:00
ETA
226 Transfer complete.
476 bytes received in 0.01 seconds (46.03 KB/s)
local: files/patch-plugins::gssapi.c remote: files/patch-plugins::gssapi.c
150 Opening BINARY mode data connection for 'files/patch-plugins::gssapi.c'
(312
 bytes).
100% |**************************************************|   312       00:00
ETA
226 Transfer complete.
312 bytes received in 0.01 seconds (28.62 KB/s)
local: files/patch-sample::Makefile.am remote:
files/patch-sample::Makefile.am
150 Opening BINARY mode data connection for
'files/patch-sample::Makefile.am' (4
48 bytes).
100% |**************************************************|   448       00:00
ETA
226 Transfer complete.
448 bytes received in 0.01 seconds (42.55 KB/s)
local: files/patch-utils::Makefile.am remote: files/patch-utils::Makefile.am
150 Opening BINARY mode data connection for 'files/patch-utils::Makefile.am'
(61
6 bytes).
100% |**************************************************|   616       00:00
ETA
226 Transfer complete.
616 bytes received in 0.01 seconds (71.65 KB/s)
local: pkg-comment remote: pkg-comment
150 Opening BINARY mode data connection for 'pkg-comment' (57 bytes).
100% |**************************************************|    57       00:00
ETA
226 Transfer complete.
57 bytes received in 0.02 seconds (2.73 KB/s)
local: pkg-deinstall remote: pkg-deinstall
150 Opening BINARY mode data connection for 'pkg-deinstall' (1274 bytes).
100% |**************************************************|  1274       00:00
ETA
226 Transfer complete.
1274 bytes received in 0.01 seconds (114.08 KB/s)
local: pkg-descr remote: pkg-descr
150 Opening BINARY mode data connection for 'pkg-descr' (1381 bytes).
100% |**************************************************|  1381       00:00
ETA
226 Transfer complete.
1381 bytes received in 0.01 seconds (185.05 KB/s)
local: pkg-install remote: pkg-install
150 Opening BINARY mode data connection for 'pkg-install' (2496 bytes).
100% |**************************************************|  2496       00:00
ETA
226 Transfer complete.
2496 bytes received in 0.00 seconds (929.63 KB/s)
local: pkg-message remote: pkg-message
150 Opening BINARY mode data connection for 'pkg-message' (288 bytes).
100% |**************************************************|   288       00:00
ETA
226 Transfer complete.
288 bytes received in 0.01 seconds (29.95 KB/s)
local: pkg-plist remote: pkg-plist
150 Opening BINARY mode data connection for 'pkg-plist' (3784 bytes).
100% |**************************************************|  3784       00:00
ETA
226 Transfer complete.
3784 bytes received in 0.13 seconds (28.03 KB/s)

make
lqqqqqqqqqqqqqqqqqqqq Additional SASL options qqqqqqqqqqqqqqqqqqqqk
            x
x
            x Please select desired options:
x
            x
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
            x x [ ] NDBM        ndbm DB
x x
            x x [X] DB3         Berkeley DB, revision 3
x x
            x x [ ] JAVA        JavaSASL [Experimental]
x x
            x x [X] MySQL       MySQL password Authentication
x x
            x x [X] OpenLDAP1   OpenLDAP 1.x password Authentication
x x
            x x [ ] OpenLDAP2   OpenLDAP 2.x password Authentication w/TLS
x x
            x x [X] PWCHECK     Use pwcheck for password Authentication
x x
            x x [ ] PAMPWCHECK  Use pwcheck_pam for password Authentication
x x
tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu
            x                     [  OK  ]       Cancel
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

===>  Extracting for cyrus-sasl-1.5.27_3
Comment 1 Scot.W.Hetzel 2002-06-19 22:03:24 UTC
The problem is that an OpenLDAP v2 function & variable are not defined
when building with OpenLDAP v1.  The attached patch fixes this problem.

I have also removed the adding of the 'daemon' user to the 'cyrus' group,
as I have no ideal as to why this user was needed.  I suspect it was needed
in the past for either the sendmail/postfix mailers when using the older
cyrus-imapd ports (<1.6).

Changed Files:
    pkg-install

New Files:
    files/patch-lib::checkpw.c

Scot W. Hetzel
Cyrus-SASL Maintainer

Index: pkg-install
===================================================================
RCS file: /home/ncvs/ports/security/cyrus-sasl/pkg-install,v
retrieving revision 1.8
diff -u -r1.8 pkg-install
--- pkg-install	24 May 2002 02:01:13 -0000	1.8
+++ pkg-install	19 Jun 2002 20:48:03 -0000
@@ -67,9 +67,12 @@
 		fi
 		echo "*** Updated user \`${USER}'."
 	fi
-	if ! ${PW} group mod ${USER} -m daemon; then
-		echo "*** can't add user \`${USER}' to group \`${GROUP}'"
-	fi
+# Don't know why we need the daemon user in the cyrus group
+# hopefully this doesn't affect anyone. It's a leftover from
+# the pre-SASL cyrus-imapd server.
+#	if ! ${PW} group mod ${GROUP} -m daemon; then
+#		echo "*** can't add user \`daemon' to group \`${GROUP}'"
+#	fi
 }
 
 create_sasldb() {
Index: files/patch-lib::checkpw.c
===================================================================
RCS file: files/patch-lib::checkpw.c
diff -N files/patch-lib::checkpw.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-lib::checkpw.c	17 Jun 2002 23:32:24 -0000
@@ -0,0 +1,17 @@
+--- lib/checkpw.c.orig	Mon Jun 17 18:28:29 2002
++++ lib/checkpw.c	Mon Jun 17 18:31:44 2002
+@@ -1667,12 +1667,14 @@
+     return SASL_FAIL;
+   }
+   /* setting dereferensing aliases mode */
++#ifdef LDAP_OPT_DEREF
+   if (ldap_set_option(ld, LDAP_OPT_DEREF, (void *) &ldap_deref) != LDAP_OPT_SUCCESS) {
+     if (reply) {
+       *reply = "cannot set deref options";
+     }
+     return SASL_FAIL;
+   }
++#endif
+   /* set ssl mode if needed */
+ #ifdef LDAP_OPT_X_TLS
+   if ( ldap_ssl_flag ) {
Comment 2 Scot.W.Hetzel 2002-06-20 04:46:50 UTC
The problem is that an OpenLDAP v2 function & variable are not defined
when building with OpenLDAP v1.  The attached patch fixes this problem.

I have also removed the 'daemon' user from the 'cyrus' group, as I 
have no ideal as to why this user needs to be in the 'cyrus' group.
I suspect that it was being used by one of the MTA's that was running
as the 'daemon' user (sendmail?).

The 'daemon' user had been added to the 'cyrus' group for 3+ years
(see http://www/freebsd.org/cgi/cvsweb.cgi/ports/mail/cyrus/pkg-install v1.1).

Changed Files:
    pkg-install

New Files:
    files/patch-lib::checkpw.c

Scot W. Hetzel
Cyrus-SASL Maintainer

Index: pkg-install
===================================================================
RCS file: /home/ncvs/ports/security/cyrus-sasl/pkg-install,v
retrieving revision 1.8
diff -u -r1.8 pkg-install
--- pkg-install	24 May 2002 02:01:13 -0000	1.8
+++ pkg-install	19 Jun 2002 20:48:03 -0000
@@ -67,9 +67,12 @@
 		fi
 		echo "*** Updated user \`${USER}'."
 	fi
-	if ! ${PW} group mod ${USER} -m daemon; then
-		echo "*** can't add user \`${USER}' to group \`${GROUP}'"
-	fi
+# Don't know why we need the daemon user in the cyrus group
+# hopefully this doesn't affect anyone. It's a leftover from
+# the pre-SASL cyrus-imapd (<1.6) server.
+#	if ! ${PW} group mod ${GROUP} -m daemon; then
+#		echo "*** can't add user \`daemon' to group \`${GROUP}'"
+#	fi
 }
 
 create_sasldb() {
Index: files/patch-lib::checkpw.c
===================================================================
RCS file: files/patch-lib::checkpw.c
diff -N files/patch-lib::checkpw.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-lib::checkpw.c	17 Jun 2002 23:32:24 -0000
@@ -0,0 +1,17 @@
+--- lib/checkpw.c.orig	Mon Jun 17 18:28:29 2002
++++ lib/checkpw.c	Mon Jun 17 18:31:44 2002
+@@ -1667,12 +1667,14 @@
+     return SASL_FAIL;
+   }
+   /* setting dereferensing aliases mode */
++#ifdef LDAP_OPT_DEREF
+   if (ldap_set_option(ld, LDAP_OPT_DEREF, (void *) &ldap_deref) != LDAP_OPT_SUCCESS) {
+     if (reply) {
+       *reply = "cannot set deref options";
+     }
+     return SASL_FAIL;
+   }
++#endif
+   /* set ssl mode if needed */
+ #ifdef LDAP_OPT_X_TLS
+   if ( ldap_ssl_flag ) {
Comment 3 Scot W. Hetzel 2002-06-24 21:17:36 UTC
The problem is that when OpenLDAP v1 is selected, a couple of functions &
varibal definitions were being used that can only be found in OpenLDAP v2.
I have submited a fix for this problem in PR 39800, which includes a fix for
the checksum mismatch for the sasl-ldap+mysql patch.

This PR can be closed.

Scot W. Hetzel
Comment 4 Patrick Li freebsd_committer freebsd_triage 2002-06-26 19:49:36 UTC
State Changed
From-To: open->closed

Fixed, Thanks!