Bug 51041 - Multiple problems with port security/cyrus-sasl2 2.1.13
Summary: Multiple problems with port security/cyrus-sasl2 2.1.13
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Hajimu UMEMOTO
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-16 16:20 UTC by Oliver Eikemeier
Modified: 2003-04-17 19:05 UTC (History)
1 user (show)

See Also:


Attachments
cyrus-sasl-2.1.3_1.patch (5.56 KB, patch)
2003-04-16 16:20 UTC, Oliver Eikemeier
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Eikemeier 2003-04-16 16:20:21 UTC
- The included script fails to shut down saslauthd properly
- Kerberos plugin is not compiled
- The configuration script links with the installed Berkeley DB with highest version,
  even when other headers are included
- Berkeley DB 4.1 support is broken

Fix: The following patch fixes:
- path to pid
- choose the right Berkeley DB version (hack)

It disables Kerberos and Berkeley DB 4.1 until these issues have been investigated further.

cd /usr/ports/security
patch < ~/cyrus-sasl-2.1.3_1.patch
find cyrus-sasl2 -name '*.orig' -delete
How-To-Repeat: 
- The script assumes the daemons pid is in /var/state/saslauthd/mux.pid
  instead of /var/state/saslauthd/saslauthd.pid

- The configuration script fails to detect libkrb, do 'make' and the look in ${WRKSRC}/config.log:

configure:4934: checking for krb_mk_priv in -lkrb
configure:4953: cc -o conftest -Wall -W -Wall -O -pipe -L/usr/local/lib -R/usr/local/lib  conftest.c -lcrypto -lcrypt -lkrb -lcom_err  1>&5
/usr/lib/libkrb.so: undefined reference to `des_pcbc_encrypt'
/usr/lib/libkrb.so: undefined reference to `des_set_odd_parity'
/usr/lib/libkrb.so: undefined reference to `des_key_sched'
/usr/lib/libkrb.so: undefined reference to `des_read_pw_string'
/usr/lib/libkrb.so: undefined reference to `des_set_key'
/usr/lib/libkrb.so: undefined reference to `des_cbc_cksum'
/usr/lib/libkrb.so: undefined reference to `des_quad_cksum'
/usr/lib/libkrb.so: undefined reference to `des_string_to_key'
configure: failed program was:
#line 4942 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char krb_mk_priv();

int main() {
krb_mk_priv()
; return 0; }

- Install Berkeley DB 4.0 and then choose Berkeley DB 3.0 in the installation.
  The libraries are compiled with -I/usr/local/include/db3 and -ldb4.
  That happened even before the patch in ports/50962.

- sasldb works with Berkeley DB 3.3 and 4.0, but with 4.1 I get:

error fetching from sasldb: Invalid argument
error closing sasldb: Invalid argument

  in /var/log/messages. Probably something in sasldb/db_berkeley.c.
Comment 1 Norikatsu Shigemura freebsd_committer freebsd_triage 2003-04-16 17:08:35 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ume

Over to maintainer!
Comment 2 Hajimu UMEMOTO freebsd_committer freebsd_triage 2003-04-17 19:02:59 UTC
State Changed
From-To: open->closed

Thanks!  I've committed it excluding disabling Kerberos and DB 4.1. 
Kerberos handling was expected to be fixed with other commit. 
Though it seems that there is compatibility issue around the database 
format and/or the ABI between DB versions, cyrus-imapd22 is working 
fine with DB 4.1, here.  I suspect that your SASL2 and your 
applications which use SASL2 don't link same version of DB, or you 
didn't rebuild sasldb2.