Fix for DB3 & KRB4

PR:		38363
Submitted by:	maintainer
This commit is contained in:
David W. Chapman Jr. 2002-05-21 15:08:58 +00:00
parent f3320d0aac
commit fe250dd90d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=59628
6 changed files with 148 additions and 30 deletions

View File

@ -1,5 +1,5 @@
--- configure.in.orig Thu Jan 17 19:21:51 2002
+++ configure.in Thu Jan 17 19:47:46 2002
--- configure.in.orig Mon May 20 19:02:49 2002
+++ configure.in Mon May 20 19:21:53 2002
@@ -66,8 +66,9 @@
dnl check for -R, etc. switch
CMU_GUESS_RUNPATH_SWITCH
@ -21,7 +21,37 @@
fi
AM_CONDITIONAL(SAMPLE, test "$enable_sample" = yes)
@@ -235,6 +234,13 @@
@@ -149,11 +148,13 @@
AC_CHECK_HEADER(db.h,
AC_CHECK_LIB(db-3, db_create, SASL_DB_LIB="-ldb-3";
dblib="berkeley",
+ AC_CHECK_LIB(db3, db_create, SASL_DB_LIB="-ldb3";
+ dblib="berkeley",
AC_CHECK_LIB(db, db_create, SASL_DB_LIB="-ldb";
dblib="berkeley",
AC_CHECK_LIB(db, db_open, SASL_DB_LIB="-ldb";
dblib="berkeley",
- dblib="no"))),
+ dblib="no")))),
dblib="no")
;;
gdbm)
@@ -175,11 +176,13 @@
AC_CHECK_HEADER(db.h,
AC_CHECK_LIB(db-3, db_create, SASL_DB_LIB="-ldb-3";
dblib="berkeley",
+ AC_CHECK_LIB(db3, db_create, SASL_DB_LIB="-ldb3";
+ dblib="berkeley",
AC_CHECK_LIB(db, db_create, SASL_DB_LIB="-ldb";
dblib="berkeley",
AC_CHECK_LIB(db, db_open, SASL_DB_LIB="-ldb";
dblib="berkeley",
- dblib="no"))),
+ dblib="no")))),
dblib="no")
if test "$dblib" = no; then
dnl How about ndbm?
@@ -229,6 +232,13 @@
berkeley)
SASL_DB_BACKEND="db_${dblib}.lo"
AC_DEFINE(SASL_BERKELEYDB)
@ -35,3 +65,25 @@
;;
*)
AC_MSG_WARN([Disabling SASL authentication database support])
@@ -534,12 +544,16 @@
fi
if test "$with_des" != no; then
+ case "$host_os" in
+ freebsd*)
+ COM_ERR="-lcom_err"
+ ;;
+ esac
AC_CHECK_HEADER(krb.h,
- AC_CHECK_LIB(krb, krb_mk_priv, COM_ERR="",
- AC_CHECK_LIB(krb, krb_mk_priv, COM_ERR="-lcom_err",
- AC_WARN(No Kerberos V4 found); krb4=no, -ldes -lcom_err),
- -ldes),
- AC_WARN(No Kerberos V4 found); krb4=no)
+ AC_CHECK_LIB(krb, krb_mk_priv,:,
+ AC_WARN(No Kerberos V4 found); krb4=no,
+ -ldes ${COM_ERR}),
+ AC_WARN(No Kerberos V4 headers found); krb4=no)
else
AC_WARN(No DES library found for Kerberos V4 support)
krb4=no

View File

@ -24,6 +24,13 @@ delete_sasldb() {
fi
}
delete_user() {
if pw usershow cyrus 2>/dev/null 1>&2; then
echo "To delete Cyrus user permanently, use 'pw userdel cyrus'"
fi
}
# This should really be uninstalled by Sendmail
sendmail_conf() {
@ -42,6 +49,7 @@ case $2 in
sendmail_conf
;;
POST-DEINSTALL)
delete_user
;;
esac

View File

