head	1.9;
access;
symbols
	RELEASE_5_EOL:1.8
	RELEASE_7_0_0:1.8
	RELEASE_6_3_0:1.8
	PRE_XORG_7:1.8
	RELEASE_4_EOL:1.8
	RELEASE_6_2_0:1.8
	RELEASE_6_1_0:1.8
	RELEASE_5_5_0:1.8
	RELEASE_6_0_0:1.8
	RELEASE_5_4_0:1.8
	RELEASE_4_11_0:1.8
	RELEASE_5_3_0:1.8
	RELEASE_4_10_0:1.8
	RELEASE_5_2_1:1.8
	RELEASE_5_2_0:1.8
	RELEASE_4_9_0:1.8
	RELEASE_5_1_0:1.8
	RELEASE_4_8_0:1.7
	RELEASE_5_0_0:1.6
	RELEASE_4_7_0:1.6
	RELEASE_4_6_2:1.5
	RELEASE_4_6_1:1.5
	RELEASE_4_6_0:1.5
	RELEASE_5_0_DP1:1.3
	RELEASE_4_5_0:1.3
	RELEASE_4_4_0:1.1
	RELEASE_4_3_0:1.1
	RELEASE_4_2_0:1.1;
locks; strict;
comment	@# @;


1.9
date	2008.06.17.19.01.58;	author pav;	state dead;
branches;
next	1.8;

1.8
date	2003.05.09.12.41.21;	author arved;	state Exp;
branches;
next	1.7;

1.7
date	2003.02.26.11.25.55;	author edwin;	state Exp;
branches;
next	1.6;

1.6
date	2002.08.14.18.39.45;	author knu;	state Exp;
branches;
next	1.5;

1.5
date	2002.05.24.02.01.13;	author dwcjr;	state Exp;
branches;
next	1.4;

1.4
date	2002.05.21.15.08.58;	author dwcjr;	state Exp;
branches;
next	1.3;

1.3
date	2002.01.17.15.04.35;	author kevlo;	state Exp;
branches;
next	1.2;

1.2
date	2001.12.20.12.18.57;	author ijliao;	state Exp;
branches;
next	1.1;

1.1
date	2000.11.01.12.00.13;	author jeh;	state Exp;
branches;
next	;


desc
@@


1.9
log
@Delete security/cyrus-sasl, it has been expired for a year and a half.
@
text
@#!/bin/sh
#
#	$FreeBSD: ports/security/cyrus-sasl/pkg-deinstall,v 1.8 2003/05/09 12:41:21 arved Exp $
#
# Created by: hetzels@@westbend.net

#set -vx

PKG_BATCH=${BATCH:=NO}

PKG_PREFIX=${PKG_PREFIX:=/usr/local}

SASLDB_NAME=${PKG_PREFIX}/etc/%%SASLDB%%

CYRUS_USER=${CYRUS_USER:=%%CYRUS_USER%%}
CYRUS_GROUP=${CYRUS_GROUP:=%%CYRUS_GROUP%%}

remove_file()
{
	file=$1

	if cmp -s ${file} ${file}.tmp; then
		rm -f ${file}
	fi
	rm -f ${file}.tmp
}

# delete sasldb database

delete_sasldb() {
	if [ -f ${SASLDB_NAME} ] ; then
		if [ `${PKG_PREFIX}/sbin/sasldblistusers | wc -l` -eq 0 ] ; then
			rm ${SASLDB_NAME}
		else
			echo "WARNING: Users SASL passwords are in ${SASLDB_NAME}, keeping this file"
		fi
	fi
}

delete_user() {
	if pw usershow ${CYRUS_USER} 2>/dev/null 1>&2; then
		echo "To delete Cyrus user permanently, use 'pw userdel ${CYRUS_USER}'"
	fi
	if pw groupshow ${CYRUS_GROUP} 2>/dev/null 1>&2; then
		echo "To delete Cyrus group permanently, use 'pw groupdel ${CYRUS_GROUP}'"
	fi

}

# This should really be uninstalled by Sendmail

sendmail_conf() {
	if [ -f ${PKG_PREFIX}/lib/sasl/Sendmail.conf ]; then
		echo "pwcheck_method: %%PWCHECK_METHOD%%" > ${PKG_PREFIX}/lib/sasl/Sendmail.conf.tmp
		remove_file ${PKG_PREFIX}/lib/sasl/Sendmail.conf
	fi
}

case $2 in
	DEINSTALL)
		delete_sasldb
		sendmail_conf
		;;
	POST-DEINSTALL)
		delete_user
		;;

esac
@


1.8
log
@* Fix some problems with building the Kerberos IV and 5 mechs.

* Made the port to optionally not build the mechs, define
WITHOUT_[ANONYMOUS,CRAM,DIGEST,LOGIN,OTP,GSSAPI,PLAIN].

* The Kerberos IV case is special, as we can use the base kerberos 4x
(<=5.0-RELEASE), or use the security/krb4 port.
    WITH_KERBEROS4 - use security/krb4 port
        if <=5.0-RELEASE, use krb4 port only if /usr/lib/libkrb.a
	doesn't exist
    WITHOUT_KERBEROS4 - disables using the base systems /usr/lib/libkrb.a
	(<=5.0), if it exists and MAKE_KERBEROS4 defined in /etc/make.conf

