summaryrefslogtreecommitdiff
path: root/security/courier-authlib/files
diff options
context:
space:
mode:
Diffstat (limited to 'security/courier-authlib/files')
-rw-r--r--security/courier-authlib/files/courier-authdaemond.sh60
-rw-r--r--security/courier-authlib/files/courier-authdaemond.sh.in62
-rw-r--r--security/courier-authlib/files/patch-Makefile.in225
-rw-r--r--security/courier-authlib/files/patch-authdaemond.in8
-rw-r--r--security/courier-authlib/files/patch-authdaemonrc.in45
-rw-r--r--security/courier-authlib/files/patch-configure (renamed from security/courier-authlib/files/patch-mysql)74
-rw-r--r--security/courier-authlib/files/patch-ldap13
-rw-r--r--security/courier-authlib/files/patch-liblog::Makefile.in13
-rw-r--r--security/courier-authlib/files/patch-userdb::Makefile.in13
-rw-r--r--security/courier-authlib/files/pkg-deinstall.in28
-rw-r--r--security/courier-authlib/files/pkg-install.in40
11 files changed, 455 insertions, 126 deletions
diff --git a/security/courier-authlib/files/courier-authdaemond.sh b/security/courier-authlib/files/courier-authdaemond.sh
deleted file mode 100644
index c13b5d921c40..000000000000
--- a/security/courier-authlib/files/courier-authdaemond.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/sh
-#
-# An rc.subr-style startup script for courier-authdaemond service.
-
-# PROVIDE: courier_authdaemond
-# REQUIRE: LOGIN
-# KEYWORD: FreeBSD shutdown
-
-# Define these courier_authdaemond_* variables in one of these files:
-# /etc/rc.conf
-# /etc/rc.conf.local
-# /etc/rc.conf.d/courier_authdaemond
-#
-# DO NOT CHANGE THESE DEFAULT VALUES HERE
-
-courier_authdaemond_enable=${courier_authdaemond_enable-"NO"}
-
-. %%RC_SUBR%%
-
-name="courier_authdaemond"
-rcvar=`set_rcvar`
-command="%%PREFIX%%/sbin/authdaemond"
-
-start_cmd="authdaemond_cmd start"
-stop_cmd="authdaemond_cmd stop"
-restart_cmd="authdaemond_cmd stop && authdaemond_cmd start"
-rundir=/var/run/authdaemond
-pidfile="${rundir}/pid"
-procname="%%PREFIX%%/sbin/courierlogger"
-
-load_rc_config $name
-
-authdaemond_cmd () {
- case $1 in
- start)
- if [ ! -d "${rundir}" ] ; then
- mkdir -p -m 0750 "${rundir}" && chown %%MAILUSER%%:%%MAILGROUP%% "${rundir}"
- if [ $? -ne 0 ] ; then
- echo "creating ${rundir} with the correct permissions was not possible!"
- return 1
- fi
- fi
- echo "Starting ${name}."
- ${command} start
- ;;
- stop)
- echo "Stopping ${name}."
- ${command} stop
- if [ $? -eq 0 ] ; then
- [ -f "${pidfile}" ] && rm -f "$pidfile"
- [ -f "${pidfile}.lock" ] && rm -f "${pidfile}.lock"
- [ -S "${rundir}/socket" ] && rm -f "${rundir}/socket"
- return 0
- fi
- ;;
- esac
-}
-
-run_rc_command "$1"
-
diff --git a/security/courier-authlib/files/courier-authdaemond.sh.in b/security/courier-authlib/files/courier-authdaemond.sh.in
new file mode 100644
index 000000000000..b50f491d60e6
--- /dev/null
+++ b/security/courier-authlib/files/courier-authdaemond.sh.in
@@ -0,0 +1,62 @@
+#!/bin/sh
+#
+# An rc.subr-style startup script for courier-authdaemond service.
+
+# PROVIDE: courier_authdaemond
+# REQUIRE: DAEMON
+# BEFORE: mail imap
+# KEYWORD: FreeBSD shutdown
+
+prefix="%%PREFIX%%"
+exec_prefix="${prefix}"
+sysconfdir="${prefix}/etc/authlib"
+sbindir="${exec_prefix}/sbin"
+bindir="${exec_prefix}/bin"
+libdir="${prefix}/lib/courier-authlib"
+libexecdir="${prefix}/libexec/courier-authlib"
+authdaemonvar="%%AUTHDAEMONVAR%%"
+
+# Define these courier_authdaemond_* variables in one of these files:
+# /etc/rc.conf
+# /etc/rc.conf.local
+# /etc/rc.conf.d/courier_authdaemond
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+
+courier_authdaemond_enable=${courier_authdaemond_enable-"NO"} # Run courier-authdaemond (YES/NO).
+
+. %%RC_SUBR%%
+
+name="courier_authdaemond"
+rcvar=`set_rcvar`
+
+command="${sbindir}/authdaemond"
+procname="${sbindir}/courierlogger"
+pidfile="${authdaemonvar}/pid"
+socket="${authdaemonvar}/socket"
+
+start_precmd="${name}_prestart"
+start_cmd="${command} start"
+stop_precmd="echo 'Stopping ${name}.'"
+stop_cmd="${command} stop"
+stop_postcmd="rm -f ${pidfile} ${pidfile}.lock ${socket}"
+restart_cmd="${start_cmd} && ${stop_cmd}"
+required_files="${sysconfdir}/authdaemonrc"
+
+courier_authdaemond_prestart()
+{
+ if [ ! -d "${authdaemonvar}" ] ; then
+ install -o %%MAILOWN%% -g %%MAILGRP%% -m 0750 -d "${authdaemonvar}"
+ if [ $? -ne 0 ] ; then
+ echo "Creating ${authdaemonvar} with the correct permissions was not possible!"
+ return 1
+ fi
+ fi
+ /sbin/ldconfig -m "${libdir}"
+ echo "Starting ${name}."
+}
+
+load_rc_config $name
+run_rc_command "$1"
+
+
diff --git a/security/courier-authlib/files/patch-Makefile.in b/security/courier-authlib/files/patch-Makefile.in
index 03046540f679..466069fd96f9 100644
--- a/security/courier-authlib/files/patch-Makefile.in
+++ b/security/courier-authlib/files/patch-Makefile.in
@@ -1,13 +1,212 @@
---- Makefile.in.orig Sat Dec 18 17:25:16 2004
-+++ Makefile.in Sat Dec 18 17:27:50 2004
-@@ -992,8 +992,8 @@
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-- echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
-- $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \
-+ echo " %%INSTALL_MAN%% '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
-+ %%INSTALL_MAN%% "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \
- done
- uninstall-man3:
- @$(NORMAL_UNINSTALL)
+--- Makefile.in.orig Tue Mar 1 03:22:03 2005
++++ Makefile.in Sun Apr 24 14:07:54 2005
+@@ -46,10 +46,10 @@
+ PRE_UNINSTALL = :
+ POST_UNINSTALL = :
+ host_triplet = @host@
+-sbin_PROGRAMS = authtest$(EXEEXT) authenumerate$(EXEEXT)
+-bin_PROGRAMS = courierauthconfig$(EXEEXT)
+-noinst_PROGRAMS = authdaemontest$(EXEEXT) authmksock$(EXEEXT) \
+- authdaemondprog$(EXEEXT)
++@HAVE_BASE_TRUE@sbin_PROGRAMS = authtest$(EXEEXT) authenumerate$(EXEEXT)
++@HAVE_BASE_TRUE@bin_PROGRAMS = courierauthconfig$(EXEEXT)
++@HAVE_BASE_TRUE@noinst_PROGRAMS = authdaemontest$(EXEEXT) authmksock$(EXEEXT) \
++@HAVE_BASE_TRUE@ authdaemondprog$(EXEEXT)
+ DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/README.authdebug.html.in $(srcdir)/authdaemond.in \
+@@ -74,7 +74,7 @@
+ README.authdebug.html dbobj.h authmigrate courier-authlib.spec \
+ courier-authlib.sysvinit userdb-test-cram-md5.pl
+ am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(includedir)"
+-pkglibLTLIBRARIES_INSTALL = $(INSTALL)
++pkglibLTLIBRARIES_INSTALL = $(INSTALL) -m 0444
+ LTLIBRARIES = $(pkglib_LTLIBRARIES)
+ am__DEPENDENCIES_1 = libcourierauthcommon.la
+ am_libauthcustom_la_OBJECTS = authcustom.lo preauthcustom.lo
+@@ -426,8 +426,14 @@
+ userdb = @userdb@
+ vpopmail_home = @vpopmail_home@
+ AUTOMAKE_OPTIONS = dist-bzip2
+-SUBDIRS = libltdl @DBSUBDIR@ md5 sha1 libhmac numlib makedat userdb rfc822 random128 liblock liblog
+-DIST_SUBDIRS = libltdl gdbmobj bdbobj md5 sha1 libhmac numlib makedat userdb rfc822 random128 liblock liblog
++SUBDIRS = libltdl @DBSUBDIR@ md5 sha1 libhmac numlib
++@HAVE_USERDB_TRUE@SUBDIRS += makedat userdb
++SUBDIRS += rfc822 random128
++@HAVE_BASE_TRUE@SUBDIRS += liblock liblog
++DIST_SUBDIRS = libltdl gdbmobj bdbobj md5 sha1 libhmac numlib
++@HAVE_USERDB_TRUE@DIST_SUBDIRS+= makedat userdb
++DIST_SUBDIRS += rfc822 random128
++@HAVE_BASE_TRUE@DIST_SUBDIRS += liblock liblog
+ INCLUDES = $(LTDLINCL)
+ modules = @LIBAUTHUSERDB@ \
+ @LIBAUTHPAM@ @LIBAUTHPWD@ @LIBAUTHSHADOW@ \
+@@ -436,9 +442,11 @@
+
+ pkglibexecdir = $(libexecdir)/courier-authlib
+ pkglibexec_SCRIPTS = authsystem.passwd
+-pkglib_LTLIBRARIES = libcourierauth.la \
+- libcourierauthsasl.la libcourierauthsaslclient.la \
+- libcourierauthcommon.la $(modules)
++@HAVE_BASE_TRUE@pkglib_LTLIBRARIES = libcourierauth.la \
++@HAVE_BASE_TRUE@ libcourierauthsasl.la libcourierauthsaslclient.la \
++@HAVE_BASE_TRUE@ libcourierauthcommon.la $(modules)
++
++@HAVE_BASE_FALSE@pkglib_LTLIBRARIES = $(modules)
+
+ sbin_SCRIPTS = authdaemond
+ EXTRA_LTLIBRARIES = libauthuserdb.la \
+@@ -590,8 +598,8 @@
+
+ libcourierauthsaslclient_la_DEPENDENCIES = $(commonlibs)
+ libcourierauthsaslclient_la_LDFLAGS = $(commonlibs:%=-Wl,%) -export-symbols-regex '^auth_sasl_client$$'
+-include_HEADERS = courier_auth_config.h courierauth.h courierauthsasl.h \
+- courierauthsaslclient.h courierauthdebug.h
++@HAVE_BASE_TRUE@include_HEADERS = courier_auth_config.h courierauth.h courierauthsasl.h \
++@HAVE_BASE_TRUE@ courierauthsaslclient.h courierauthdebug.h
+
+ courierauthconfig_SOURCES = authinfo.c
+ authtest_SOURCES = authtest.c
+@@ -1356,15 +1364,21 @@
+
+ info-am:
+
+-install-data-am: install-includeHEADERS install-man
+- @$(NORMAL_INSTALL)
+- $(MAKE) $(AM_MAKEFLAGS) install-data-hook
++@HAVE_BASE_TRUE@install-data-am: install-includeHEADERS install-man
++@HAVE_BASE_TRUE@ @$(NORMAL_INSTALL)
++@HAVE_BASE_TRUE@ $(MAKE) $(AM_MAKEFLAGS) install-data-hook
++
++@HAVE_BASE_FALSE@install-data-am:
++@HAVE_BASE_FALSE@ $(MAKE) $(AM_MAKEFLAGS) install-data-hook
++
++@HAVE_BASE_TRUE@install-exec-am: install-binPROGRAMS install-pkglibLTLIBRARIES \
++@HAVE_BASE_TRUE@ install-pkglibexecSCRIPTS install-sbinPROGRAMS \
++@HAVE_BASE_TRUE@ install-sbinSCRIPTS
++@HAVE_BASE_TRUE@ @$(NORMAL_INSTALL)
++@HAVE_BASE_TRUE@ $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+
+-install-exec-am: install-binPROGRAMS install-pkglibLTLIBRARIES \
+- install-pkglibexecSCRIPTS install-sbinPROGRAMS \
+- install-sbinSCRIPTS
+- @$(NORMAL_INSTALL)
+- $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
++@HAVE_BASE_FALSE@install-exec-am: install-pkglibLTLIBRARIES
++@HAVE_BASE_FALSE@ $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+
+ install-info: install-info-recursive
+
+@@ -1473,6 +1487,19 @@
+ @HAVE_LDAP_FALSE@uninstall-authldaprc:
+ @HAVE_LDAP_FALSE@ @:
+
++@HAVE_LDAP_TRUE@install-ldapschema:
++@HAVE_LDAP_TRUE@ $(mkinstalldirs) ${sysconfdir}/openldap/schema
++@HAVE_LDAP_TRUE@ $(INSTALL_DATA) -m 0444 $(srcdir)/authldap.schema \
++@HAVE_LDAP_TRUE@ ${sysconfdir}/openldap/schema/authldap.schema.default
++@HAVE_LDAP_TRUE@ if test ! -f ${sysconfdir}/openldap/schema/authldap.schema ; then \
++@HAVE_LDAP_TRUE@ $(INSTALL_DATA) -m 0444 $(srcdir)/authldap.schema \
++@HAVE_LDAP_TRUE@ ${sysconfdir}/openldap/schema/authldap.schema ; \
++@HAVE_LDAP_TRUE@ fi
++
++@HAVE_LDAP_FALSE@install-ldapschema:
++@HAVE_LDAP_FALSE@ @:
++
++
+ authldaprc.h:
+ echo "#define AUTHLDAPRC \"@authldaprc@\"" >authldaprc.h
+
+@@ -1497,16 +1524,22 @@
+ authmysqlrc.h:
+ echo "#define AUTHMYSQLRC \"@authmysqlrc@\"" >authmysqlrc.h
+
+-install-authdaemonrc:
+- $(mkinstalldirs) $(DESTDIR)`dirname @authdaemonrc@`
+- sed 's/@ALLMODULES@/$(modules:lib%.la=%)/' <authdaemonrc >authdaemonrc.tmp
+- $(INSTALL_DATA) -m 660 authdaemonrc.tmp $(DESTDIR)@authdaemonrc@.dist
+- rm -f authdaemonrc.tmp
+- -chown @mailuser@ $(DESTDIR)@authdaemonrc@.dist
+- -chgrp @mailgroup@ $(DESTDIR)@authdaemonrc@.dist
++@HAVE_BASE_TRUE@install-authdaemonrc:
++@HAVE_BASE_TRUE@ $(mkinstalldirs) $(DESTDIR)`dirname @authdaemonrc@`
++@HAVE_BASE_TRUE@ sed 's/@ALLMODULES@/$(modules:lib%.la=%)/' <authdaemonrc >authdaemonrc.tmp
++@HAVE_BASE_TRUE@ $(INSTALL_DATA) -m 660 authdaemonrc.tmp $(DESTDIR)@authdaemonrc@.dist
++@HAVE_BASE_TRUE@ rm -f authdaemonrc.tmp
++@HAVE_BASE_TRUE@ -chown @mailuser@ $(DESTDIR)@authdaemonrc@.dist
++@HAVE_BASE_TRUE@ -chgrp @mailgroup@ $(DESTDIR)@authdaemonrc@.dist
++
++@HAVE_BASE_FALSE@install-authdaemonrc:
++@HAVE_BASE_FALSE@ @:
++
++@HAVE_BASE_TRUE@uninstall-authdaemonrc:
++@HAVE_BASE_TRUE@ rm -f $(DESTDIR)@authdaemonrc@.dist
+
+-uninstall-authdaemonrc:
+- rm -f $(DESTDIR)@authdaemonrc@.dist
++@HAVE_BASE_FALSE@uninstall-authdaemonrc:
++@HAVE_BASE_FALSE@ @:
+
+ authdaemonrc.h:
+ echo "#define AUTHDAEMONRC \"@authdaemonrc@\"" >authdaemonrc.h
+@@ -1549,18 +1582,18 @@
+ # automake still a bit stupid...
+
+ install-data-hook: install-authdaemonrc install-authpgsqlrc \
+- install-authldaprc install-authmysqlrc
++ install-authldaprc install-ldapschema install-authmysqlrc
+ :
+
+ install-exec-hook:
+- $(mkinstalldirs) $(DESTDIR)$(bindir)
+- $(mkinstalldirs) $(DESTDIR)$(sbindir)
+- $(mkinstalldirs) $(DESTDIR)$(pkglibexecdir)
+- $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) authdaemondprog $(DESTDIR)$(pkglibexecdir)/authdaemond
+- $(mkinstalldirs) $(DESTDIR)@authdaemonvar@
+- chmod 750 $(DESTDIR)@authdaemonvar@
+- -chown @mailuser@ $(DESTDIR)@authdaemonvar@
+- -chgrp @mailgroup@ $(DESTDIR)@authdaemonvar@
++@HAVE_BASE_TRUE@ $(mkinstalldirs) $(DESTDIR)$(bindir)
++@HAVE_BASE_TRUE@ $(mkinstalldirs) $(DESTDIR)$(sbindir)
++@HAVE_BASE_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pkglibexecdir)
++@HAVE_BASE_TRUE@ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) authdaemondprog $(DESTDIR)$(pkglibexecdir)/authdaemond
++@HAVE_BASE_TRUE@ $(mkinstalldirs) $(DESTDIR)@authdaemonvar@
++@HAVE_BASE_TRUE@ chmod 750 $(DESTDIR)@authdaemonvar@
++@HAVE_BASE_TRUE@ -chown @mailuser@ $(DESTDIR)@authdaemonvar@
++@HAVE_BASE_TRUE@ -chgrp @mailgroup@ $(DESTDIR)@authdaemonvar@
+ test "@LIBAUTHUSERDB@" = "" && exit 0 ;\
+ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) makedat/makedatprog \
+ $(DESTDIR)$(pkglibexecdir)/makedatprog ; \
+@@ -1578,7 +1611,7 @@
+ $(DESTDIR)$(sbindir)/userdb-test-cram-md5
+
+ uninstall-hook: uninstall-authldaprc uninstall-authdaemonrc uninstall-authmysqlrc uninstall-authpgsqlrc
+- rm -f $(DESTDIR)$(pkglibexecdir)/authdaemond
++@HAVE_BASE_TRUE@ rm -f $(DESTDIR)$(pkglibexecdir)/authdaemond
+ test "@AUTHUSERDB@" = "" && exit 0 ;\
+ rm -f $(DESTDIR)$(pkglibexecdir)/makedatprog \
+ $(DESTDIR)$(sbindir)/vchkpw2userdb \
+@@ -1592,7 +1625,7 @@
+ CONFIG_FILES=authlib.html CONFIG_HEADERS= $(SHELL) ./config.status
+
+ authlib.3: authlib.3.in
+- CONFIG_FILES=authlib.3 CONFIG_HEADERS= $(SHELL) ./config.status
++@HAVE_BASE_TRUE@ CONFIG_FILES=authlib.3 CONFIG_HEADERS= $(SHELL) ./config.status
+
+ @HAVE_SGML_TRUE@authlib.html.in: authlib.sgml docbook/sgml2html
+ @HAVE_SGML_TRUE@ docbook/sgml2html authlib.sgml authlib.html.in
+@@ -1654,10 +1687,10 @@
+ @SHELL@ authmigrate
+
+ install-configure:
+- test -f $(DESTDIR)@authdaemonrc@.dist && @SYSCONFTOOL@ $(DESTDIR)@authdaemonrc@.dist || true
+- test -f $(DESTDIR)@authmysqlrc@.dist && @SYSCONFTOOL@ $(DESTDIR)@authmysqlrc@.dist || true
+- test -f $(DESTDIR)@authpgsqlrc@.dist && @SYSCONFTOOL@ $(DESTDIR)@authpgsqlrc@.dist || true
+- test -f $(DESTDIR)@authldaprc@.dist && @SYSCONFTOOL@ $(DESTDIR)@authldaprc@.dist || true
++@HAVE_BASE_TRUE@ test -f $(DESTDIR)@authdaemonrc@.dist && @SYSCONFTOOL@ $(DESTDIR)@authdaemonrc@.dist || true ; chmod 0600 $(DESTDIR)@authdaemonrc@
++@HAVE_AUTHMYSQL_TRUE@ test -f $(DESTDIR)@authmysqlrc@.dist && @SYSCONFTOOL@ $(DESTDIR)@authmysqlrc@.dist || true ; chmod 0600 $(DESTDIR)@authmysqlrc@
++@HAVE_AUTHPGSQL_TRUE@ test -f $(DESTDIR)@authpgsqlrc@.dist && @SYSCONFTOOL@ $(DESTDIR)@authpgsqlrc@.dist || true ; chmod 0600 $(DESTDIR)@authpgsqlrc@
++@HAVE_LDAP_TRUE@ test -f $(DESTDIR)@authldaprc@.dist && @SYSCONFTOOL@ $(DESTDIR)@authldaprc@.dist || true ; chmod 0600 $(DESTDIR)@authldaprc@
+
+ # For maintainer's use only
+
diff --git a/security/courier-authlib/files/patch-authdaemond.in b/security/courier-authlib/files/patch-authdaemond.in
new file mode 100644
index 000000000000..abfec18c3f42
--- /dev/null
+++ b/security/courier-authlib/files/patch-authdaemond.in
@@ -0,0 +1,8 @@
+--- authdaemond.in.orig Wed Oct 20 20:10:49 2004
++++ authdaemond.in Wed Oct 20 20:10:49 2004
+@@ -15,4 +15,4 @@
+ set -a
+ . @authdaemonrc@
+
+-exec ${sbindir}/courierlogger -pid=@authdaemonvar@/pid -$1 @libexecdir@/courier-authlib/authdaemond
++exec ${sbindir}/courierlogger -facility=${subsystem:-mail} -pid=@authdaemonvar@/pid -$1 @libexecdir@/courier-authlib/authdaemond
diff --git a/security/courier-authlib/files/patch-authdaemonrc.in b/security/courier-authlib/files/patch-authdaemonrc.in
new file mode 100644
index 000000000000..e18ac86509df
--- /dev/null
+++ b/security/courier-authlib/files/patch-authdaemonrc.in
@@ -0,0 +1,45 @@
+--- authdaemonrc.in.orig Tue Nov 9 19:42:04 2004
++++ authdaemonrc.in Tue Nov 9 19:42:04 2004
+@@ -59,6 +59,42 @@
+
+ authdaemonvar=@authdaemonvar@
+
++##NAME: subsystem:0
++#
++# The syslog facility uses subsystem to determine which log messages
++# are recorded in which log files.
++#
++# The currently defined subsystems are:
++#
++# o auth
++# o authpriv
++# o console
++# o cron
++# o daemon
++# o ftp
++# o kern
++# o lpr
++# o mail
++# o news
++# o security
++# o user
++# o uucp
++# o local0
++# o local1
++# o local2
++# o local3
++# o local4
++# o local5
++# o local6
++# o local7
++#
++# Note: Not all of the above facility names are implemented on
++# every system. Check your system's syslog documentation for
++# information on which facility names are allowed, and which log
++# files record the corresponding messages for each facility.
++
++subsystem=mail
++
+ ##NAME: DEBUG_LOGIN:0
+ #
+ # Dump additional diagnostics to syslog
diff --git a/security/courier-authlib/files/patch-mysql b/security/courier-authlib/files/patch-configure
index 17f6042e3a47..5a5cecf29f35 100644
--- a/security/courier-authlib/files/patch-mysql
+++ b/security/courier-authlib/files/patch-configure
@@ -1,6 +1,41 @@
---- configure.orig Sat Dec 18 17:28:54 2004
-+++ configure Sat Dec 18 17:30:51 2004
-@@ -23821,9 +23821,9 @@
+--- configure.orig Tue Mar 1 03:22:02 2005
++++ configure Fri Apr 22 19:13:43 2005
+@@ -21084,8 +21084,12 @@
+
+ if test "$doauthuserdb" = "no"
+ then
++ HAVE_USERDB_TRUE='#'
++ HAVE_USERDB_FALSE=''
+ AUTHUSERDB=""
+ else
++ HAVE_USERDB_TRUE=''
++ HAVE_USERDB_FALSE='#'
+ AUTHUSERDB="authuserdb"
+ LIBAUTHUSERDB="libauthuserdb.la"
+
+@@ -22778,7 +22782,21 @@
+
+
+
++if test "${with_base+set}" = set; then
++ withval="$with_base"
++ dobase="$withval"
++else
++ dobase="yes"
++fi;
+
++if test "$dobase" = "no"; then
++ HAVE_BASE_TRUE='#'
++ HAVE_BASE_FALSE=''
++else
++ HAVE_BASE_TRUE=''
++ HAVE_BASE_FALSE='#'
++fi
++
+
+
+ # Check whether --with-authpwd or --without-authpwd was given.
+@@ -24111,9 +24129,9 @@
if test "$doauthmysql" = ""
then
LIBS="$MYSQL_LIBS $LIBS"
@@ -13,7 +48,7 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-@@ -23832,12 +23832,12 @@
+@@ -24122,12 +24140,12 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
@@ -29,7 +64,7 @@
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
-@@ -23847,7 +23847,7 @@
+@@ -24137,7 +24155,7 @@
# include <assert.h>
#endif
@@ -38,7 +73,7 @@
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
-@@ -23856,14 +23856,14 @@
+@@ -24146,14 +24164,14 @@
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
@@ -56,7 +91,7 @@
#endif
#ifdef __cplusplus
}
-@@ -23872,7 +23872,7 @@
+@@ -24162,7 +24180,7 @@
int
main ()
{
@@ -65,7 +100,7 @@
;
return 0;
}
-@@ -23899,19 +23899,19 @@
+@@ -24189,19 +24207,19 @@
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -90,7 +125,7 @@
doauthmysql="yes"
fi
-@@ -24021,9 +24021,9 @@
+@@ -24311,9 +24329,9 @@
else
saveLIBS="$LIBS"
LIBS="$MYSQL_LIBS $LIBS"
@@ -103,7 +138,7 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-@@ -24032,12 +24032,12 @@
+@@ -24322,12 +24340,12 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
@@ -119,7 +154,7 @@
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
-@@ -24047,7 +24047,7 @@
+@@ -24337,7 +24355,7 @@
# include <assert.h>
#endif
@@ -128,7 +163,7 @@
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
-@@ -24056,14 +24056,14 @@
+@@ -24346,14 +24364,14 @@
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
@@ -146,7 +181,7 @@
#endif
#ifdef __cplusplus
}
-@@ -24072,7 +24072,7 @@
+@@ -24362,7 +24380,7 @@
int
main ()
{
@@ -155,7 +190,7 @@
;
return 0;
}
-@@ -24099,19 +24099,19 @@
+@@ -24389,19 +24407,19 @@
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -180,3 +215,14 @@
LIBAUTHMYSQL="libauthmysql.la"
HAVE_AUTHMYSQL=1
else
+@@ -26671,6 +26689,10 @@
+ s,@subdirs@,$subdirs,;t t
+ s,@LIBOBJS@,$LIBOBJS,;t t
+ s,@LTLIBOBJS@,$LTLIBOBJS,;t t
++s,@HAVE_BASE_TRUE@,$HAVE_BASE_TRUE,;t t
++s,@HAVE_BASE_FALSE@,$HAVE_BASE_FALSE,;t t
++s,@HAVE_USERDB_TRUE@,$HAVE_USERDB_TRUE,;t t
++s,@HAVE_USERDB_FALSE@,$HAVE_USERDB_FALSE,;t t
+ CEOF
+
+ _ACEOF
diff --git a/security/courier-authlib/files/patch-ldap b/security/courier-authlib/files/patch-ldap
deleted file mode 100644
index 1cae12242d67..000000000000
--- a/security/courier-authlib/files/patch-ldap
+++ /dev/null
@@ -1,13 +0,0 @@
---- configure.orig Wed Mar 3 05:54:13 2004
-+++ configure Tue Mar 16 19:36:40 2004
-@@ -1268,6 +1268,10 @@
- { (exit 1); exit 1; }; }
- fi
-
-+CFLAGS="$CFLAGS -I%%LOCALBASE%%/include"
-+CPPFLAGS="$CPPFLAGS -I%%LOCALBASE%%/include"
-+LDFLAGS="-L%%LOCALBASE%%/lib $LDFLAGS"
-+
- ac_ext=c
- ac_cpp='$CPP $CPPFLAGS'
- ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
diff --git a/security/courier-authlib/files/patch-liblog::Makefile.in b/security/courier-authlib/files/patch-liblog::Makefile.in
deleted file mode 100644
index 301ba9c2efba..000000000000
--- a/security/courier-authlib/files/patch-liblog::Makefile.in
+++ /dev/null
@@ -1,13 +0,0 @@
---- liblog/Makefile.in.orig Sat Dec 18 18:31:57 2004
-+++ liblog/Makefile.in Sat Dec 18 18:32:18 2004
-@@ -346,8 +346,8 @@
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-- echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
-- $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
-+ echo " %%INSTALL_MAN%% '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
-+ %%INSTALL_MAN%% "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
- done
- uninstall-man1:
- @$(NORMAL_UNINSTALL)
diff --git a/security/courier-authlib/files/patch-userdb::Makefile.in b/security/courier-authlib/files/patch-userdb::Makefile.in
deleted file mode 100644
index c4c62ce68aa3..000000000000
--- a/security/courier-authlib/files/patch-userdb::Makefile.in
+++ /dev/null
@@ -1,13 +0,0 @@
---- userdb/Makefile.in.orig Sat Dec 18 18:33:08 2004
-+++ userdb/Makefile.in Sat Dec 18 18:34:09 2004
-@@ -378,8 +378,8 @@
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-- echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
-- $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \
-+ echo " %%INSTALL_MAN%% '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
-+ %%INSTALL_MAN%% "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \
- done
- uninstall-man8:
- @$(NORMAL_UNINSTALL)
diff --git a/security/courier-authlib/files/pkg-deinstall.in b/security/courier-authlib/files/pkg-deinstall.in
new file mode 100644
index 000000000000..db7da5cfbd91
--- /dev/null
+++ b/security/courier-authlib/files/pkg-deinstall.in
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
+LOCALSTATEDIR=${LOCALSTATEDIR:=/var/spool/courier}
+
+USER=%%MAILOWN%%
+GROUP=%%MAILGRP%%
+
+if [ ":$2" = ":POST-DEINSTALL" ]; then
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ echo ""
+ echo "Warning: Removing user courier will also delete any"
+ echo " undelivered mail in the mail queue directories!!!"
+ echo " Do *not* do it if you're upgrading and would like"
+ echo " courier to continue trying to deliver this mail."
+ echo ""
+ else
+ AFFIRM='-y'
+ fi
+ [ -d "$LOCALSTATEDIR" ] && /usr/sbin/chown -Rh ${USER}:${GROUP} "$LOCALSTATEDIR"
+ /usr/sbin/rmuser ${AFFIRM} ${USER} 2> /dev/null
+ [ -d "$LOCALSTATEDIR" ] && /usr/sbin/chown root:wheel "$LOCALSTATEDIR"
+fi
+
+exit 0
diff --git a/security/courier-authlib/files/pkg-install.in b/security/courier-authlib/files/pkg-install.in
new file mode 100644
index 000000000000..9e7061d55316
--- /dev/null
+++ b/security/courier-authlib/files/pkg-install.in
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
+
+USER=%%MAILOWN%%; UID=%%MAILUID%%
+GROUP=%%MAILGRP%%; GID=%%MAILGID%%
+
+if [ ":$2" = ":PRE-INSTALL" ]; then
+ if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then
+ echo "You already have a group \"${GROUP}\", so I will use it."
+ else
+ if /usr/sbin/pw groupadd ${GROUP} -g ${GID} -h -
+ then
+ echo "Added group \"${GROUP}\"."
+ else
+ echo "Adding group \"${GROUP}\" failed..."
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+
+ if /usr/sbin/pw user show "${USER}" 2>/dev/null; then
+ echo "You already have a user \"${USER}\", so I will use it."
+ else
+ if /usr/sbin/pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
+ -d /var/spool/courier \
+ -s /sbin/nologin \
+ -c "Courier Mail System"
+ then
+ echo "Added user \"${USER}\"."
+ else
+ echo "Adding user \"${USER}\" failed..."
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+fi