@ -38,18 +38,13 @@ create_user() {
gid=`pw show group cyrus 2>/dev/null | cut -d: -f3`
fi
if [ -x /sbin/nologin ]; then
shell=/sbin/nologin
else
shell=/nonexistent
fi
if ! pw show user cyrus -q >/dev/null; then
uid=60
while pw show user -u ${uid} -q >/dev/null; do
uid=`expr ${uid} + 1`
done
if ! pw add user cyrus -u ${uid} -g ${gid} -d "/nonexistent" \
-c "the cyrus mail server" -s "${shell}" -p "*" \
if ! pw add user cyrus -u ${uid} -g ${gid} -d "${PKG_PREFIX}/cyrus" \
-c "the cyrus mail server" -s "/bin/csh" -p "*" \
; then
e=$?
echo "*** Failed to add user \`cyrus'. Please add it manually."
@ -57,8 +52,8 @@ create_user() {
fi
echo "*** Added user \`cyrus' (id ${uid})"
else
if ! pw mod user cyrus -g ${gid} -d "/nonexistent" \
-c "the cyrus mail server" -s "${shell}" -p "*" \
if ! pw mod user cyrus -g ${gid} -d "${PKG_PREFIX}/cyrus" \
-c "the cyrus mail server" -s "/bin/csh" -p "*" \
; then
e=$?
echo "*** Failed to update user \`cyrus'."
@ -74,9 +69,13 @@ create_user() {
create_sasldb() {
if [ ! -f ${SASLDB_NAME} ]; then
echo "test" | ${PKG_PREFIX}/sbin/saslpasswd -p -c cyrus
${PKG_PREFIX}/sbin/saslpasswd -d cyrus
chown cyrus:mail ${SASLDB_NAME}
chmod 640 ${SASLDB_NAME}
if [ `${PKG_PREFIX}/sbin/sasldblistusers | wc -l` -eq 0 ] ; then
echo "WARNING: Failed to create ${PKG_PREFIX}/etc/$SASLDB_NAME}"
else
${PKG_PREFIX}/sbin/saslpasswd -d cyrus
chown cyrus:mail ${SASLDB_NAME}
chmod 640 ${SASLDB_NAME}
fi
fi
}

View File

@ -1,5 +1,5 @@
--- configure.in.orig Thu Jan 17 19:21:51 2002
+++ configure.in Thu Jan 17 19:47:46 2002
--- configure.in.orig Mon May 20 19:02:49 2002
+++ configure.in Mon May 20 19:21:53 2002
@@ -66,8 +66,9 @@
dnl check for -R, etc. switch
CMU_GUESS_RUNPATH_SWITCH
@ -21,7 +21,37 @@
fi
AM_CONDITIONAL(SAMPLE, test "$enable_sample" = yes)
@@ -235,6 +234,13 @@
@@ -149,11 +148,13 @@
AC_CHECK_HEADER(db.h,
AC_CHECK_LIB(db-3, db_create, SASL_DB_LIB="-ldb-3";
dblib="berkeley",
+ AC_CHECK_LIB(db3, db_create, SASL_DB_LIB="-ldb3";
+ dblib="berkeley",
AC_CHECK_LIB(db, db_create, SASL_DB_LIB="-ldb";
dblib="berkeley",
AC_CHECK_LIB(db, db_open, SASL_DB_LIB="-ldb";
dblib="berkeley",
- dblib="no"))),
+ dblib="no")))),
dblib="no")
;;
gdbm)
@@ -175,11 +176,13 @@
AC_CHECK_HEADER(db.h,
AC_CHECK_LIB(db-3, db_create, SASL_DB_LIB="-ldb-3";
dblib="berkeley",
+ AC_CHECK_LIB(db3, db_create, SASL_DB_LIB="-ldb3";
+ dblib="berkeley",
AC_CHECK_LIB(db, db_create, SASL_DB_LIB="-ldb";
dblib="berkeley",
AC_CHECK_LIB(db, db_open, SASL_DB_LIB="-ldb";
dblib="berkeley",
- dblib="no"))),
+ dblib="no")))),
dblib="no")
if test "$dblib" = no; then
dnl How about ndbm?
@@ -229,6 +232,13 @@
berkeley)
SASL_DB_BACKEND="db_${dblib}.lo"
AC_DEFINE(SASL_BERKELEYDB)
@ -35,3 +65,25 @@
;;
*)
AC_MSG_WARN([Disabling SASL authentication database support])
@@ -534,12 +544,16 @@
fi
if test "$with_des" != no; then
+ case "$host_os" in
+ freebsd*)
+ COM_ERR="-lcom_err"
+ ;;
+ esac
AC_CHECK_HEADER(krb.h,
- AC_CHECK_LIB(krb, krb_mk_priv, COM_ERR="",
- AC_CHECK_LIB(krb, krb_mk_priv, COM_ERR="-lcom_err",
- AC_WARN(No Kerberos V4 found); krb4=no, -ldes -lcom_err),
- -ldes),
- AC_WARN(No Kerberos V4 found); krb4=no)
+ AC_CHECK_LIB(krb, krb_mk_priv,:,
+ AC_WARN(No Kerberos V4 found); krb4=no,
+ -ldes ${COM_ERR}),
+ AC_WARN(No Kerberos V4 headers found); krb4=no)
else
AC_WARN(No DES library found for Kerberos V4 support)
krb4=no