* Changed the combined rcNG/rcOG scripts, so that the defaults are at the top
of the rc.d script and not in an external file to the script.

PR:		51505
Submitted by:	maintainer
@
text
@d3 1
a3 1
#	$FreeBSD: ports/security/cyrus-sasl/pkg-deinstall,v 1.7 2003/02/26 11:25:55 edwin Exp $
@


1.7
log
@security/cyrus-sasl: Bento fails to build libkerberos + Upgrade

	Bento fails to proberly package the port on -CURRENT due
	to -CURRENT no longer has libdes.* as the des functions
	have been moved to the libcrypto.* library.

PR:		48442
Submitted by:	Scot W. Hetzel <hetzels@@westbend.net>
@
text
@d3 1
a3 1
#	$FreeBSD: ports/security/cyrus-sasl/pkg-deinstall,v 1.6 2002/08/14 18:39:45 knu Exp $
d15 3
a27 16
delete_rc_conf_d() {
	PWCHECK_CONF=${PKG_PREFIX}/etc/rc.conf.d/cyrus_pwcheck
	SASLAUTHD_CONF=${PKG_PREFIX}/etc/rc.conf.d/saslauthd1   

	if [ -f ${SASLAUTHD_CONF} ]; then
		echo "saslauthd1_enable=%%ENABLE_SASLAUTHD%%" >> ${SASLAUTHD_CONF}.tmp
		echo "saslauthd1_flags=\"-a pam\"" >> ${SASLAUTHD_CONF}.tmp
		remove_file ${SASLAUTHD_CONF}
	fi
	if [ -f ${PWCHECK_CONF} ]; then
		echo "cyrus_pwcheck_enable=%%ENABLE_PWCHECK%%" > ${PWCHECK_CONF}.tmp
		echo "cyrus_pwcheck_program=${PKG_PREFIX}/sbin/%%PWCHECK%%" >> ${PWCHECK_CONF}.tmp
		remove_file ${PWCHECK_CONF}
	fi
}

d41 2
a42 2
	if pw usershow cyrus 2>/dev/null 1>&2; then
		echo "To delete Cyrus user permanently, use 'pw userdel cyrus'"
d44 2
a45 2
	if pw groupshow cyrus 2>/dev/null 1>&2; then
		echo "To delete Cyrus group permanently, use 'pw groupdel cyrus'"
a61 1
		delete_rc_conf_d
@


1.6
log
@Add saslauthd as default general password checking daemon (replaces
pwcheck{_pam}).

PR:		ports/41653
Submitted by:	"Scot W. Hetzel" <hetzels@@westbend.net> (MAINTAINER)
@
text
@d3 1
a3 1
#	$FreeBSD: ports/security/cyrus-sasl/pkg-deinstall,v 1.5 2002/05/24 02:01:13 dwcjr Exp $
d15 26
d68 1
a68 4
		if cmp -s ${PKG_PREFIX}/lib/sasl/Sendmail.conf ${PKG_PREFIX}/lib/sasl/Sendmail.conf.tmp; then
			rm -f ${PKG_PREFIX}/lib/sasl/Sendmail.conf
		fi
		rm -f ${PKG_PREFIX}/lib/sasl/Sendmail.conf.tmp
d75 1
@


1.5
log
@Do not add a shell to cyrus user.

PR:		38434
Submitted by:	maintainer
@
text
@d3 1
a3 1
#	$FreeBSD: ports/security/cyrus-sasl/pkg-deinstall,v 1.4 2002/05/21 15:08:58 dwcjr Exp $
d41 1
a41 1
		echo "pwcheck_method: pwcheck" > ${PKG_PREFIX}/lib/sasl/Sendmail.conf.tmp
@


1.4
log
@Fix for DB3 & KRB4

PR:		38363
Submitted by:	maintainer
@
text
@d3 1
a3 1
#	$FreeBSD: ports/security/cyrus-sasl/pkg-deinstall,v 1.3 2002/01/17 15:04:35 kevlo Exp $
d30 3
@


1.3
log
@Update to version 1.5.27

PR: 33603
Submitted by: MAINTAINER
@
text
@d3 1
a3 1
#	$FreeBSD: ports/security/cyrus-sasl/pkg-deinstall,v 1.2 2001/12/20 12:18:57 ijliao Exp $
d27 7
d52 1
@


1.2
log
@refer to correct location in pkg-message
correct db filename
fix pkg-install script

PR:		29731
Submitted by:	maintainer
@
text
@d3 1
a3 1
#	$FreeBSD: ports/security/cyrus-sasl/pkg-deinstall,v 1.1 2000/11/01 12:00:13 jeh Exp $
d18 7
a24 1
	[ -f ${SASLDB_NAME} -a ! -s ${SASLDB_NAME} ] && rm ${SASLDB_NAME}
@


1.1
log
@New file

PR:		22462
@
text
@d3 1
a3 1
#	$FreeBSD$
d13 2
d18 1
a18 1
	[ -f %D/etc/sasldb.db -a ! -s %D/etc/sasldb.db ] && rm %D/etc/sasldb.db
@

