From 0e333c05cada796fa75ceebdfc4b3e20d48f87ec Mon Sep 17 00:00:00 2001
From: Clinton Ebadi
Date: Sat, 15 Feb 2020 22:12:26 -0500
Subject: [PATCH] Import Upstream version 0.69.0
---
ChangeLog | 65 +
Makefile.am | 60 +-
Makefile.in | 186 +-
README_authlib.html.in | 5 +-
aclocal.m4 | 121 +-
auth.h | 11 -
auth_enumerate.3 | 8 +-
auth_generic.3 | 8 +-
auth_getoption.3 | 8 +-
auth_getuserinfo.3 | 8 +-
auth_login.3 | 8 +-
auth_mkhomedir.3 | 8 +-
auth_passwd.3 | 8 +-
auth_sasl.3 | 11 +-
authconfigfile.cpp | 263 ++
authconfigfile.h | 101 +
authcustom.c | 5 +-
authdaemond.c | 40 +-
authdaemondcpp.cpp | 31 +
authdaemonrc.in | 2 +-
authgetconfig.c | 446 ---
authldap.c | 18 +-
authldap.h | 13 +
authldaplib.c | 2067 ------------
authldaplib.cpp | 1660 ++++++++++
authldaprc | 20 +-
authlib.3.in | 8 +-
authmysql.c => authmysql.cpp | 148 +-
authmysql.h | 42 +-
authmysqllib.c | 809 -----
authmysqllib.cpp | 810 +++++
authmysqlrc | 30 +-
authpasswd.1 | 8 +-
authpgsql.c | 123 +-
authpgsql.h | 23 +-
authpgsqllib.c | 1149 -------
authpgsqllib.cpp | 938 ++++++
authpgsqlrc | 34 +-
authsasl.c | 2 +-
authsaslclient.h | 8 +-
authsqlite.c => authsqlite.cpp | 163 +-
authsqlite.h | 68 +-
authsqlitelib.c | 637 ----
authsqlitelib.cpp | 627 ++++
authsqliterc | 9 +-
authtest.1 | 8 +-
authuserdb.c | 2 +-
authuserdbpwd.c | 2 +-
checkpassword.c | 14 +-
compile | 11 +-
config.guess | 354 +--
config.sub | 88 +-
configure | 5440 ++++++++++++++++++++++++++++----
configure.ac | 22 +-
courier-authlib.lpspec | 2 +-
courier-authlib.spec | 27 +-
courier-authlib.spec.in | 25 +-
courier_auth_config.h | 5 +-
courier_auth_config.h.in | 3 +
courierauth.h | 39 +
cramlib.c | 3 +-
cramlib.h | 48 -
cryptpassword.c | 18 +-
depcomp | 43 +-
liblog/Makefile.in | 12 +-
liblog/aclocal.m4 | 44 +-
libs/bdbobj/Makefile.in | 12 +-
libs/bdbobj/aclocal.m4 | 44 +-
libs/gdbmobj/Makefile.in | 12 +-
libs/gdbmobj/aclocal.m4 | 44 +-
libs/libhmac/Makefile.in | 12 +-
libs/libhmac/aclocal.m4 | 44 +-
libs/liblock/Makefile.am | 2 +-
libs/liblock/Makefile.in | 14 +-
libs/liblock/aclocal.m4 | 44 +-
libs/liblock/lockmail.1 | 11 +-
libs/makedat/Makefile.in | 12 +-
libs/makedat/aclocal.m4 | 44 +-
libs/makedat/makedat.in | 7 +-
libs/md5/Makefile.in | 12 +-
libs/md5/aclocal.m4 | 44 +-
libs/numlib/Makefile.in | 12 +-
libs/numlib/aclocal.m4 | 44 +-
libs/random128/Makefile.in | 12 +-
libs/random128/aclocal.m4 | 44 +-
libs/rfc822/Makefile.am | 2 +-
libs/rfc822/Makefile.in | 14 +-
libs/rfc822/aclocal.m4 | 321 +-
libs/rfc822/configure | 15 -
libs/rfc822/configure.ac | 15 -
libs/rfc822/rfc2047.c | 12 +-
libs/rfc822/rfc2047u.c | 6 +-
libs/sha1/Makefile.in | 12 +-
libs/sha1/aclocal.m4 | 44 +-
ltmain.sh | 4 +-
missing | 8 +-
preauthmysql.c | 54 -
preauthmysql.cpp | 53 +
preauthpgsql.c | 54 -
preauthsqlite.c | 51 -
userdb/Makefile.in | 12 +-
userdb/aclocal.m4 | 44 +-
userdb/makeuserdb.8.in | 8 +-
userdb/userdb.8.in | 8 +-
userdb/userdbpw.8.in | 8 +-
userdb/userdbpw.c | 12 +-
106 files changed, 10879 insertions(+), 7375 deletions(-)
create mode 100644 authconfigfile.cpp
create mode 100644 authconfigfile.h
create mode 100644 authdaemondcpp.cpp
delete mode 100644 authgetconfig.c
delete mode 100644 authldaplib.c
create mode 100644 authldaplib.cpp
rename authmysql.c => authmysql.cpp (60%)
delete mode 100644 authmysqllib.c
create mode 100644 authmysqllib.cpp
delete mode 100644 authpgsqllib.c
create mode 100644 authpgsqllib.cpp
rename authsqlite.c => authsqlite.cpp (56%)
rewrite authsqlite.h (64%)
delete mode 100644 authsqlitelib.c
create mode 100644 authsqlitelib.cpp
delete mode 100644 cramlib.h
delete mode 100644 preauthmysql.c
create mode 100644 preauthmysql.cpp
delete mode 100644 preauthpgsql.c
delete mode 100644 preauthsqlite.c
diff --git a/ChangeLog b/ChangeLog
index 85a02a6..4d32c65 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,68 @@
+0.69.0
+
+2018-08-16 Sam Varshavchik
+
+ * authdaemond.c: set FD_CLOEXEC on socket file descriptors, to avoid
+ leaks to child processes.
+
+2018-05-25 Sam Varshavchik
+
+ * authldaplib.cpp: improve automatic reconnection logic to the LDAP
+ server.
+
+2017-11-27 Sam Varshavchik
+
+ * rpm packaging fixes.
+
+2017-09-08 Sam Varshavchik
+
+ * courier-authlib.spec.in: Fix several problems with the package
+ scripts. Remove 'authdaemond stop' from %preun. Add explicit
+ systemctl daemon-reload to %post and %postun
+
+2017-07-23 Sam Varshavchik
+
+ * authsaslclient.h (SASL_LIST): Reorder SASL methods, strongest
+ first.
+
+0.68.0
+
+2017-03-16 Sam Varshavchik
+
+ * configure.ac: Rebuild against updated courier-unicode API.
+
+0.67.0
+
+2017-01-27 Sam Varshavchik
+
+ * courierauth.h: Move declarations from cramlib.h into courierauth.h,
+ exporting them as part of the public API.
+
+2016-09-04 Giovanni Bechis
+
+ * userdb/userdbpw.c (main): Use bcrypt_gensalt() on OpenBSD
+
+2016-05-07 Sam Varshavchik
+
+ * authsqlite, authmysql, authpgsql: Rewrite these modules in
+ modern C++. Autodetect and automatically reload the configuration
+ file when it's changed, no server restart is needed.
+
+2016-03-20 Giovanni Bechis
+
+ * checkpassword.c (do_authcheckpassword): Check for a null return
+ value from crypt().
+
+2016-01-17 Sam Varshavchik
+
+ * authldaplib.cpp (operator): Fix compilation warning.
+
+2016-01-04 Sam Varshavchik
+
+ * authldaplib.cpp: Rewrite authldap in modern C++. Autodetect
+ and automatically reload authldaprc when it is changed. No server
+ restart is required.
+
0.66.4
2015-11-14 "Hanno Böck"
diff --git a/Makefile.am b/Makefile.am
index 7f4c09b..4e11ae8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,8 +17,8 @@ pkglibexecdir=$(libexecdir)/courier-authlib
pkglibexec_SCRIPTS=authsystem.passwd
pkglib_LTLIBRARIES=libcourierauth.la \
- libcourierauthsasl.la libcourierauthsaslclient.la \
- libcourierauthcommon.la $(modules)
+ libcourierauthcommon.la libcourierauthsasl.la libcourierauthsaslclient.la \
+ $(modules)
sbin_SCRIPTS=authdaemond
sbin_PROGRAMS=authtest authenumerate authpasswd
bin_PROGRAMS=courierauthconfig
@@ -48,13 +48,14 @@ commonlibadd=libcourierauthcommon.la
libcourierauthcommon_t=@CRYPTLIBS@
libcourierauthcommon_la_SOURCES= \
auth.h courierauth.h \
- authgetconfig.c \
+ authconfigfile.cpp \
+ authconfigfile.h \
authpwdenumerate.c \
authsaslfrombase64.c authsasltobase64.c \
courierauthstaticlist.h \
authsyschangepwd.c authsyscommon.c \
authldapescape.c \
- cramlib.c cramlib.h \
+ cramlib.c \
checkpassword.c cryptpassword.c \
checkpasswordmd5.c checkpasswordsha1.c
@@ -108,13 +109,11 @@ libauthshadow_la_LDFLAGS=$(commonldflags)
libauthpgsql_t=@PGSQL_LIBS@ @LIBM@ @NETLIBS@
-libauthpgsql_la_SOURCES=authpgsql.c preauthpgsql.c authpgsqllib.c authpgsql.h
+libauthpgsql_la_SOURCES=authpgsql.c authpgsqllib.cpp authpgsql.h
libauthpgsql_la_DEPENDENCIES=$(commonlibdep)
libauthpgsql_la_LIBADD=$(commonlibadd) $(libauthpgsql_t)
libauthpgsql_la_LDFLAGS=$(commonldflags)
-authpgsqllib.lo: authpgsqllib.c authpgsqlrc.h
-
if HAVE_AUTHPGSQL
install-authpgsqlrc:
@@ -143,13 +142,11 @@ authpgsqlrc.h:
# The authldap module
libauthldap_t=@LDAPLIBS@ @NETLIBS@
-libauthldap_la_SOURCES=authldap.c preauthldap.c authldaplib.c authldap.h
+libauthldap_la_SOURCES=authldap.c preauthldap.c authldaplib.cpp authldap.h
libauthldap_la_DEPENDENCIES=$(commonlibdep)
libauthldap_la_LIBADD=$(commonlibadd) $(libauthldap_t)
libauthldap_la_LDFLAGS=$(commonldflags)
-authldaplib.lo: authldaplib.c authldaprc.h
-
if HAVE_LDAP
install-authldaprc:
@@ -177,13 +174,11 @@ authldaprc.h:
libauthmysql_t=@MYSQL_LIBS@ @LIBM@ @NETLIBS@
-libauthmysql_la_SOURCES=authmysql.c preauthmysql.c authmysqllib.c authmysql.h
+libauthmysql_la_SOURCES=authmysql.cpp preauthmysql.cpp authmysqllib.cpp authmysql.h
libauthmysql_la_DEPENDENCIES=$(commonlibdep)
libauthmysql_la_LIBADD=$(commonlibadd) $(libauthmysql_t)
libauthmysql_la_LDFLAGS=$(commonldflags)
-authmysqllib.lo: authmysqllib.c authmysqlrc.h
-
if HAVE_AUTHMYSQL
install-authmysqlrc:
$(mkinstalldirs) $(DESTDIR)`dirname @authmysqlrc@` || :
@@ -210,13 +205,11 @@ authmysqlrc.h:
libauthsqlite_t=@SQLITE_LIBS@ @NETLIBS@
-libauthsqlite_la_SOURCES=authsqlite.c preauthsqlite.c authsqlitelib.c authsqlite.h
+libauthsqlite_la_SOURCES=authsqlite.cpp authsqlitelib.cpp authsqlite.h
libauthsqlite_la_DEPENDENCIES=$(commonlibdep)
libauthsqlite_la_LIBADD=$(commonlibadd) $(libauthsqlite_t)
libauthsqlite_la_LDFLAGS=$(commonldflags)
-authsqlitelib.lo: authsqlitelib.c authsqliterc.h
-
if HAVE_AUTHSQLITE
install-authsqliterc:
$(mkinstalldirs) $(DESTDIR)`dirname @authsqliterc@` || :
@@ -287,10 +280,20 @@ authdaemonrc.h:
HTMLFILES=README.html NEWS.html INSTALL.html \
README.authsqlite.html README.authmysql.html README.authpostgres.html
+
+if HAVE_SGML
+
+GITFILES=authldaprc authmysqlrc authpgsqlrc authsqliterc authdaemonrc.in
+
+$(GITFILES): %: %.git
+ perl -p -e 's/\$$Id:[^\$$]*/\$$Id: '"`git log --pretty=format:\"%H\" -n 1 -- $<`-`date +%Y%m%d%H%M%S`/" <$< >$@.tmp
+ mv -f $@.tmp $@
+endif
+
EXTRA_DIST=$(HTMLFILES) sysconftool COPYING COPYING.GPL\
authldap.schema \
authldap.ldif \
- authldaprc authmysqlrc authpgsqlrc authsqliterc README.ldap \
+ $(GITFILES) README.ldap \
README.authmysql.myownquery \
README.authdebug.html.in \
courier-authlib.spec \
@@ -357,12 +360,14 @@ authenumerate_LDFLAGS=
#
# The main daemon.
-authdaemondprog_SOURCES=authdaemond.c
+authdaemondprog_SOURCES=authdaemond.c authdaemondcpp.cpp
+
authdaemondprog_DEPENDENCIES=libcourierauthcommon.la \
+ libcourierauth.la \
libs/liblock/liblock.la $(modules) \
libs/libhmac/libhmac.la libs/md5/libmd5.la libs/sha1/libsha1.la \
libs/rfc822/libencode.la libs/numlib/libnumlib.la
-authdaemondprog_LDADD=$(LIBLTDL) libcourierauthcommon.la libs/liblock/liblock.la \
+authdaemondprog_LDADD=$(LIBLTDL) libcourierauthcommon.la libcourierauth.la libs/liblock/liblock.la \
libs/libhmac/libhmac.la libs/md5/libmd5.la libs/sha1/libsha1.la \
libs/rfc822/libencode.la libs/numlib/libnumlib.la
authdaemondprog_LDFLAGS=-export-dynamic $(modules:%=-dlopen %) @NETLIBS@
@@ -386,7 +391,8 @@ BUILT1=authlib.html authldaprc.h authmysqlrc.h authpgsqlrc.h authpiperc.h \
authchangepwdir.h sbindir.h \
pkglibdir.h pkgincludedir.h mailusergroup.h \
README_authlib.html
-BUILT_SOURCES=$(BUILT1) $(man3:%.3=%.html) $(man1:%.1=%.html)
+BUILT_SOURCES=$(BUILT1) $(GITFILES) $(man3:%.3=%.html) $(man1:%.1=%.html) \
+ authsqliterc.h authmysqlrc.h authpgsqlrc.h authldaprc.h
authchangepwdir.h: config.status
echo '#define AUTHCHANGEPWDIR "$(pkglibexecdir)"' >authchangepwdir.h
@@ -462,14 +468,6 @@ authlib.3: authlib.3.in
if HAVE_SGML
-GITFILES=authdaemonrc.in
-
-BUILT_SOURCES += $(GITFILES)
-
-$(GITFILES): %: %.git
- perl -p -e 's/\$$Id:[^\$$]*/\$$Id: '"`git log --pretty=format:\"%H\" -n 1 -- $<`-`date +%Y%m%d%H%M%S`/" <$< >$@.tmp
- mv -f $@.tmp $@
-
authpasswd.html: authpasswd.sgml libs/docbook/sgml2html
libs/docbook/sgml2html authpasswd.sgml authpasswd.html
@@ -652,15 +650,13 @@ bump.rpm.release: @PACKAGE@.spec @PACKAGE@.lpspec
mv @PACKAGE@.lpspec.new @PACKAGE@.lpspec
upload-beta:
- test -z "$(SFPASSWD)" && exit 1; exit 0
rm -f @PACKAGE@-@VERSION@.tar.bz2.sig; gpg --detach-sign --default-key mrsam@courier-mta.com @PACKAGE@-@VERSION@.tar.bz2; test -f @PACKAGE@-@VERSION@.tar.bz2.sig || exit 1
- ~/src/sftools/release.pl mrsam $(SFPASSWD) courier authlib-devel `echo @VERSION@|sed 's/.*\(........\)/\1/'` @PACKAGE@-@VERSION@.tar.bz2 @PACKAGE@-@VERSION@.tar.bz2.sig
+ ~/src/sftools/release.pl mrsam courier authlib-devel `echo @VERSION@|sed 's/.*\(........\)/\1/'` @PACKAGE@-@VERSION@.tar.bz2 @PACKAGE@-@VERSION@.tar.bz2.sig
upload-dist:
- test -z "$(SFPASSWD)" && exit 1; exit 0
rm -f @PACKAGE@-@VERSION@.tar.bz2.sig; gpg --detach-sign --default-key mrsam@courier-mta.com @PACKAGE@-@VERSION@.tar.bz2; test -f @PACKAGE@-@VERSION@.tar.bz2.sig || exit 1
set -e; v="@PACKAGE@/@VERSION@/`date +%Y%m%d%H%M%S`"; git tag -s $$v -m 'Tag version @VERSION@'; cd libs; git tag -s $$v -m 'Tag version @VERSION@'
- socksify ~/src/sftools/release.pl mrsam $(SFPASSWD) courier authlib @VERSION@ @PACKAGE@-@VERSION@.tar.bz2 @PACKAGE@-@VERSION@.tar.bz2.sig
+ socksify ~/src/sftools/release.pl mrsam courier authlib @VERSION@ @PACKAGE@-@VERSION@.tar.bz2 @PACKAGE@-@VERSION@.tar.bz2.sig
HTMLDOCFILES=$(HTMLFILES) README.authdebug.html README_authlib.html \
$(man3:%.3=%.html) $(man1:%.1=%.html) userdb/userdb.html userdb/makeuserdb.html userdb/userdbpw.html
diff --git a/Makefile.in b/Makefile.in
index 4b08cf3..f14452b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -100,7 +100,6 @@ sbin_PROGRAMS = authtest$(EXEEXT) authenumerate$(EXEEXT) \
bin_PROGRAMS = courierauthconfig$(EXEEXT)
noinst_PROGRAMS = authdaemontest$(EXEEXT) authmksock$(EXEEXT) \
authdaemondprog$(EXEEXT)
-@HAVE_SGML_TRUE@am__append_1 = $(GITFILES)
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
@@ -163,29 +162,28 @@ libauthcustom_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
am__DEPENDENCIES_1 =
am_libauthldap_la_OBJECTS = authldap.lo preauthldap.lo authldaplib.lo
libauthldap_la_OBJECTS = $(am_libauthldap_la_OBJECTS)
-libauthldap_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(AM_CFLAGS) $(CFLAGS) $(libauthldap_la_LDFLAGS) $(LDFLAGS) -o \
- $@
+libauthldap_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(libauthldap_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
am_libauthmysql_la_OBJECTS = authmysql.lo preauthmysql.lo \
authmysqllib.lo
libauthmysql_la_OBJECTS = $(am_libauthmysql_la_OBJECTS)
-libauthmysql_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(AM_CFLAGS) $(CFLAGS) $(libauthmysql_la_LDFLAGS) $(LDFLAGS) \
- -o $@
+libauthmysql_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(libauthmysql_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
am_libauthpam_la_OBJECTS = authpam.lo preauthpam.lo
libauthpam_la_OBJECTS = $(am_libauthpam_la_OBJECTS)
libauthpam_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libauthpam_la_LDFLAGS) $(LDFLAGS) -o $@
-am_libauthpgsql_la_OBJECTS = authpgsql.lo preauthpgsql.lo \
- authpgsqllib.lo
+am_libauthpgsql_la_OBJECTS = authpgsql.lo authpgsqllib.lo
libauthpgsql_la_OBJECTS = $(am_libauthpgsql_la_OBJECTS)
-libauthpgsql_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(AM_CFLAGS) $(CFLAGS) $(libauthpgsql_la_LDFLAGS) $(LDFLAGS) \
- -o $@
+libauthpgsql_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(libauthpgsql_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
am_libauthpipe_la_OBJECTS = authpipe.lo authpipelib.lo
libauthpipe_la_OBJECTS = $(am_libauthpipe_la_OBJECTS)
libauthpipe_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
@@ -203,13 +201,12 @@ libauthshadow_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(AM_CFLAGS) $(CFLAGS) $(libauthshadow_la_LDFLAGS) $(LDFLAGS) \
-o $@
-am_libauthsqlite_la_OBJECTS = authsqlite.lo preauthsqlite.lo \
- authsqlitelib.lo
+am_libauthsqlite_la_OBJECTS = authsqlite.lo authsqlitelib.lo
libauthsqlite_la_OBJECTS = $(am_libauthsqlite_la_OBJECTS)
-libauthsqlite_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(AM_CFLAGS) $(CFLAGS) $(libauthsqlite_la_LDFLAGS) $(LDFLAGS) \
- -o $@
+libauthsqlite_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(libauthsqlite_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
am__DEPENDENCIES_2 = userdb/libuserdb.la
am_libauthuserdb_la_OBJECTS = authuserdb.lo preauthuserdb.lo \
preauthuserdbcommon.lo authuserdbpwd.lo
@@ -230,16 +227,16 @@ libcourierauth_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(AM_CFLAGS) $(CFLAGS) $(libcourierauth_la_LDFLAGS) $(LDFLAGS) \
-o $@
-am_libcourierauthcommon_la_OBJECTS = authgetconfig.lo \
+am_libcourierauthcommon_la_OBJECTS = authconfigfile.lo \
authpwdenumerate.lo authsaslfrombase64.lo authsasltobase64.lo \
authsyschangepwd.lo authsyscommon.lo authldapescape.lo \
cramlib.lo checkpassword.lo cryptpassword.lo \
checkpasswordmd5.lo checkpasswordsha1.lo
libcourierauthcommon_la_OBJECTS = \
$(am_libcourierauthcommon_la_OBJECTS)
-libcourierauthcommon_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(AM_CFLAGS) $(CFLAGS) $(libcourierauthcommon_la_LDFLAGS) \
+libcourierauthcommon_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(libcourierauthcommon_la_LDFLAGS) \
$(LDFLAGS) -o $@
libcourierauthsasl_la_DEPENDENCIES = libcourierauthcommon.la \
libcourierauth.la
@@ -264,12 +261,13 @@ libcourierauthsaslclient_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_CFLAGS) $(CFLAGS) $(libcourierauthsaslclient_la_LDFLAGS) \
$(LDFLAGS) -o $@
PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) $(sbin_PROGRAMS)
-am_authdaemondprog_OBJECTS = authdaemond.$(OBJEXT)
+am_authdaemondprog_OBJECTS = authdaemond.$(OBJEXT) \
+ authdaemondcpp.$(OBJEXT)
authdaemondprog_OBJECTS = $(am_authdaemondprog_OBJECTS)
-authdaemondprog_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(AM_CFLAGS) $(CFLAGS) $(authdaemondprog_LDFLAGS) $(LDFLAGS) \
- -o $@
+authdaemondprog_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(authdaemondprog_LDFLAGS) \
+ $(LDFLAGS) -o $@
am_authdaemontest_OBJECTS = authdaemontest.$(OBJEXT)
authdaemontest_OBJECTS = $(am_authdaemontest_OBJECTS)
authdaemontest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
@@ -329,6 +327,24 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_1 =
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+am__v_CXXLD_1 =
SOURCES = $(libauthcustom_la_SOURCES) $(libauthldap_la_SOURCES) \
$(libauthmysql_la_SOURCES) $(libauthpam_la_SOURCES) \
$(libauthpgsql_la_SOURCES) $(libauthpipe_la_SOURCES) \
@@ -475,6 +491,10 @@ COURIERCONFIG = @COURIERCONFIG@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CRYPTLIBS = @CRYPTLIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -574,6 +594,7 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@@ -645,8 +666,8 @@ modules = @LIBAUTHUSERDB@ \
pkglibexec_SCRIPTS = authsystem.passwd
pkglib_LTLIBRARIES = libcourierauth.la \
- libcourierauthsasl.la libcourierauthsaslclient.la \
- libcourierauthcommon.la $(modules)
+ libcourierauthcommon.la libcourierauthsasl.la libcourierauthsaslclient.la \
+ $(modules)
sbin_SCRIPTS = authdaemond
EXTRA_LTLIBRARIES = libauthuserdb.la \
@@ -672,13 +693,14 @@ commonlibadd = libcourierauthcommon.la
libcourierauthcommon_t = @CRYPTLIBS@
libcourierauthcommon_la_SOURCES = \
auth.h courierauth.h \
- authgetconfig.c \
+ authconfigfile.cpp \
+ authconfigfile.h \
authpwdenumerate.c \
authsaslfrombase64.c authsasltobase64.c \
courierauthstaticlist.h \
authsyschangepwd.c authsyscommon.c \
authldapescape.c \
- cramlib.c cramlib.h \
+ cramlib.c \
checkpassword.c cryptpassword.c \
checkpasswordmd5.c checkpasswordsha1.c
@@ -726,28 +748,28 @@ libauthshadow_la_LDFLAGS = $(commonldflags)
# The authpgsql module
libauthpgsql_t = @PGSQL_LIBS@ @LIBM@ @NETLIBS@
-libauthpgsql_la_SOURCES = authpgsql.c preauthpgsql.c authpgsqllib.c authpgsql.h
+libauthpgsql_la_SOURCES = authpgsql.c authpgsqllib.cpp authpgsql.h
libauthpgsql_la_DEPENDENCIES = $(commonlibdep)
libauthpgsql_la_LIBADD = $(commonlibadd) $(libauthpgsql_t)
libauthpgsql_la_LDFLAGS = $(commonldflags)
# The authldap module
libauthldap_t = @LDAPLIBS@ @NETLIBS@
-libauthldap_la_SOURCES = authldap.c preauthldap.c authldaplib.c authldap.h
+libauthldap_la_SOURCES = authldap.c preauthldap.c authldaplib.cpp authldap.h
libauthldap_la_DEPENDENCIES = $(commonlibdep)
libauthldap_la_LIBADD = $(commonlibadd) $(libauthldap_t)
libauthldap_la_LDFLAGS = $(commonldflags)
# The authmysql module
libauthmysql_t = @MYSQL_LIBS@ @LIBM@ @NETLIBS@
-libauthmysql_la_SOURCES = authmysql.c preauthmysql.c authmysqllib.c authmysql.h
+libauthmysql_la_SOURCES = authmysql.cpp preauthmysql.cpp authmysqllib.cpp authmysql.h
libauthmysql_la_DEPENDENCIES = $(commonlibdep)
libauthmysql_la_LIBADD = $(commonlibadd) $(libauthmysql_t)
libauthmysql_la_LDFLAGS = $(commonldflags)
# The authsqlite module
libauthsqlite_t = @SQLITE_LIBS@ @NETLIBS@
-libauthsqlite_la_SOURCES = authsqlite.c preauthsqlite.c authsqlitelib.c authsqlite.h
+libauthsqlite_la_SOURCES = authsqlite.cpp authsqlitelib.cpp authsqlite.h
libauthsqlite_la_DEPENDENCIES = $(commonlibdep)
libauthsqlite_la_LIBADD = $(commonlibadd) $(libauthsqlite_t)
libauthsqlite_la_LDFLAGS = $(commonldflags)
@@ -766,10 +788,11 @@ libauthpipe_la_LDFLAGS = $(commonldflags)
HTMLFILES = README.html NEWS.html INSTALL.html \
README.authsqlite.html README.authmysql.html README.authpostgres.html
+@HAVE_SGML_TRUE@GITFILES = authldaprc authmysqlrc authpgsqlrc authsqliterc authdaemonrc.in
EXTRA_DIST = $(HTMLFILES) sysconftool COPYING COPYING.GPL\
authldap.schema \
authldap.ldif \
- authldaprc authmysqlrc authpgsqlrc authsqliterc README.ldap \
+ $(GITFILES) README.ldap \
README.authmysql.myownquery \
README.authdebug.html.in \
courier-authlib.spec \
@@ -826,13 +849,14 @@ authenumerate_LDFLAGS =
#
# The main daemon.
-authdaemondprog_SOURCES = authdaemond.c
+authdaemondprog_SOURCES = authdaemond.c authdaemondcpp.cpp
authdaemondprog_DEPENDENCIES = libcourierauthcommon.la \
+ libcourierauth.la \
libs/liblock/liblock.la $(modules) \
libs/libhmac/libhmac.la libs/md5/libmd5.la libs/sha1/libsha1.la \
libs/rfc822/libencode.la libs/numlib/libnumlib.la
-authdaemondprog_LDADD = $(LIBLTDL) libcourierauthcommon.la libs/liblock/liblock.la \
+authdaemondprog_LDADD = $(LIBLTDL) libcourierauthcommon.la libcourierauth.la libs/liblock/liblock.la \
libs/libhmac/libhmac.la libs/md5/libmd5.la libs/sha1/libsha1.la \
libs/rfc822/libencode.la libs/numlib/libnumlib.la
@@ -854,10 +878,10 @@ BUILT1 = authlib.html authldaprc.h authmysqlrc.h authpgsqlrc.h authpiperc.h \
pkglibdir.h pkgincludedir.h mailusergroup.h \
README_authlib.html
-BUILT_SOURCES = $(BUILT1) $(man3:%.3=%.html) $(man1:%.1=%.html) \
- $(am__append_1)
+BUILT_SOURCES = $(BUILT1) $(GITFILES) $(man3:%.3=%.html) $(man1:%.1=%.html) \
+ authsqliterc.h authmysqlrc.h authpgsqlrc.h authldaprc.h
+
noinst_DATA = $(BUILT_SOURCES)
-@HAVE_SGML_TRUE@GITFILES = authdaemonrc.in
HTMLDOCFILES = $(HTMLFILES) README.authdebug.html README_authlib.html \
$(man3:%.3=%.html) $(man1:%.1=%.html) userdb/userdb.html userdb/makeuserdb.html userdb/userdbpw.html
@@ -865,7 +889,7 @@ all: $(BUILT_SOURCES) courier_auth_config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
+.SUFFIXES: .c .cpp .lo .o .obj
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@@ -978,16 +1002,16 @@ libauthcustom.la: $(libauthcustom_la_OBJECTS) $(libauthcustom_la_DEPENDENCIES) $
$(AM_V_CCLD)$(libauthcustom_la_LINK) $(libauthcustom_la_OBJECTS) $(libauthcustom_la_LIBADD) $(LIBS)
libauthldap.la: $(libauthldap_la_OBJECTS) $(libauthldap_la_DEPENDENCIES) $(EXTRA_libauthldap_la_DEPENDENCIES)
- $(AM_V_CCLD)$(libauthldap_la_LINK) $(libauthldap_la_OBJECTS) $(libauthldap_la_LIBADD) $(LIBS)
+ $(AM_V_CXXLD)$(libauthldap_la_LINK) $(libauthldap_la_OBJECTS) $(libauthldap_la_LIBADD) $(LIBS)
libauthmysql.la: $(libauthmysql_la_OBJECTS) $(libauthmysql_la_DEPENDENCIES) $(EXTRA_libauthmysql_la_DEPENDENCIES)
- $(AM_V_CCLD)$(libauthmysql_la_LINK) $(libauthmysql_la_OBJECTS) $(libauthmysql_la_LIBADD) $(LIBS)
+ $(AM_V_CXXLD)$(libauthmysql_la_LINK) $(libauthmysql_la_OBJECTS) $(libauthmysql_la_LIBADD) $(LIBS)
libauthpam.la: $(libauthpam_la_OBJECTS) $(libauthpam_la_DEPENDENCIES) $(EXTRA_libauthpam_la_DEPENDENCIES)
$(AM_V_CCLD)$(libauthpam_la_LINK) $(libauthpam_la_OBJECTS) $(libauthpam_la_LIBADD) $(LIBS)
libauthpgsql.la: $(libauthpgsql_la_OBJECTS) $(libauthpgsql_la_DEPENDENCIES) $(EXTRA_libauthpgsql_la_DEPENDENCIES)
- $(AM_V_CCLD)$(libauthpgsql_la_LINK) $(libauthpgsql_la_OBJECTS) $(libauthpgsql_la_LIBADD) $(LIBS)
+ $(AM_V_CXXLD)$(libauthpgsql_la_LINK) $(libauthpgsql_la_OBJECTS) $(libauthpgsql_la_LIBADD) $(LIBS)
libauthpipe.la: $(libauthpipe_la_OBJECTS) $(libauthpipe_la_DEPENDENCIES) $(EXTRA_libauthpipe_la_DEPENDENCIES)
$(AM_V_CCLD)$(libauthpipe_la_LINK) $(libauthpipe_la_OBJECTS) $(libauthpipe_la_LIBADD) $(LIBS)
@@ -999,7 +1023,7 @@ libauthshadow.la: $(libauthshadow_la_OBJECTS) $(libauthshadow_la_DEPENDENCIES) $
$(AM_V_CCLD)$(libauthshadow_la_LINK) $(libauthshadow_la_OBJECTS) $(libauthshadow_la_LIBADD) $(LIBS)
libauthsqlite.la: $(libauthsqlite_la_OBJECTS) $(libauthsqlite_la_DEPENDENCIES) $(EXTRA_libauthsqlite_la_DEPENDENCIES)
- $(AM_V_CCLD)$(libauthsqlite_la_LINK) $(libauthsqlite_la_OBJECTS) $(libauthsqlite_la_LIBADD) $(LIBS)
+ $(AM_V_CXXLD)$(libauthsqlite_la_LINK) $(libauthsqlite_la_OBJECTS) $(libauthsqlite_la_LIBADD) $(LIBS)
libauthuserdb.la: $(libauthuserdb_la_OBJECTS) $(libauthuserdb_la_DEPENDENCIES) $(EXTRA_libauthuserdb_la_DEPENDENCIES)
$(AM_V_CCLD)$(libauthuserdb_la_LINK) $(libauthuserdb_la_OBJECTS) $(libauthuserdb_la_LIBADD) $(LIBS)
@@ -1008,7 +1032,7 @@ libcourierauth.la: $(libcourierauth_la_OBJECTS) $(libcourierauth_la_DEPENDENCIES
$(AM_V_CCLD)$(libcourierauth_la_LINK) -rpath $(pkglibdir) $(libcourierauth_la_OBJECTS) $(libcourierauth_la_LIBADD) $(LIBS)
libcourierauthcommon.la: $(libcourierauthcommon_la_OBJECTS) $(libcourierauthcommon_la_DEPENDENCIES) $(EXTRA_libcourierauthcommon_la_DEPENDENCIES)
- $(AM_V_CCLD)$(libcourierauthcommon_la_LINK) -rpath $(pkglibdir) $(libcourierauthcommon_la_OBJECTS) $(libcourierauthcommon_la_LIBADD) $(LIBS)
+ $(AM_V_CXXLD)$(libcourierauthcommon_la_LINK) -rpath $(pkglibdir) $(libcourierauthcommon_la_OBJECTS) $(libcourierauthcommon_la_LIBADD) $(LIBS)
libcourierauthsasl.la: $(libcourierauthsasl_la_OBJECTS) $(libcourierauthsasl_la_DEPENDENCIES) $(EXTRA_libcourierauthsasl_la_DEPENDENCIES)
$(AM_V_CCLD)$(libcourierauthsasl_la_LINK) -rpath $(pkglibdir) $(libcourierauthsasl_la_OBJECTS) $(libcourierauthsasl_la_LIBADD) $(LIBS)
@@ -1125,7 +1149,7 @@ clean-sbinPROGRAMS:
authdaemondprog$(EXEEXT): $(authdaemondprog_OBJECTS) $(authdaemondprog_DEPENDENCIES) $(EXTRA_authdaemondprog_DEPENDENCIES)
@rm -f authdaemondprog$(EXEEXT)
- $(AM_V_CCLD)$(authdaemondprog_LINK) $(authdaemondprog_OBJECTS) $(authdaemondprog_LDADD) $(LIBS)
+ $(AM_V_CXXLD)$(authdaemondprog_LINK) $(authdaemondprog_OBJECTS) $(authdaemondprog_LDADD) $(LIBS)
authdaemontest$(EXEEXT): $(authdaemontest_OBJECTS) $(authdaemontest_DEPENDENCIES) $(EXTRA_authdaemontest_DEPENDENCIES)
@rm -f authdaemontest$(EXEEXT)
@@ -1227,13 +1251,14 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authconfigfile.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authcustom.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authdaemon.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authdaemond.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authdaemondcpp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authdaemonlib.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authdaemontest.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authenumerate.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authgetconfig.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authinfo.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authldap.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authldapescape.Plo@am__quote@
@@ -1284,10 +1309,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preauthldap.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preauthmysql.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preauthpam.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preauthpgsql.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preauthpwd.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preauthshadow.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preauthsqlite.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preauthuserdb.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preauthuserdbcommon.Plo@am__quote@
@@ -1312,6 +1335,27 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
+
mostlyclean-libtool:
-rm -f *.lo
@@ -1602,7 +1646,7 @@ distdir: $(DISTFILES)
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
@@ -1627,7 +1671,7 @@ dist-shar: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
- shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
@@ -1645,7 +1689,7 @@ dist dist-all:
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
@@ -1655,7 +1699,7 @@ distcheck: dist
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
@@ -1886,8 +1930,6 @@ uninstall-man: uninstall-man1 uninstall-man3
.PRECIOUS: Makefile
-authpgsqllib.lo: authpgsqllib.c authpgsqlrc.h
-
@HAVE_AUTHPGSQL_TRUE@install-authpgsqlrc:
@HAVE_AUTHPGSQL_TRUE@ $(mkinstalldirs) $(DESTDIR)`dirname @authpgsqlrc@` || :
@HAVE_AUTHPGSQL_TRUE@ $(INSTALL_DATA) -m 660 $(srcdir)/authpgsqlrc \
@@ -1907,8 +1949,6 @@ authpgsqllib.lo: authpgsqllib.c authpgsqlrc.h
authpgsqlrc.h:
echo "#define AUTHPGSQLRC \"@authpgsqlrc@\"" >authpgsqlrc.h
-authldaplib.lo: authldaplib.c authldaprc.h
-
@HAVE_LDAP_TRUE@install-authldaprc:
@HAVE_LDAP_TRUE@ $(mkinstalldirs) $(DESTDIR)`dirname @authldaprc@` || :
@HAVE_LDAP_TRUE@ $(INSTALL_DATA) -m 660 $(srcdir)/authldaprc \
@@ -1928,8 +1968,6 @@ authldaplib.lo: authldaplib.c authldaprc.h
authldaprc.h:
echo "#define AUTHLDAPRC \"@authldaprc@\"" >authldaprc.h
-authmysqllib.lo: authmysqllib.c authmysqlrc.h
-
@HAVE_AUTHMYSQL_TRUE@install-authmysqlrc:
@HAVE_AUTHMYSQL_TRUE@ $(mkinstalldirs) $(DESTDIR)`dirname @authmysqlrc@` || :
@HAVE_AUTHMYSQL_TRUE@ $(INSTALL_DATA) -m 660 $(srcdir)/authmysqlrc \
@@ -1949,8 +1987,6 @@ authmysqllib.lo: authmysqllib.c authmysqlrc.h
authmysqlrc.h:
echo "#define AUTHMYSQLRC \"@authmysqlrc@\"" >authmysqlrc.h
-authsqlitelib.lo: authsqlitelib.c authsqliterc.h
-
@HAVE_AUTHSQLITE_TRUE@install-authsqliterc:
@HAVE_AUTHSQLITE_TRUE@ $(mkinstalldirs) $(DESTDIR)`dirname @authsqliterc@` || :
@HAVE_AUTHSQLITE_TRUE@ $(INSTALL_DATA) -m 660 $(srcdir)/authsqliterc \
@@ -1993,6 +2029,10 @@ authdaemonrc.h:
echo "#define AUTHDAEMONSOCK AUTHDAEMONVAR \"/socket\"" >>authdaemonrc.h
echo "#define AUTHDAEMONLOCK AUTHDAEMONVAR \"/lock\"" >>authdaemonrc.h
+@HAVE_SGML_TRUE@$(GITFILES): %: %.git
+@HAVE_SGML_TRUE@ perl -p -e 's/\$$Id:[^\$$]*/\$$Id: '"`git log --pretty=format:\"%H\" -n 1 -- $<`-`date +%Y%m%d%H%M%S`/" <$< >$@.tmp
+@HAVE_SGML_TRUE@ mv -f $@.tmp $@
+
README: README.html
links -dump -no-references README.html >README
@@ -2072,10 +2112,6 @@ authlib.html: authlib.html.in
authlib.3: authlib.3.in
$(SHELL) ./config.status --file=authlib.3
-@HAVE_SGML_TRUE@$(GITFILES): %: %.git
-@HAVE_SGML_TRUE@ perl -p -e 's/\$$Id:[^\$$]*/\$$Id: '"`git log --pretty=format:\"%H\" -n 1 -- $<`-`date +%Y%m%d%H%M%S`/" <$< >$@.tmp
-@HAVE_SGML_TRUE@ mv -f $@.tmp $@
-
@HAVE_SGML_TRUE@authpasswd.html: authpasswd.sgml libs/docbook/sgml2html
@HAVE_SGML_TRUE@ libs/docbook/sgml2html authpasswd.sgml authpasswd.html
@@ -2255,15 +2291,13 @@ bump.rpm.release: @PACKAGE@.spec @PACKAGE@.lpspec
mv @PACKAGE@.lpspec.new @PACKAGE@.lpspec
upload-beta:
- test -z "$(SFPASSWD)" && exit 1; exit 0
rm -f @PACKAGE@-@VERSION@.tar.bz2.sig; gpg --detach-sign --default-key mrsam@courier-mta.com @PACKAGE@-@VERSION@.tar.bz2; test -f @PACKAGE@-@VERSION@.tar.bz2.sig || exit 1
- ~/src/sftools/release.pl mrsam $(SFPASSWD) courier authlib-devel `echo @VERSION@|sed 's/.*\(........\)/\1/'` @PACKAGE@-@VERSION@.tar.bz2 @PACKAGE@-@VERSION@.tar.bz2.sig
+ ~/src/sftools/release.pl mrsam courier authlib-devel `echo @VERSION@|sed 's/.*\(........\)/\1/'` @PACKAGE@-@VERSION@.tar.bz2 @PACKAGE@-@VERSION@.tar.bz2.sig
upload-dist:
- test -z "$(SFPASSWD)" && exit 1; exit 0
rm -f @PACKAGE@-@VERSION@.tar.bz2.sig; gpg --detach-sign --default-key mrsam@courier-mta.com @PACKAGE@-@VERSION@.tar.bz2; test -f @PACKAGE@-@VERSION@.tar.bz2.sig || exit 1
set -e; v="@PACKAGE@/@VERSION@/`date +%Y%m%d%H%M%S`"; git tag -s $$v -m 'Tag version @VERSION@'; cd libs; git tag -s $$v -m 'Tag version @VERSION@'
- socksify ~/src/sftools/release.pl mrsam $(SFPASSWD) courier authlib @VERSION@ @PACKAGE@-@VERSION@.tar.bz2 @PACKAGE@-@VERSION@.tar.bz2.sig
+ socksify ~/src/sftools/release.pl mrsam courier authlib @VERSION@ @PACKAGE@-@VERSION@.tar.bz2 @PACKAGE@-@VERSION@.tar.bz2.sig
htmldoc: $(HTMLDOCFILES)
for f in $^; do d=`basename $$f`; test "$$d" = "README.html" && d="index.html"; tidy -i -q --tidy-mark no --doctype transitional --input-encoding utf8 --output-encoding utf8 -asxml <$$f >$$f.tmp ; xsltproc --nonet $$HOME/www/www.courier-mta.org/xsl/authlib.xsl $$f.tmp | perl -ne 's~\$(id):.*\$$~\$(id):'"$$h"'\$$~; print' >$$HOME/www/www.courier-mta.org/authlib/$$d; rm -f $$f.tmp; done
diff --git a/README_authlib.html.in b/README_authlib.html.in
index 85c772b..91220fe 100644
--- a/README_authlib.html.in
+++ b/README_authlib.html.in
@@ -439,8 +439,9 @@ This module reads
the list of mail accounts and passwords from an LDAP directory.
The @authldaprc@
configuration file defines the
particular details regarding the LDAP directory layout.
This is a do-nothing module where custom authentication code
diff --git a/aclocal.m4 b/aclocal.m4
index 6379c8b..8a0d7e7 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.15 -*- Autoconf -*-
+# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -20,6 +20,83 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
+dnl Sets the COURIER_UNICODE_CXXFLAGS variable to any additional compiler
+dnl flags needed to build the courier-unicode package and packages that
+dnl use the courier-unicode package.
+
+AC_DEFUN([AX_COURIER_UNICODE_CXXFLAGS],[
+
+save_FLAGS="$CXXFLAGS"
+
+AC_LANG_PUSH([C++])
+
+AC_TRY_COMPILE([
+#include
+], [
+ std::u32string s;
+ char32_t c;
+ ],
+ [
+ ],
+ [
+
+COURIER_UNICODE_CXXFLAGS="-std=c++11"
+CXXFLAGS="$save_CFLAGS $COURIER_UNICODE_CXXFLAGS"
+
+AC_TRY_COMPILE([
+#include
+], [
+ std::u32string s;
+ char32_t c;
+ ],
+ [
+ ],
+ [
+
+COURIER_UNICODE_CXXFLAGS="-std=c++0x"
+CXXFLAGS="$save_CFLAGS $COURIER_UNICODE_CXXFLAGS"
+
+AC_TRY_COMPILE([
+#include
+], [
+ std::u32string s;
+ char32_t c;
+ ],
+ [
+ ],
+ [
+AC_MSG_ERROR([*** A compiler with C++11 Unicode support was not found])
+])
+])
+])
+CXXFLAGS="$save_FLAGS"
+AC_LANG_POP([C++])
+])
+
+AC_DEFUN([AX_COURIER_UNICODE_VERSION],[
+
+AC_MSG_CHECKING(courier-unicode library and version)
+
+AC_TRY_COMPILE([
+#include
+#ifndef COURIER_UNICODE_VERSION
+#define COURIER_UNICODE_VERSION 0
+#endif
+
+#if COURIER_UNICODE_VERSION < 210
+#error "courier-unicode 2.1 library is required"
+#endif
+
+],[],[],
+AC_MSG_ERROR([
+ERROR: The Courier Unicode Library 2.1 header files appear not to be installed.
+You may need to upgrade the library or install a separate development
+subpackage in addition to the main package.])
+)
+
+AC_MSG_RESULT([ok])
+])
+
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
#
# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
@@ -10075,7 +10152,7 @@ AC_DEFUN([AC_PROG_SYSCONFTOOL],
]
)
-# Copyright (C) 2002-2014 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -10090,7 +10167,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.15'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.15], [],
+m4_if([$1], [1.15.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -10106,14 +10183,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.15])dnl
+[AM_AUTOMAKE_VERSION([1.15.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -10165,7 +10242,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -10196,7 +10273,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -10387,7 +10464,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -10463,7 +10540,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -10660,7 +10737,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -10681,7 +10758,7 @@ if test x"${install_sh+set}" != xset; then
fi
AC_SUBST([install_sh])])
-# Copyright (C) 2003-2014 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -10702,7 +10779,7 @@ AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -10752,7 +10829,7 @@ rm -f confinc confmf
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -10791,7 +10868,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -10820,7 +10897,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -10867,7 +10944,7 @@ AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -10886,7 +10963,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -10967,7 +11044,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
-# Copyright (C) 2009-2014 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -11027,7 +11104,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -11055,7 +11132,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006-2014 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -11074,7 +11151,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2014 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/auth.h b/auth.h
index 837eb41..316495c 100644
--- a/auth.h
+++ b/auth.h
@@ -47,17 +47,6 @@ int auth_sys_common( int (*auth_pre_func)(const char *,
int (*callback_func)(struct authinfo *, void *),
void *callback_arg);
-const char *authgetconfig(const char *filename, const char *env);
-
-char *auth_parse_select_clause (char *(*escape_func)(const char *, size_t),
- const char *clause, const char *username,
- const char *defdomain,
- const char *service);
-
-char *auth_parse_chpass_clause (char *(*escape_func)(const char *, size_t),
- const char *clause, const char *username,
- const char *defdomain, const char *newpass,
- const char *newpass_crypt);
#ifdef __cplusplus
}
diff --git a/auth_enumerate.3 b/auth_enumerate.3
index 9b8bbf8..3a40fd3 100644
--- a/auth_enumerate.3
+++ b/auth_enumerate.3
@@ -2,14 +2,14 @@
.\"
.\"
.\" Title: auth_enumerate
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.78.1
-.\" Date: 06/20/2015
+.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
+.\" Generator: DocBook XSL Stylesheets vsnapshot
+.\" Date: 09/08/2017
.\" Manual: Double Precision, Inc.
.\" Source: Double Precision, Inc.
.\" Language: English
.\"
-.TH "AUTH_ENUMERATE" "3" "06/20/2015" "Double Precision, Inc." "Double Precision, Inc."
+.TH "AUTH_ENUMERATE" "3" "09/08/2017" "Double Precision, Inc." "Double Precision, Inc."
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/auth_generic.3 b/auth_generic.3
index f6020c2..b566adf 100644
--- a/auth_generic.3
+++ b/auth_generic.3
@@ -2,14 +2,14 @@
.\"
.\"
.\" Title: auth_generic
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.78.1
-.\" Date: 06/20/2015
+.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
+.\" Generator: DocBook XSL Stylesheets vsnapshot
+.\" Date: 09/08/2017
.\" Manual: Double Precision, Inc.
.\" Source: Double Precision, Inc.
.\" Language: English
.\"
-.TH "AUTH_GENERIC" "3" "06/20/2015" "Double Precision, Inc." "Double Precision, Inc."
+.TH "AUTH_GENERIC" "3" "09/08/2017" "Double Precision, Inc." "Double Precision, Inc."
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/auth_getoption.3 b/auth_getoption.3
index f5dcc11..bbd88bc 100644
--- a/auth_getoption.3
+++ b/auth_getoption.3
@@ -2,14 +2,14 @@
.\"
.\"
.\" Title: auth_getoption
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.78.1
-.\" Date: 06/20/2015
+.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
+.\" Generator: DocBook XSL Stylesheets vsnapshot
+.\" Date: 09/08/2017
.\" Manual: Double Precision, Inc.
.\" Source: Double Precision, Inc.
.\" Language: English
.\"
-.TH "AUTH_GETOPTION" "3" "06/20/2015" "Double Precision, Inc." "Double Precision, Inc."
+.TH "AUTH_GETOPTION" "3" "09/08/2017" "Double Precision, Inc." "Double Precision, Inc."
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/auth_getuserinfo.3 b/auth_getuserinfo.3
index 16f4c47..57150c4 100644
--- a/auth_getuserinfo.3
+++ b/auth_getuserinfo.3
@@ -2,14 +2,14 @@
.\"
.\"
.\" Title: auth_getuserinfo
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.78.1
-.\" Date: 06/20/2015
+.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
+.\" Generator: DocBook XSL Stylesheets vsnapshot
+.\" Date: 09/08/2017
.\" Manual: Double Precision, Inc.
.\" Source: Double Precision, Inc.
.\" Language: English
.\"
-.TH "AUTH_GETUSERINFO" "3" "06/20/2015" "Double Precision, Inc." "Double Precision, Inc."
+.TH "AUTH_GETUSERINFO" "3" "09/08/2017" "Double Precision, Inc." "Double Precision, Inc."
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/auth_login.3 b/auth_login.3
index d617d53..b2bccc5 100644
--- a/auth_login.3
+++ b/auth_login.3
@@ -2,14 +2,14 @@
.\"
.\"
.\" Title: auth_login
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.78.1
-.\" Date: 06/20/2015
+.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
+.\" Generator: DocBook XSL Stylesheets vsnapshot
+.\" Date: 09/08/2017
.\" Manual: Double Precision, Inc.
.\" Source: Double Precision, Inc.
.\" Language: English
.\"
-.TH "AUTH_LOGIN" "3" "06/20/2015" "Double Precision, Inc." "Double Precision, Inc."
+.TH "AUTH_LOGIN" "3" "09/08/2017" "Double Precision, Inc." "Double Precision, Inc."
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/auth_mkhomedir.3 b/auth_mkhomedir.3
index 314e931..ed0155c 100644
--- a/auth_mkhomedir.3
+++ b/auth_mkhomedir.3
@@ -2,14 +2,14 @@
.\"
.\"
.\" Title: auth_mkhomedir
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.78.1
-.\" Date: 11/04/2015
+.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
+.\" Generator: DocBook XSL Stylesheets vsnapshot
+.\" Date: 09/08/2017
.\" Manual: Double Precision, Inc.
.\" Source: Double Precision, Inc.
.\" Language: English
.\"
-.TH "AUTH_MKHOMEDIR" "3" "11/04/2015" "Double Precision, Inc." "Double Precision, Inc."
+.TH "AUTH_MKHOMEDIR" "3" "09/08/2017" "Double Precision, Inc." "Double Precision, Inc."
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/auth_passwd.3 b/auth_passwd.3
index 33e6d3a..573e32b 100644
--- a/auth_passwd.3
+++ b/auth_passwd.3
@@ -2,14 +2,14 @@
.\"
.\"
.\" Title: auth_passwd
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.78.1
-.\" Date: 06/20/2015
+.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
+.\" Generator: DocBook XSL Stylesheets vsnapshot
+.\" Date: 09/08/2017
.\" Manual: Double Precision, Inc.
.\" Source: Double Precision, Inc.
.\" Language: English
.\"
-.TH "AUTH_PASSWD" "3" "06/20/2015" "Double Precision, Inc." "Double Precision, Inc."
+.TH "AUTH_PASSWD" "3" "09/08/2017" "Double Precision, Inc." "Double Precision, Inc."
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/auth_sasl.3 b/auth_sasl.3
index 705157c..4c59c8e 100644
--- a/auth_sasl.3
+++ b/auth_sasl.3
@@ -2,14 +2,14 @@
.\"
.\"
.\" Title: auth_sasl
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.78.1
-.\" Date: 06/20/2015
+.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
+.\" Generator: DocBook XSL Stylesheets vsnapshot
+.\" Date: 09/08/2017
.\" Manual: Double Precision, Inc.
.\" Source: Double Precision, Inc.
.\" Language: English
.\"
-.TH "AUTH_SASL" "3" "06/20/2015" "Double Precision, Inc." "Double Precision, Inc."
+.TH "AUTH_SASL" "3" "09/08/2017" "Double Precision, Inc." "Double Precision, Inc."
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -136,7 +136,8 @@ conversation\&.
is a version of
\fBauth_sasl\fR
that recognizes the
-EXTERNALSASL
+EXTERNAL
+SASL
method\&. It takes an extra parameter,
\fIexternalauth\fR\&. This parameter should be set to indicate an login that was authenticated via some other means, such as, perhaps, an
SSL
diff --git a/authconfigfile.cpp b/authconfigfile.cpp
new file mode 100644
index 0000000..0a79c5b
--- /dev/null
+++ b/authconfigfile.cpp
@@ -0,0 +1,263 @@
+/*
+** Copyright 2016 Double Precision, Inc. See COPYING for
+** distribution information.
+*/
+
+#if HAVE_CONFIG_H
+#include "courier_auth_config.h"
+#endif
+
+#if HAVE_SYS_STAT_H
+#include
+#endif
+
+extern "C" {
+#include "authldap.h"
+#include "auth.h"
+#include "authldaprc.h"
+#include "courierauthdebug.h"
+};
+
+#include
+#include
+#include
+
+#include "authconfigfile.h"
+
+courier::auth::config_file::config_file(const char *filenameArg)
+ : filename(filenameArg), loaded(false)
+{
+}
+
+bool courier::auth::config_file::load(bool reload)
+{
+ struct stat stat_buf;
+
+ if (stat(filename, &stat_buf) < 0)
+ {
+ courier_auth_err("stat(%s) failed", filename);
+ return false;
+ }
+
+ if (loaded)
+ {
+ if (stat_buf.st_mtime != config_timestamp)
+ do_reload();
+ return true;
+ }
+
+ loaded=open_and_load_file(reload);
+
+ if (loaded)
+ config_timestamp=stat_buf.st_mtime;
+ return loaded;
+}
+
+class courier::auth::config_file::isspace {
+
+public:
+
+ bool operator()(char c)
+ {
+ return std::isspace(c);
+ }
+};
+
+class courier::auth::config_file::not_isspace : public isspace {
+
+public:
+
+ bool operator()(char c)
+ {
+ return !isspace::operator()(c);
+ }
+};
+
+
+bool courier::auth::config_file::open_and_load_file(bool reload)
+{
+ std::ifstream f(filename);
+
+ if (!f.is_open())
+ {
+ courier_auth_err("Cannot open %s", filename);
+
+ return false;
+ }
+
+ std::string s;
+
+ bool seen_marker=false;
+
+ while (s.clear(), !std::getline(f, s).eof() || !s.empty())
+ {
+ std::string::iterator e=s.end();
+
+ std::string::iterator p=
+ std::find_if(s.begin(), e, not_isspace());
+
+ if (p == s.end() || *p == '#')
+ {
+ static const char marker[]="##NAME: MARKER:";
+
+ if (s.substr(0, sizeof(marker)-1) == marker)
+ seen_marker=true;
+ continue;
+ }
+
+ std::string::iterator q=std::find_if(p, e, isspace());
+
+ std::string name(p, q);
+ std::string setting;
+
+ while (1)
+ {
+ q=std::find_if(q, e, not_isspace());
+
+ while (q != e && isspace()(e[-1]))
+ --e;
+
+ if (q == e)
+ break;
+
+ bool continuing=false;
+
+ if (e[-1] == '\\')
+ {
+ continuing=true;
+ e[-1]=' ';
+ }
+
+ setting.insert(setting.end(), q, e);
+
+ if (!continuing)
+ break;
+
+ std::getline(f, s);
+
+ q=s.begin();
+ e=s.end();
+ }
+
+ parsed_config.insert(std::make_pair(name, setting));
+ }
+
+ if (!seen_marker)
+ {
+ courier_auth_err((reload
+ ? "marker line not found in %s will try again later"
+ : "marker line not found in %s (probably forgot to run sysconftool after an upgrade)"), filename);
+ return false;
+ }
+
+ return do_load();
+}
+
+bool courier::auth::config_file::getconfig(const char *name,
+ std::string &value,
+ bool required,
+ const char *default_value) const
+{
+ std::map::const_iterator
+ iter=parsed_config.find(name);
+
+ if (iter != parsed_config.end())
+ {
+ value=iter->second;
+ return true;
+ }
+
+ if (required)
+ {
+ courier_auth_err("%s not found in %s",
+ name, filename);
+ return false;
+ }
+
+ value.clear();
+ if (default_value)
+ value=default_value;
+ return true;
+}
+
+template<>
+bool courier::auth::config_file::config(const char *name,
+ std::string &value,
+ bool required,
+ const char *default_value) const
+{
+ return getconfig(name, value, required, default_value);
+}
+
+std::string courier::auth::config_file::config(const char *name) const
+{
+ return config(name, 0);
+}
+
+std::string courier::auth::config_file::config(const char *name,
+ const char *default_value) const
+{
+ std::string retval;
+
+ config(name, retval, false, default_value);
+
+ return retval;
+}
+
+std::string
+courier::auth::config_file::expand_string(const std::string &s,
+ const std::map ¶meters)
+{
+ std::ostringstream o;
+
+ std::string::const_iterator b=s.begin(), e=s.end(), p;
+ std::map::const_iterator p_iter;
+
+ while (b != e)
+ {
+ p=std::find(b, e, '$');
+
+ o << std::string(b, p);
+
+ b=p;
+
+ if (b == e)
+ continue;
+
+ if (*++b != '(')
+ {
+ o << '$';
+ continue;
+ }
+
+ p=std::find(++b, e, ')');
+
+ p_iter=parameters.find(std::string(b, p));
+ b=p;
+ if (b != e)
+ ++b;
+
+ if (p_iter != parameters.end())
+ o << p_iter->second;
+ }
+ return o.str();
+}
+
+std::string
+courier::auth::config_file::parse_custom_query(const std::string &s,
+ const std::string &login,
+ const std::string &defdomain,
+ std::map ¶meters)
+{
+
+ std::string::const_iterator b=login.begin(),
+ e=login.end(),
+ p=std::find(b, e, '@');
+
+ parameters["local_part"]=std::string(b, p);
+ parameters["domain"]=p == e ? defdomain:std::string(p+1, e);
+
+ return expand_string(s, parameters);
+}
diff --git a/authconfigfile.h b/authconfigfile.h
new file mode 100644
index 0000000..e87258c
--- /dev/null
+++ b/authconfigfile.h
@@ -0,0 +1,101 @@
+#ifndef authconfigfile_h
+#define authconfigfile_h
+
+#if HAVE_CONFIG_H
+#include "courier_auth_config.h"
+#endif
+
+#include
+#if HAVE_SYS_TIME_H
+#include
+#endif
+
+#include
+#include
+#include