Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Oct 1999 20:56:38 -0500 (CDT)
From:      hetzels@westbend.net
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/14619: New port of libsasl
Message-ID:  <199910310156.UAA22662@spare.westbend.net>

next in thread | raw e-mail | index | archive | help

>Number:         14619
>Category:       ports
>Synopsis:       New port: security/libsasl
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 30 19:00:00 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Scot W. Hetzel
>Release:        FreeBSD 3.2-RELEASE i386
>Organization:
West Bend Internet
>Environment:


>Description:

This is the Cyrus-SASL library from Carnegie Mellon University.

SASL is the Simple Authentication and Security Layer, a method
for adding authentication support to connection-based protocols.
To use SASL, a protocol includes a command for identifying and
authenticating a user to a server and for optionally negotiating
protection of subsequent protocol interactions. If its use is
negotiated, a security layer is inserted between the protocol
and the connection.

The SASL port has an optional dependancy on the recently submitted
security/librc4 port (see PR ports/14618) (US & CANADA only).

As long as USA_RESIDENT=NO, this port will not use librc4, and will
not be subject to export restrictions.

Sendmail 8.10 and Cyrus-IMAPd 1.6.x depend on this library for
their SASL implementation.

Quirks:

As long as librc4 is installed into the /usr/local tree, the 
Cyrus SASL configure script will be able to properly detect
the RC4 library.  Cyrus SASL can be installed into any ${PREFIX}.


Cyrus SASL does come with a pwcheck program, but I was unable
to get it to compile.  The port currentlyn doesn't compile it.

According to the release notice for Cyrus SASL v1.5.10:

    preliminary support for pwcheck has been added, 
    it hasn't been tested and is probably not working.

>How-To-Repeat:


>Fix:

This port contains the following files:

./libsasl/Makefile
./libsasl/files/md5
./libsasl/files/pwcheck.sh
./libsasl/pkg/COMMENT
./libsasl/pkg/DESCR
./libsasl/pkg/PLIST
./libsasl/patches/patch-aa
./libsasl/patches/patch-ab
./libsasl/patches/patch-ac
./libsasl/patches/patch-ad
./libsasl/patches/patch-ae

Import the attached diff to the ports collection.

