aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authordwcjr <dwcjr@FreeBSD.org>2002-05-21 23:08:58 +0800
committerdwcjr <dwcjr@FreeBSD.org>2002-05-21 23:08:58 +0800
commit06a88d63137c6c376636bb2701170cbef623ced8 (patch)
tree08090696880df95228c224f0495a489e81c77627 /security
parent42ba5d1d17024e777f60bc0a87a4505b93a3ceb4 (diff)
downloadfreebsd-ports-gnome-06a88d63137c6c376636bb2701170cbef623ced8.tar.gz
freebsd-ports-gnome-06a88d63137c6c376636bb2701170cbef623ced8.tar.zst
freebsd-ports-gnome-06a88d63137c6c376636bb2701170cbef623ced8.zip
Fix for DB3 & KRB4
PR: 38363 Submitted by: maintainer
Diffstat (limited to 'security')
-rw-r--r--security/cyrus-sasl/files/patch-ab58
-rw-r--r--security/cyrus-sasl/pkg-deinstall8
-rw-r--r--security/cyrus-sasl/pkg-install23
-rw-r--r--security/cyrus-sasl2/files/patch-ab58
-rw-r--r--security/cyrus-sasl2/pkg-deinstall8
-rw-r--r--security/cyrus-sasl2/pkg-install23
6 files changed, 148 insertions, 30 deletions
diff --git a/security/cyrus-sasl/files/patch-ab b/security/cyrus-sasl/files/patch-ab
index 009a8b4a9f82..323190966e63 100644
--- a/security/cyrus-sasl/files/patch-ab
+++ b/security/cyrus-sasl/files/patch-ab
@@ -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
diff --git a/security/cyrus-sasl/pkg-deinstall b/security/cyrus-sasl/pkg-deinstall
index fe997778b912..87f8409132f5 100644
--- a/security/cyrus-sasl/pkg-deinstall
+++ b/security/cyrus-sasl/pkg-deinstall
@@ -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
diff --git a/security/cyrus-sasl/pkg-install b/security/cyrus-sasl/pkg-install
index b0a9c1961b71..506861e57b29 100644
--- a/security/cyrus-sasl/pkg-install
+++ b/security/cyrus-sasl/pkg-install
@@ -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
}
diff --git a/security/cyrus-sasl2/files/patch-ab b/security/cyrus-sasl2/files/patch-ab
index 009a8b4a9f82..323190966e63 100644
--- a/security/cyrus-sasl2/files/patch-ab
+++ b/security/cyrus-sasl2/files/patch-ab
@@ -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
diff --git a/security/cyrus-sasl2/pkg-deinstall b/security/cyrus-sasl2/pkg-deinstall
index fe997778b912..87f8409132f5 100644
--- a/security/cyrus-sasl2/pkg-deinstall
+++ b/security/cyrus-sasl2/pkg-deinstall
@@ -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
diff --git a/security/cyrus-sasl2/pkg-install b/security/cyrus-sasl2/pkg-install
index b0a9c1961b71..506861e57b29 100644
--- a/security/cyrus-sasl2/pkg-install
+++ b/security/cyrus-sasl2/pkg-install
@@ -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
}