summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang Le <r0bertz@gentoo.org>2009-02-28 12:32:36 +0800
committerZhang Le <r0bertz@gentoo.org>2009-02-28 12:32:36 +0800
commited43274c6088cf3e18ef07e6a293ad5c134ab01d (patch)
treef69d7a44a5d143311109c0a35b6881b8ec3a855f /dev-libs/cyrus-sasl/files
parentMerge branch 'master' of ssh://192.168.1.101/var/git/loongson (diff)
downloadloongson-ed43274c6088cf3e18ef07e6a293ad5c134ab01d.tar.gz
loongson-ed43274c6088cf3e18ef07e6a293ad5c134ab01d.tar.bz2
loongson-ed43274c6088cf3e18ef07e6a293ad5c134ab01d.zip
added cyrus-sasl with gcc4.4 patch
Signed-off-by: Zhang Le <r0bertz@gentoo.org>
Diffstat (limited to 'dev-libs/cyrus-sasl/files')
-rw-r--r--dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.17-pgsql-include.patch13
-rw-r--r--dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.19-checkpw.c.patch170
-rw-r--r--dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.22-as-needed.patch11
-rw-r--r--dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.22-crypt.patch74
-rw-r--r--dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.22-db4.patch11
-rw-r--r--dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.22-qa.patch22
-rw-r--r--dev-libs/cyrus-sasl/files/cyrus-sasl-gcc4.4.patch20
-rw-r--r--dev-libs/cyrus-sasl/files/java.README.gentoo39
-rw-r--r--dev-libs/cyrus-sasl/files/pwcheck.rc621
-rw-r--r--dev-libs/cyrus-sasl/files/saslauthd-2.1.21.conf25
-rw-r--r--dev-libs/cyrus-sasl/files/saslauthd.pam-include8
-rw-r--r--dev-libs/cyrus-sasl/files/saslauthd2.rc621
12 files changed, 435 insertions, 0 deletions
diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.17-pgsql-include.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.17-pgsql-include.patch
new file mode 100644
index 0000000..90afd85
--- /dev/null
+++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.17-pgsql-include.patch
@@ -0,0 +1,13 @@
+--- configure.in.orig 2004-01-15 13:18:24.000000000 -0800
++++ configure.in 2004-01-15 13:18:27.000000000 -0800
+@@ -674,7 +674,9 @@
+ LIB_PGSQL_DIR=$LIB_PGSQL
+ LIB_PGSQL="$LIB_PGSQL -lpq"
+
+- if test -d ${with_pgsql}/include/pgsql; then
++ if test -d ${with_pgsql}/include/postgresql/pgsql; then
++ CPPFLAGS="${CPPFLAGS} -I${with_pgsql}/include/postgresql/pgsql"
++ elif test -d ${with_pgsql}/include/pgsql; then
+ CPPFLAGS="${CPPFLAGS} -I${with_pgsql}/include/pgsql"
+ elif test -d ${with_pgsql}/pgsql/include; then
+ CPPFLAGS="${CPPFLAGS} -I${with_pgsql}/pgsql/include"
diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.19-checkpw.c.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.19-checkpw.c.patch
new file mode 100644
index 0000000..f7bf44b
--- /dev/null
+++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.19-checkpw.c.patch
@@ -0,0 +1,170 @@
+diff -ur ../cyrus-sasl-2.1.19.orig/lib/Makefile.in ./lib/Makefile.in
+--- ../cyrus-sasl-2.1.19.orig/lib/Makefile.in 2004-07-02 21:40:15.000000000 +0200
++++ ./lib/Makefile.in 2004-09-07 13:21:22.746680576 +0200
+@@ -120,7 +120,7 @@
+ JAVA_TRUE = @JAVA_TRUE@
+ LDFLAGS = @LDFLAGS@
+ LIBOBJS = @LIBOBJS@
+-LIBS = @LIBS@
++LIBS = -lcrypt @LIBS@
+ LIBTOOL = @LIBTOOL@
+ LIB_CRYPT = @LIB_CRYPT@
+ LIB_DES = @LIB_DES@
+diff -ur ../cyrus-sasl-2.1.19.orig/lib/checkpw.c ./lib/checkpw.c
+--- ../cyrus-sasl-2.1.19.orig/lib/checkpw.c 2004-03-17 14:58:13.000000000 +0100
++++ ./lib/checkpw.c 2004-09-07 13:21:12.645916147 +0200
+@@ -94,6 +94,23 @@
+ # endif
+ #endif
+
++/******************************
++ * crypt(3) patch start *
++ ******************************/
++char *crypt(const char *key, const char *salt);
++
++/* cleartext password formats */
++#define PASSWORD_FORMAT_CLEARTEXT 1
++#define PASSWORD_FORMAT_CRYPT 2
++#define PASSWORD_FORMAT_CRYPTTRAD 3
++#define PASSWORD_SALT_BUF_LEN 22
++
++/* weeds out crypt(3) password's salt */
++int _sasl_get_salt (char *dest, char *src, int format);
++
++/******************************
++ * crypt(3) patch stop *
++ ******************************/
+
+ /* we store the following secret to check plaintext passwords:
+ *
+@@ -143,7 +160,51 @@
+ "*cmusaslsecretPLAIN",
+ NULL };
+ struct propval auxprop_values[3];
+-
++
++ /******************************
++ * crypt(3) patch start *
++ * for password format check *
++ ******************************/
++ sasl_getopt_t *getopt;
++ void *context;
++ const char *p = NULL;
++ /**
++ * MD5: 12 char salt
++ * BLOWFISH: 16 char salt
++ */
++ char salt[PASSWORD_SALT_BUF_LEN];
++ int password_format;
++
++ /* get password format from auxprop configuration */
++ if (_sasl_getcallback(conn, SASL_CB_GETOPT, &getopt, &context) == SASL_OK) {
++ getopt(context, NULL, "password_format", &p, NULL);
++ }
++
++ /* set password format */
++ if (p) {
++ /*
++ memset(pass_format_str, '\0', PASSWORD_FORMAT_STR_LEN);
++ strncpy(pass_format_str, p, (PASSWORD_FORMAT_STR_LEN - 1));
++ */
++ /* modern, modular crypt(3) */
++ if (strncmp(p, "crypt", 11) == 0)
++ password_format = PASSWORD_FORMAT_CRYPT;
++ /* traditional crypt(3) */
++ else if (strncmp(p, "crypt_trad", 11) == 0)
++ password_format = PASSWORD_FORMAT_CRYPTTRAD;
++ /* cleartext password */
++ else
++ password_format = PASSWORD_FORMAT_CLEARTEXT;
++ } else {
++ /* cleartext password */
++ password_format = PASSWORD_FORMAT_CLEARTEXT;
++ }
++
++ /******************************
++ * crypt(3) patch stop *
++ * for password format check *
++ ******************************/
++
+ if (!conn || !userstr)
+ return SASL_BADPARAM;
+
+@@ -180,14 +241,31 @@
+ goto done;
+ }
+
+- /* At the point this has been called, the username has been canonified
+- * and we've done the auxprop lookup. This should be easy. */
+- if(auxprop_values[0].name
+- && auxprop_values[0].values
+- && auxprop_values[0].values[0]
+- && !strcmp(auxprop_values[0].values[0], passwd)) {
+- /* We have a plaintext version and it matched! */
+- return SASL_OK;
++
++ /******************************
++ * crypt(3) patch start *
++ ******************************/
++
++ /* get salt */
++ _sasl_get_salt(salt, (char *) auxprop_values[0].values[0], password_format);
++
++ /* crypt(3)-ed password? */
++ if (password_format != PASSWORD_FORMAT_CLEARTEXT) {
++ /* compare password */
++ if (auxprop_values[0].name && auxprop_values[0].values && auxprop_values[0].values[0] && strcmp(crypt(passwd, salt), auxprop_values[0].values[0]) == 0)
++ return SASL_OK;
++ else
++ ret = SASL_BADAUTH;
++ }
++ else if (password_format == PASSWORD_FORMAT_CLEARTEXT) {
++ /* compare passwords */
++ if (auxprop_values[0].name && auxprop_values[0].values && auxprop_values[0].values[0] && strcmp(auxprop_values[0].values[0], passwd) == 0)
++ return SASL_OK;
++ else
++ ret = SASL_BADAUTH;
++ /******************************
++ * crypt(3) patch stop *
++ ******************************/
+ } else if(auxprop_values[1].name
+ && auxprop_values[1].values
+ && auxprop_values[1].values[0]) {
+@@ -975,3 +1053,37 @@
+ #endif
+ { NULL, NULL }
+ };
++
++/* weeds out crypt(3) password's salt */
++int _sasl_get_salt (char *dest, char *src, int format) {
++ int num; /* how many characters is salt long? */
++ switch (format) {
++ case PASSWORD_FORMAT_CRYPT:
++ /* md5 crypt */
++ if (src[1] == '1')
++ num = 12;
++ /* blowfish crypt */
++ else if (src[1] == '2')
++ num = (src[1] == '2' && src[2] == 'a') ? 17 : 16;
++ /* traditional crypt */
++ else
++ num = 2;
++ break;
++
++ case PASSWORD_FORMAT_CRYPTTRAD:
++ num = 2;
++ break;
++
++ default:
++ return 1;
++ }
++
++ /* destroy destination */
++ memset(dest, '\0', (num + 1));
++
++ /* copy salt to destination */
++ strncpy(dest, src, num);
++
++ return 1;
++}
++
diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.22-as-needed.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.22-as-needed.patch
new file mode 100644
index 0000000..1294cb5
--- /dev/null
+++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.22-as-needed.patch
@@ -0,0 +1,11 @@
+--- saslauthd/configure.in.orig 2006-05-23 15:53:17.000000000 -0700
++++ saslauthd/configure.in 2006-05-23 15:53:33.000000000 -0700
+@@ -77,7 +77,7 @@
+ AC_DEFINE(AUTH_SASLDB,[],[Include SASLdb Support])
+ SASL_DB_PATH_CHECK()
+ SASL_DB_CHECK()
+- SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.al"
++ SASL_DB_LIB="../sasldb/.libs/libsasldb.a $SASL_DB_LIB"
+ fi
+
+ AC_ARG_ENABLE(httpform, [ --enable-httpform enable HTTP form authentication [[no]] ],
diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.22-crypt.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.22-crypt.patch
new file mode 100644
index 0000000..8ac4687
--- /dev/null
+++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.22-crypt.patch
@@ -0,0 +1,74 @@
+diff -urpN cyrus-sasl-2.1.22-orig/lib/Makefile.am cyrus-sasl-2.1.22/lib/Makefile.am
+--- cyrus-sasl-2.1.22-orig/lib/Makefile.am 2006-05-17 16:46:13.000000000 +0000
++++ cyrus-sasl-2.1.22/lib/Makefile.am 2006-10-24 15:20:36.000000000 +0000
+@@ -45,6 +45,7 @@ sasl_version = 2:22:0
+
+ INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/plugins -I$(top_builddir)/include -I$(top_srcdir)/sasldb
+
++AM_CFLAGS = -fPIC
+ EXTRA_DIST = windlopen.c staticopen.h NTMakefile
+ EXTRA_LIBRARIES = libsasl2.a
+ noinst_LIBRARIES = @SASL_STATIC_LIBS@
+diff -urpN cyrus-sasl-2.1.22-orig/plugins/Makefile.am cyrus-sasl-2.1.22/plugins/Makefile.am
+--- cyrus-sasl-2.1.22-orig/plugins/Makefile.am 2006-05-17 16:46:16.000000000 +0000
++++ cyrus-sasl-2.1.22/plugins/Makefile.am 2006-10-24 15:19:38.000000000 +0000
+@@ -63,6 +63,7 @@ srp_version = 2:22:0
+
+ INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_srcdir)/sasldb -I$(top_builddir)/include
+ AM_LDFLAGS = -module -export-dynamic -rpath $(plugindir)
++AM_CFLAGS = -fPIC
+
+ COMPAT_OBJS = @LTGETADDRINFOOBJS@ @LTGETNAMEINFOOBJS@ @LTSNPRINTFOBJS@
+
+diff -urpN cyrus-sasl-2.1.22-orig/sasldb/Makefile.am cyrus-sasl-2.1.22/sasldb/Makefile.am
+--- cyrus-sasl-2.1.22-orig/sasldb/Makefile.am 2006-05-17 16:46:17.000000000 +0000
++++ cyrus-sasl-2.1.22/sasldb/Makefile.am 2006-10-24 15:20:10.000000000 +0000
+@@ -48,6 +48,7 @@ INCLUDES=-I$(top_srcdir)/include -I$(top
+
+ extra_common_sources = db_none.c db_ndbm.c db_gdbm.c db_berkeley.c
+
++AM_CFLAGS = -fPIC
+ EXTRA_DIST = NTMakefile
+
+ noinst_LTLIBRARIES = libsasldb.la
+diff -urpN cyrus-sasl-2.1.22-orig/utils/Makefile.am cyrus-sasl-2.1.22/utils/Makefile.am
+--- cyrus-sasl-2.1.22-orig/utils/Makefile.am 2006-05-18 18:34:26.000000000 +0000
++++ cyrus-sasl-2.1.22/utils/Makefile.am 2006-10-24 15:12:39.000000000 +0000
+@@ -42,7 +42,7 @@
+ #
+ ################################################################
+
+-all_sasl_libs = ../lib/libsasl2.la $(SASL_DB_LIB) $(LIB_SOCKET)
++all_sasl_libs = ../lib/libsasl2.la $(SASL_DB_LIB) $(LIB_SOCKET) $(LIB_CRYPT)
+ all_sasl_static_libs = ../lib/.libs/libsasl2.a $(SASL_DB_LIB) $(LIB_SOCKET) $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(SASL_KRB_LIB) $(LIB_DES) $(PLAIN_LIBS) $(SRP_LIBS) $(LIB_MYSQL) $(LIB_PGSQL) $(LIB_SQLITE)
+
+ sbin_PROGRAMS = @SASL_DB_UTILS@ @SMTPTEST_PROGRAM@ pluginviewer
+diff -urpN cyrus-sasl-2.1.22-orig/sample/Makefile.am cyrus-sasl-2.1.22/sample/Makefile.am
+--- cyrus-sasl-2.1.22-orig/sample/Makefile.am 2004-03-10 15:44:55.000000000 +0000
++++ cyrus-sasl-2.1.22/sample/Makefile.am 2006-10-24 16:03:22.000000000 +0000
+@@ -54,10 +54,10 @@ sample_server_SOURCES = sample-server.c
+ server_SOURCES = server.c common.c common.h
+ client_SOURCES = client.c common.c common.h
+
+-server_LDADD = ../lib/libsasl2.la $(LIB_SOCKET)
+-client_LDADD = ../lib/libsasl2.la $(LIB_SOCKET)
++server_LDADD = ../lib/libsasl2.la $(LIB_SOCKET) $(LIB_CRYPT)
++client_LDADD = ../lib/libsasl2.la $(LIB_SOCKET) $(LIB_CRYPT)
+
+-sample_client_LDADD = ../lib/libsasl2.la $(LIB_SOCKET)
+-sample_server_LDADD = ../lib/libsasl2.la $(LIB_SOCKET)
++sample_client_LDADD = ../lib/libsasl2.la $(LIB_SOCKET) $(LIB_CRYPT)
++sample_server_LDADD = ../lib/libsasl2.la $(LIB_SOCKET) $(LIB_CRYPT)
+
+ EXTRA_DIST = NTMakefile
+--- cyrus-sasl-2.1.22-orig/lib/Makefile.am 2006-10-24 16:51:41.000000000 +0000
++++ cyrus-sasl-2.1.22/lib/Makefile.am 2006-10-24 16:51:10.000000000 +0000
+@@ -63,7 +63,7 @@ lib_LTLIBRARIES = libsasl2.la
+ libsasl2_la_SOURCES = $(common_sources) $(common_headers)
+ libsasl2_la_LDFLAGS = -version-info $(sasl_version)
+ libsasl2_la_DEPENDENCIES = $(LTLIBOBJS)
+-libsasl2_la_LIBADD = $(LTLIBOBJS) $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR)
++libsasl2_la_LIBADD = $(LTLIBOBJS) $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR) $(LIB_CRYPT)
+
+ if MACOSX
+ framedir = /Library/Frameworks/SASL2.framework
diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.22-db4.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.22-db4.patch
new file mode 100644
index 0000000..2ce8f79
--- /dev/null
+++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.22-db4.patch
@@ -0,0 +1,11 @@
+--- cyrus-sasl-2.1.22/cmulocal/berkdb.m4.orig 2007-10-02 10:10:07.000000000 -0700
++++ cyrus-sasl-2.1.22/cmulocal/berkdb.m4 2007-10-02 10:28:14.000000000 -0700
+@@ -213,7 +213,7 @@
+ fi
+
+ saved_LIBS=$LIBS
+- for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
++ for dbname in db-4.6 db-4.5 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
+ do
+ LIBS="$saved_LIBS -l$dbname"
+ AC_TRY_LINK([#include <db.h>],
diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.22-qa.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.22-qa.patch
new file mode 100644
index 0000000..891eb47
--- /dev/null
+++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.22-qa.patch
@@ -0,0 +1,22 @@
+diff -urNp cyrus-sasl-2.1.22.org/lib/auxprop.c cyrus-sasl-2.1.22/lib/auxprop.c
+--- cyrus-sasl-2.1.22.org/lib/auxprop.c 2006-03-14 16:23:55.000000000 +0200
++++ cyrus-sasl-2.1.22/lib/auxprop.c 2007-02-03 16:28:26.000000000 +0200
+@@ -43,6 +43,7 @@
+ */
+
+ #include <config.h>
++#include <stdio.h>
+ #include <sasl.h>
+ #include <prop.h>
+ #include <ctype.h>
+diff -urNp cyrus-sasl-2.1.22.org/pwcheck/pwcheck_getspnam.c cyrus-sasl-2.1.22/pwcheck/pwcheck_getspnam.c
+--- cyrus-sasl-2.1.22.org/pwcheck/pwcheck_getspnam.c 1999-08-26 19:22:44.000000000 +0300
++++ cyrus-sasl-2.1.22/pwcheck/pwcheck_getspnam.c 2007-02-03 16:29:34.000000000 +0200
+@@ -24,6 +24,7 @@ OF OR IN CONNECTION WITH THE USE OR PERF
+ ******************************************************************/
+
+ #include <shadow.h>
++#include <string.h>
+
+ extern char *crypt();
+
diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-gcc4.4.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-gcc4.4.patch
new file mode 100644
index 0000000..1215fed
--- /dev/null
+++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-gcc4.4.patch
@@ -0,0 +1,20 @@
+--- plugins/digestmd5.c.orig 2009-02-28 12:22:31.000000000 +0800
++++ plugins/digestmd5.c 2009-02-28 12:24:21.000000000 +0800
+@@ -2715,7 +2715,7 @@
+ "DIGEST-MD5", /* mech_name */
+ #ifdef WITH_RC4
+ 128, /* max_ssf */
+-#elif WITH_DES
++#elif defined(WITH_DES)
+ 112,
+ #else
+ 1,
+@@ -4034,7 +4034,7 @@
+ "DIGEST-MD5",
+ #ifdef WITH_RC4 /* mech_name */
+ 128, /* max ssf */
+-#elif WITH_DES
++#elif defined(WITH_DES)
+ 112,
+ #else
+ 1,
diff --git a/dev-libs/cyrus-sasl/files/java.README.gentoo b/dev-libs/cyrus-sasl/files/java.README.gentoo
new file mode 100644
index 0000000..fb73204
--- /dev/null
+++ b/dev-libs/cyrus-sasl/files/java.README.gentoo
@@ -0,0 +1,39 @@
+4-Nov-2000
+
+Note: this file has been modified to adapt to Gentoo specific.
+
+class files are installed in
+
+`java-config -p cyrus-sasl-2`
+
+to compile programs using it, do:
+
+javac -classpath $JAVA_HOME/lib/tools.jar:`java-config -p cyrus-sasl-2` <file>.java
+
+(make sure to substitute your JDK for $JAVA_HOME/lib/tools.jar)
+
+to run, do
+
+java -classpath <same path as above> <YourProgram>
+
+----------------------------
+This is a java version of the SASL libraries. It supports all the
+mechanisms in the C version and conforms to the internet draft in the
+doc/ directory. JNI is used.
+
+Sample applications exist in the Test/ directory.
+
+They generally can be run with something like:
+
+java -debug -classpath
+../:$JAVA_HOME/lib/tools.jar:`java-config -p cyrus-sasl-2`:. jimtest -p 2143 -m
+KERBEROS_V4 cyrus-dev
+
+and
+
+java -debug -classpath
+../:$JAVA_HOME/lib/tools.jar:`java-config -p cyrus-sasl-2`:. testserver
+
+
+Any feedback is welcome.
+
diff --git a/dev-libs/cyrus-sasl/files/pwcheck.rc6 b/dev-libs/cyrus-sasl/files/pwcheck.rc6
new file mode 100644
index 0000000..a24b80d
--- /dev/null
+++ b/dev-libs/cyrus-sasl/files/pwcheck.rc6
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/cyrus-sasl/files/pwcheck.rc6,v 1.5 2007/04/07 13:03:55 chtekk Exp $
+
+depend() {
+ need localmount
+ use logger
+}
+
+start() {
+ ebegin "Starting sasl pwcheck daemon"
+ start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/pwcheck
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping sasl pwcheck daemon"
+ start-stop-daemon --stop --quiet --oknodo --exec /usr/sbin/pwcheck
+ eend $?
+}
diff --git a/dev-libs/cyrus-sasl/files/saslauthd-2.1.21.conf b/dev-libs/cyrus-sasl/files/saslauthd-2.1.21.conf
new file mode 100644
index 0000000..3f2653c
--- /dev/null
+++ b/dev-libs/cyrus-sasl/files/saslauthd-2.1.21.conf
@@ -0,0 +1,25 @@
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/cyrus-sasl/files/saslauthd-2.1.21.conf,v 1.2 2007/04/07 13:03:55 chtekk Exp $
+
+# Config file for /etc/init.d/saslauthd
+
+# Initial (empty) options.
+SASLAUTHD_OPTS=""
+
+# Specify the authentications mechanism.
+# **NOTE** For a list see: saslauthd -v
+# Since 2.1.19, add "-r" to options for old behavior,
+# ie. reassemble user and realm to user@realm form.
+#SASLAUTHD_OPTS="${SASLAUTHD_OPTS} -a pam -r"
+SASLAUTHD_OPTS="${SASLAUTHD_OPTS} -a pam"
+
+# Specify the hostname for remote IMAP server.
+# **NOTE** Only needed if rimap auth mechanism is used.
+#SASLAUTHD_OPTS="${SASLAUTHD_OPTS} -O localhost"
+
+# Specify the number of worker processes to create.
+#SASLAUTHD_OPTS="${SASLAUTHD_OPTS} -n 5"
+
+# Enable credential cache, set cache size and timeout.
+# **NOTE** Size is measured in kilobytes.
+# Timeout is measured in seconds.
+#SASLAUTHD_OPTS="${SASLAUTHD_OPTS} -c -s 128 -t 30"
diff --git a/dev-libs/cyrus-sasl/files/saslauthd.pam-include b/dev-libs/cyrus-sasl/files/saslauthd.pam-include
new file mode 100644
index 0000000..d50a849
--- /dev/null
+++ b/dev-libs/cyrus-sasl/files/saslauthd.pam-include
@@ -0,0 +1,8 @@
+#%PAM-1.0
+
+auth required pam_nologin.so
+auth include system-auth
+
+account include system-auth
+
+session include system-auth
diff --git a/dev-libs/cyrus-sasl/files/saslauthd2.rc6 b/dev-libs/cyrus-sasl/files/saslauthd2.rc6
new file mode 100644
index 0000000..a5e9a44
--- /dev/null
+++ b/dev-libs/cyrus-sasl/files/saslauthd2.rc6
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/cyrus-sasl/files/saslauthd2.rc6,v 1.7 2007/04/07 13:03:55 chtekk Exp $
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting saslauthd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/saslauthd \
+ -- ${SASLAUTHD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping saslauthd"
+ start-stop-daemon --stop --quiet --pidfile /var/lib/sasl2/saslauthd.pid
+ eend $?
+}