View File

@ -24,6 +24,13 @@ delete_sasldb() {
fi
}
delete_user() {
if pw usershow cyrus 2>/dev/null 1>&2; then
echo "To delete Cyrus user permanently, use 'pw userdel cyrus'"
fi
}
# This should really be uninstalled by Sendmail
sendmail_conf() {
@ -42,6 +49,7 @@ case $2 in
sendmail_conf
;;
POST-DEINSTALL)
delete_user
;;
esac

View File

@ -38,18 +38,13 @@ create_user() {
gid=`pw show group cyrus 2>/dev/null | cut -d: -f3`
fi
if [ -x /sbin/nologin ]; then
shell=/sbin/nologin
else
shell=/nonexistent
fi
if ! pw show user cyrus -q >/dev/null; then
uid=60
while pw show user -u ${uid} -q >/dev/null; do
uid=`expr ${uid} + 1`
done
if ! pw add user cyrus -u ${uid} -g ${gid} -d "/nonexistent" \
-c "the cyrus mail server" -s "${shell}" -p "*" \
if ! pw add user cyrus -u ${uid} -g ${gid} -d "${PKG_PREFIX}/cyrus" \
-c "the cyrus mail server" -s "/bin/csh" -p "*" \
; then
e=$?
echo "*** Failed to add user \`cyrus'. Please add it manually."
@ -57,8 +52,8 @@ create_user() {
fi
echo "*** Added user \`cyrus' (id ${uid})"
else
if ! pw mod user cyrus -g ${gid} -d "/nonexistent" \
-c "the cyrus mail server" -s "${shell}" -p "*" \
if ! pw mod user cyrus -g ${gid} -d "${PKG_PREFIX}/cyrus" \
-c "the cyrus mail server" -s "/bin/csh" -p "*" \
; then
e=$?
echo "*** Failed to update user \`cyrus'."
@ -74,9 +69,13 @@ create_user() {
create_sasldb() {
if [ ! -f ${SASLDB_NAME} ]; then
echo "test" | ${PKG_PREFIX}/sbin/saslpasswd -p -c cyrus
${PKG_PREFIX}/sbin/saslpasswd -d cyrus
chown cyrus:mail ${SASLDB_NAME}
chmod 640 ${SASLDB_NAME}
if [ `${PKG_PREFIX}/sbin/sasldblistusers | wc -l` -eq 0 ] ; then
echo "WARNING: Failed to create ${PKG_PREFIX}/etc/$SASLDB_NAME}"
else
${PKG_PREFIX}/sbin/saslpasswd -d cyrus
chown cyrus:mail ${SASLDB_NAME}
chmod 640 ${SASLDB_NAME}
fi
fi
}