diff -ruN libsasl.orig/Makefile libsasl/Makefile
--- libsasl.orig/Makefile	Wed Dec 31 18:00:00 1969
+++ libsasl/Makefile	Sat Oct 30 19:07:58 1999
@@ -0,0 +1,97 @@
+# New ports collection makefile for:		cyrus-sasl
+# Version required:				1.5.11
+# Date created:					Nov 1 1999
+# Whom:						hetzels@westbend.net
+#
+# $FreeBSD$
+#
+SASL_VER=	1.5.11
+
+DISTNAME=	cyrus-sasl-${SASL_VER}
+PKGNAME=	libsasl-${SASL_VER}
+CATEGORIES=	mail 
+MASTER_SITES=	ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/ \
+		http://www.freebsd.org/~stb/mirror/ftp.andrew.cmu.edu/pub/cyrus-mail/ \
+		ftp://ftp.hanse.de/sites/transit/mirror/ftp.andrew.cmu.edu/pub/cyrus-mail/
+
+MAINTAINER=	hetzels@westbend.net
+
+Y2K=		http://asg.web.cmu.edu/cyrus/imapd/y2k.html
+
+MAN1=		sasl_client.1 sasl_server.1
+MAN8=		saslpasswd.8
+
+USE_LIBTOOL=	YES
+CONFIGURE_ARGS= \
+		--prefix=${PREFIX} \
+		--sysconfdir=${PREFIX}/etc \
+		--with-plugindir=${PREFIX}/lib/sasl \
+		--with-dbpath=${PREFIX}/etc/sasldb \
+		--with-sample \
+		--with-rc4
+
+#		--disable-cram
+
+# Currently, pwcheck doesn't compile
+#CONFIGURE_ARGS+= \
+#		--with-pwcheck=/var/pwcheck
+
+#  --with-dbpath=PATH      set the DB path to use [/etc/sasldb]
+#  --with-pam=DIR          use PAM (rooted in DIR) [yes]
+#  --with-pwcheck=DIR      enable use of the pwcheck daemonusing statedir DIR
+#  --enable-cram           enable CRAM-MD5 authentication [yes]
+#  --enable-scram          enable SCRAM-MD5 authentication [no]
+#  --enable-digest         enable DIGEST-MD5 authentication [yes]
+#  --enable-krb4           enable KERBEROS_V4 authentication [yes]
+#  --enable-gssapi         enable GSSAPI authentication [yes]
+#  --enable-anon           enable ANONYMOUS authentication [yes]
+#  --enable-plain          enable PLAIN authentication [yes]
+#  --with-rc4=DIR          use rc4 (look in DIR) [yes]
+
+# Sample SASL Client/Server
+SAMPLES=	sample-client sample-server
+INSTALL_PROG=	${INSTALL} -c -o root -g wheel -m 555
+
+DOCS=	README README.Y2K TODO INSTALL ChangeLog NEWS
+
+DOC2=	draft-newman-auth-scram-03.txt \
+	draft-newman-sasl-anon-00.txt \
+	draft-leach-digest-sasl-03.txt \
+	rfc1321.txt rfc2095.txt rfc2104.txt rfc2222.txt
+
+HTDOCS=	index programming sysadmin
+
+# Build the SASL library with RC4 support
+.if defined(USA_RESIDENT)
+.if ${USA_RESIDENT} == YES
+LIB_DEPENDS=    rc4.0:${PORTSDIR}/security/librc4
+CONFIGURE_ARGS+=	--with-rc4
+#CONFIGURE_ARGS+=	--with-rc4=${PREFIX}
+.endif
+.endif
+
+post-install:
+.for file in ${SAMPLES}
+	${INSTALL_PROG} ${WRKSRC}/sample/${file} ${PREFIX}/sbin
+.endfor
+	@${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/lib
+#       ${INSTALL} -d -m 700 -o cyrus -g cyrus /var/pwcheck
+.if !defined(NOPORTDOCS)
+	${MKDIR} ${PREFIX}/share/doc/SASL/html
+.for file in ${DOCS}
+	@${ECHO} share/doc/SASL/${file} >>${TMPPLIST}
+	@${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/share/doc/SASL
+.endfor
+.for file in ${DOC2}
+	@${ECHO} share/doc/SASL/${file} >>${TMPPLIST}
+	@${INSTALL_DATA} ${WRKSRC}/doc/${file} ${PREFIX}/share/doc/SASL
+.endfor
+.for file in ${HTDOCS}
+	${INSTALL_DATA} ${WRKSRC}/doc/${file}.html ${PREFIX}/share/doc/SASL/html
+	@${ECHO} share/doc/SASL/html/${file}.html >>${TMPPLIST}
+.endfor
+	@${ECHO} "@dirrm share/doc/SASL/html" >>${TMPPLIST}
+	@${ECHO} "@dirrm share/doc/SASL" >>${TMPPLIST}
+.endif
+
+.include <bsd.port.mk>
diff -ruN libsasl.orig/files/md5 libsasl/files/md5
--- libsasl.orig/files/md5	Wed Dec 31 18:00:00 1969
+++ libsasl/files/md5	Fri Oct 29 20:01:36 1999
@@ -0,0 +1 @@
+MD5 (cyrus-sasl-1.5.11.tar.gz) = 86d9d6b70d2f2e893ab1ef67ed7314c2
diff -ruN libsasl.orig/files/pwcheck.sh libsasl/files/pwcheck.sh
--- libsasl.orig/files/pwcheck.sh	Wed Dec 31 18:00:00 1969
+++ libsasl/files/pwcheck.sh	Fri Oct 29 20:48:42 1999
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+
+PREFIX=/usr/local
+
+case "$1" in
+
+start)
+	if [ -x ${PREFIX}/sbin/pwcheck ]
+	then
+		${PREFIX}/sbin/pwcheck & && echo -n " pwcheck"
+	fi
+	;;
+
+stop)
+	if [ -r /var/run/pwcheck.pid ]
+	then
+		kill `cat /var/run/pwcheck.pid` && echo -n " pwcheck"
+	fi
+	;;
+
+*)
+	echo "usage: $0 {start|stop}" 1>&2
+	exit 64
+	;;
+
+esac
+
diff -ruN libsasl.orig/patches/patch-aa libsasl/patches/patch-aa
--- libsasl.orig/patches/patch-aa	Wed Dec 31 18:00:00 1969
+++ libsasl/patches/patch-aa	Fri Oct 29 22:29:54 1999
@@ -0,0 +1,36 @@
+--- configure.orig	Sat Oct 16 19:25:04 1999
++++ configure	Fri Oct 29 20:19:40 1999
+@@ -682,6 +682,7 @@
+ 
+ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+ 
++test -z "$INSTALL_LIB" && INSTALL_LIB='${INSTALL} -m 755'
+ 
+ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+ 
+@@ -1254,7 +1255,7 @@
+ 
+ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+ 
+-
++test -z "$INSTALL_LIB" && INSTALL_LIB='${INSTALL} -m 755'
+ 
+    # CMU GUESS RUNPATH SWITCH
+   echo $ac_n "checking for runpath switch""... $ac_c" 1>&6
+@@ -2912,7 +2912,7 @@
+ EOF
+ 
+    cat >> confdefs.h <<EOF
+-#define PWCHECKDIR $with_pwcheck
++#define PWCHECKDIR "$with_pwcheck"
+ EOF
+ 
+    DIRS="$DIRS pwcheck"
+@@ -4399,6 +4400,7 @@
+ s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+ s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+ s%@INSTALL_DATA@%$INSTALL_DATA%g
++s%@INSTALL_LIB@%$INSTALL_LIB%g
+ s%@PACKAGE@%$PACKAGE%g
+ s%@VERSION@%$VERSION%g
+ s%@ACLOCAL@%$ACLOCAL%g
diff -ruN libsasl.orig/patches/patch-ab libsasl/patches/patch-ab
--- libsasl.orig/patches/patch-ab	Wed Dec 31 18:00:00 1969
+++ libsasl/patches/patch-ab	Fri Oct 29 20:21:39 1999
@@ -0,0 +1,21 @@
+--- lib/Makefile.in.orig	Sat Oct 16 19:25:06 1999
++++ lib/Makefile.in	Fri Oct 29 20:19:40 1999
+@@ -75,6 +75,7 @@
+ INSTALL = @INSTALL@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_DATA = @INSTALL_DATA@
++INSTALL_LIB = @INSTALL_LIB@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ transform = @program_transform_name@
+ 
+@@ -189,8 +190,8 @@
+ 	$(mkinstalldirs) $(DESTDIR)$(libdir)
+ 	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ 	  if test -f $$p; then \
+-	    echo "$(LIBTOOL)  --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p"; \
+-	    $(LIBTOOL)  --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p; \
++	    echo "$(LIBTOOL)  --mode=install $(INSTALL_LIB) $$p $(DESTDIR)$(libdir)/$$p"; \
++	    $(LIBTOOL)  --mode=install $(INSTALL_LIB) $$p $(DESTDIR)$(libdir)/$$p; \
+ 	  else :; fi; \
+ 	done
+ 
diff -ruN libsasl.orig/patches/patch-ac libsasl/patches/patch-ac
--- libsasl.orig/patches/patch-ac	Wed Dec 31 18:00:00 1969
+++ libsasl/patches/patch-ac	Fri Oct 29 22:14:25 1999
@@ -0,0 +1,13 @@
+--- lib/checkpw.c.orig	Mon Sep 20 13:35:00 1999
++++ lib/checkpw.c	Fri Oct 29 22:09:23 1999
+@@ -67,6 +67,10 @@
+ #include <errno.h>
+ #include <sys/types.h>
+ #include <sys/uio.h>
++
++#include <sys/socket.h>
++#include <sys/un.h>
++
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
diff -ruN libsasl.orig/patches/patch-ad libsasl/patches/patch-ad
--- libsasl.orig/patches/patch-ad	Wed Dec 31 18:00:00 1969
+++ libsasl/patches/patch-ad	Fri Oct 29 20:22:09 1999
@@ -0,0 +1,21 @@
+--- plugins/Makefile.in.orig	Sat Oct 16 19:25:06 1999
++++ plugins/Makefile.in	Fri Oct 29 20:19:40 1999
+@@ -76,6 +76,7 @@
+ INSTALL = @INSTALL@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_DATA = @INSTALL_DATA@
++INSTALL_LIB= @INSTALL_LIB@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ transform = @program_transform_name@
+ 
+@@ -229,8 +230,8 @@
+ 	$(mkinstalldirs) $(DESTDIR)$(sasldir)
+ 	@list='$(sasl_LTLIBRARIES)'; for p in $$list; do \
+ 	  if test -f $$p; then \
+-	    echo "$(LIBTOOL)  --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(sasldir)/$$p"; \
+-	    $(LIBTOOL)  --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(sasldir)/$$p; \
++	    echo "$(LIBTOOL)  --mode=install $(INSTALL_LIB) $$p $(DESTDIR)$(sasldir)/$$p"; \
++	    $(LIBTOOL)  --mode=install $(INSTALL_LIB) $$p $(DESTDIR)$(sasldir)/$$p; \
+ 	  else :; fi; \
+ 	done
+ 
diff -ruN libsasl.orig/patches/patch-ae libsasl/patches/patch-ae
--- libsasl.orig/patches/patch-ae	Wed Dec 31 18:00:00 1969
+++ libsasl/patches/patch-ae	Fri Oct 29 21:43:37 1999
@@ -0,0 +1,39 @@
+--- pwcheck/pwcheck.c.orig	Thu Aug 26 11:22:43 1999
++++ pwcheck/pwcheck.c	Fri Oct 29 21:41:17 1999
+@@ -29,6 +29,14 @@
+ #include <sys/un.h>
+ #include <sys/uio.h>
+ #include <sys/stat.h>
++#include <paths.h>
++#include <unistd.h>
++#include <syslog.h>
++#include "../config.h"
++
++#if !defined(_PATH_PWCHECKPID)
++# define _PATH_PWCHECKPID  _PATH_VARRUN "pwcheck.pid"
++#endif
+ 
+ #include <config.h>
+ 
+@@ -49,6 +57,21 @@
+     int r;
+     int len;
+     mode_t oldumask;
++    char *pid_file = _PATH_PWCHECKPID;
++    FILE *fp;
++    pid_t pid;
++
++    /*
++     *   Record process ID - shamelessly stolen from inetd (I.V.)
++     */
++    pid = getpid();
++    fp = fopen(pid_file, "w");
++    if (fp) {
++        fprintf(fp, "%ld\n", (long)pid);
++        fclose(fp);
++    } else {
++        syslog(LOG_WARNING, "%s: %m", pid_file);
++    }
+ 
+     s = socket(AF_UNIX, SOCK_STREAM, 0);
+     if (s == -1) {
diff -ruN libsasl.orig/pkg/COMMENT libsasl/pkg/COMMENT
--- libsasl.orig/pkg/COMMENT	Wed Dec 31 18:00:00 1969
+++ libsasl/pkg/COMMENT	Fri Oct 29 19:50:30 1999
@@ -0,0 +1 @@
+RFC 2222 SASL (Simple Authentication and Security Layer)
diff -ruN libsasl.orig/pkg/DESCR libsasl/pkg/DESCR
--- libsasl.orig/pkg/DESCR	Wed Dec 31 18:00:00 1969
+++ libsasl/pkg/DESCR	Fri Oct 29 19:54:58 1999
@@ -0,0 +1,11 @@
+The Cyrus SASL (Simple Authentication and Security Layer)
+
+SASL is the Simple Authentication and Security Layer, a method
+for adding authentication support to connection-based protocols.
+To use SASL, a protocol includes a command for identifying and
+authenticating a user to a server and for optionally negotiating
+protection of subsequent protocol interactions. If its use is
+negotiated, a security layer is inserted between the protocol
+and the connection.
+
+WWW: http://asg.web.cmu.edu/sasl/
diff -ruN libsasl.orig/pkg/PLIST libsasl/pkg/PLIST
--- libsasl.orig/pkg/PLIST	Wed Dec 31 18:00:00 1969
+++ libsasl/pkg/PLIST	Sat Oct 30 19:14:29 1999
@@ -0,0 +1,22 @@
+include/hmac-md5.h
+include/md5.h
+include/md5global.h
+include/sasl.h
+include/saslplug.h
+include/saslutil.h
+lib/libsasl.so.7
+lib/libsasl.so
+@unexec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -R
+@exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m %B
+lib/sasl/libcrammd5.so.1
+lib/sasl/libcrammd5.so
+lib/sasl/libdigestmd5.so.0
+lib/sasl/libdigestmd5.so
+lib/sasl/libanonymous.so.1
+lib/sasl/libanonymous.so
+lib/sasl/libplain.so.1
+lib/sasl/libplain.so
+@dirrm lib/sasl
+sbin/saslpasswd
+sbin/sample-client
+sbin/sample-server

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910310156.UAA22662>