summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2007-02-22 23:59:13 +0000
committerRich Megginson <rmeggins@redhat.com>2007-02-22 23:59:13 +0000
commit2ad4bda25e7add8792172d4ddf3e1f6b64cff5f4 (patch)
tree940985e3a31d312910d7855bfded75774c2a6c05
parent701146551b71f8bf920c16c5fb2173138c74f9bd (diff)
Resolves: bug 229691
Bug Description: Add enable switches for optional/experimental features Reviewed by: nkinder, nhosoi, prowley (Thanks!) Fix Description: Added --enable-pam-passthru, --enable-dna, and --enable-ldapi. They are all on by default and must be explicitly disabled (--disable-pam-passthru). These all cause ENABLE_xxx to be defined for C code so that we can enclose the code in #ifdef ENABLE_PAM_PASSTHRU blocks, for example. For the first two, these also cause the plugins to be built - so that if you specify --disable-pam-passthru, the plugin code will not be built at all. I discovered a nifty autoconf macro called AS_HELP_STRING - this nicely formats the help messages output by configure --help. I don't know if it's worth going through all of our m4 code to use this, but I went ahead and fixed configure.ac. Create instance will now add plugin configuration entries (but disabled) for pam passthru and dna if the corresponding ENABLE_ macros are defined. I also fixed a bug with passthru (not pam passthru) - the plugin configuration entry was not being added. Platforms tested: RHEL4, FC6 Flag Day: no Doc impact: no
-rw-r--r--Makefile.am14
-rw-r--r--Makefile.in21
-rw-r--r--config.h.in9
-rwxr-xr-xconfigure185
-rw-r--r--configure.ac56
-rw-r--r--ldap/admin/src/create_instance.c23
6 files changed, 256 insertions, 52 deletions
diff --git a/Makefile.am b/Makefile.am
index 168d1a42..f7f41ef4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -85,13 +85,21 @@ bin_PROGRAMS = dbscan-bin ds_newinst-bin dsktune-bin infadd-bin ldap-agent-bin \
server_LTLIBRARIES = libslapd.la libds_admin.la libns-dshttpd.la
+# this is how to add optional plugins
+if enable_pam_passthru
+LIBPAM_PASSTHRU_PLUGIN = libpam-passthru-plugin.la
+endif
+if enable_dna
+LIBDNA_PLUGIN = libdna-plugin.la
+endif
+
serverplugin_LTLIBRARIES = libacl-plugin.la libattr-unique-plugin.la \
libback-ldbm.la libchainingdb-plugin.la libcos-plugin.la libdes-plugin.la \
- libdistrib-plugin.la libdna-plugin.la libhttp-client-plugin.la libcollation-plugin.la \
- libpam-passthru-plugin.la libpassthru-plugin.la libpresence-plugin.la \
+ libdistrib-plugin.la libhttp-client-plugin.la libcollation-plugin.la \
+ libpassthru-plugin.la libpresence-plugin.la \
libpwdstorage-plugin.la libreferint-plugin.la libreplication-plugin.la \
libretrocl-plugin.la libroles-plugin.la libstatechange-plugin.la libsyntax-plugin.la \
- libviews-plugin.la
+ libviews-plugin.la $(LIBPAM_PASSTHRU_PLUGIN) $(LIBDNA_PLUGIN)
nodist_property_DATA = ns-slapd.properties
diff --git a/Makefile.in b/Makefile.in
index 41fc3c5f..90f173f3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -237,6 +237,7 @@ libdna_plugin_la_LIBADD =
am_libdna_plugin_la_OBJECTS = \
ldap/servers/plugins/dna/libdna_plugin_la-dna.lo
libdna_plugin_la_OBJECTS = $(am_libdna_plugin_la_OBJECTS)
+@enable_dna_TRUE@am_libdna_plugin_la_rpath = -rpath $(serverplugindir)
libds_admin_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
am_libds_admin_la_OBJECTS = \
@@ -330,6 +331,8 @@ am_libpam_passthru_plugin_la_OBJECTS = ldap/servers/plugins/pam_passthru/libpam_
ldap/servers/plugins/pam_passthru/libpam_passthru_plugin_la-pam_ptpreop.lo
libpam_passthru_plugin_la_OBJECTS = \
$(am_libpam_passthru_plugin_la_OBJECTS)
+@enable_pam_passthru_TRUE@am_libpam_passthru_plugin_la_rpath = -rpath \
+@enable_pam_passthru_TRUE@ $(serverplugindir)
libpassthru_plugin_la_LIBADD =
am_libpassthru_plugin_la_OBJECTS = \
ldap/servers/plugins/passthru/libpassthru_plugin_la-ptbind.lo \
@@ -877,6 +880,10 @@ db_lib = @db_lib@
db_libdir = @db_libdir@
db_libver = @db_libver@
debug_defs = @debug_defs@
+enable_dna_FALSE = @enable_dna_FALSE@
+enable_dna_TRUE = @enable_dna_TRUE@
+enable_pam_passthru_FALSE = @enable_pam_passthru_FALSE@
+enable_pam_passthru_TRUE = @enable_pam_passthru_TRUE@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
@@ -979,13 +986,17 @@ BUILT_SOURCES = dirver.h dberrstrs.h
CLEANFILES = dirver.h dberrstrs.h ns-slapd.properties
taskdir = $(datadir)@scripttemplatedir@
server_LTLIBRARIES = libslapd.la libds_admin.la libns-dshttpd.la
+
+# this is how to add optional plugins
+@enable_pam_passthru_TRUE@LIBPAM_PASSTHRU_PLUGIN = libpam-passthru-plugin.la
+@enable_dna_TRUE@LIBDNA_PLUGIN = libdna-plugin.la
serverplugin_LTLIBRARIES = libacl-plugin.la libattr-unique-plugin.la \
libback-ldbm.la libchainingdb-plugin.la libcos-plugin.la libdes-plugin.la \
- libdistrib-plugin.la libdna-plugin.la libhttp-client-plugin.la libcollation-plugin.la \
- libpam-passthru-plugin.la libpassthru-plugin.la libpresence-plugin.la \
+ libdistrib-plugin.la libhttp-client-plugin.la libcollation-plugin.la \
+ libpassthru-plugin.la libpresence-plugin.la \
libpwdstorage-plugin.la libreferint-plugin.la libreplication-plugin.la \
libretrocl-plugin.la libroles-plugin.la libstatechange-plugin.la libsyntax-plugin.la \
- libviews-plugin.la
+ libviews-plugin.la $(LIBPAM_PASSTHRU_PLUGIN) $(LIBDNA_PLUGIN)
nodist_property_DATA = ns-slapd.properties
noinst_LIBRARIES = libavl.a libldaputil.a
@@ -2415,7 +2426,7 @@ ldap/servers/plugins/dna/libdna_plugin_la-dna.lo: \
ldap/servers/plugins/dna/$(am__dirstamp) \
ldap/servers/plugins/dna/$(DEPDIR)/$(am__dirstamp)
libdna-plugin.la: $(libdna_plugin_la_OBJECTS) $(libdna_plugin_la_DEPENDENCIES)
- $(LINK) -rpath $(serverplugindir) $(libdna_plugin_la_LDFLAGS) $(libdna_plugin_la_OBJECTS) $(libdna_plugin_la_LIBADD) $(LIBS)
+ $(LINK) $(am_libdna_plugin_la_rpath) $(libdna_plugin_la_LDFLAGS) $(libdna_plugin_la_OBJECTS) $(libdna_plugin_la_LIBADD) $(LIBS)
ldap/admin/lib/$(am__dirstamp):
@$(mkdir_p) ldap/admin/lib
@: > ldap/admin/lib/$(am__dirstamp)
@@ -2678,7 +2689,7 @@ ldap/servers/plugins/pam_passthru/libpam_passthru_plugin_la-pam_ptpreop.lo: \
ldap/servers/plugins/pam_passthru/$(am__dirstamp) \
ldap/servers/plugins/pam_passthru/$(DEPDIR)/$(am__dirstamp)
libpam-passthru-plugin.la: $(libpam_passthru_plugin_la_OBJECTS) $(libpam_passthru_plugin_la_DEPENDENCIES)
- $(LINK) -rpath $(serverplugindir) $(libpam_passthru_plugin_la_LDFLAGS) $(libpam_passthru_plugin_la_OBJECTS) $(libpam_passthru_plugin_la_LIBADD) $(LIBS)
+ $(LINK) $(am_libpam_passthru_plugin_la_rpath) $(libpam_passthru_plugin_la_LDFLAGS) $(libpam_passthru_plugin_la_OBJECTS) $(libpam_passthru_plugin_la_LIBADD) $(LIBS)
ldap/servers/plugins/passthru/$(am__dirstamp):
@$(mkdir_p) ldap/servers/plugins/passthru
@: > ldap/servers/plugins/passthru/$(am__dirstamp)
diff --git a/config.h.in b/config.h.in
index ae48930a..9409bd78 100644
--- a/config.h.in
+++ b/config.h.in
@@ -12,6 +12,15 @@
/* cpu type sparc */
#undef CPU_sparc
+/* enable the dna plugin */
+#undef ENABLE_DNA
+
+/* enable ldapi support in the server */
+#undef ENABLE_LDAPI
+
+/* enable the pam passthru auth plugin */
+#undef ENABLE_PAM_PASSTHRU
+
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
diff --git a/configure b/configure
index 9a40453a..8e90fcce 100755
--- a/configure
+++ b/configure
@@ -465,7 +465,7 @@ ac_includes_default="\
#endif"
ac_default_prefix=/opt/$PACKAGE_NAME
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -1038,8 +1038,14 @@ Optional Features:
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
- --enable-debug Enable debug features
- --enable-bundle Enable bundled dependencies
+ --enable-debug Enable debug features (default: no)
+ --enable-bundle Enable bundled dependencies (default: no)
+ --enable-pam-passthru enable the PAM passthrough auth plugin (default:
+ yes)
+ --enable-dna enable the Distributed Numeric Assignment (DNA)
+ plugin (default: yes)
+ --enable-ldapi enable LDAP over unix domain socket (LDAPI) support
+ (default: yes)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1050,7 +1056,10 @@ Optional Packages:
--with-tags[=TAGS]
include additional configurations [automatic]
--with-fhs Use FHS layout
- --with-instconfigdir=/path Base directory for instance specific writable configuration directories (default $sysconfdir/$PACKAGE_NAME)
+ --with-instconfigdir=/path
+ Base directory for instance specific writable
+ configuration directories (default
+ $sysconfdir/$PACKAGE_NAME)
--with-nspr=PATH Netscape Portable Runtime (NSPR) directory
--with-nspr-inc=PATH Netscape Portable Runtime (NSPR) include file directory
--with-nspr-lib=PATH Netscape Portable Runtime (NSPR) library directory
@@ -4299,7 +4308,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4302 "configure"' > conftest.$ac_ext
+ echo '#line 4311 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -5434,7 +5443,7 @@ fi
# Provide some information about the compiler.
-echo "$as_me:5437:" \
+echo "$as_me:5446:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -6497,11 +6506,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6500: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6509: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6504: \$? = $ac_status" >&5
+ echo "$as_me:6513: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -6765,11 +6774,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6768: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6777: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6772: \$? = $ac_status" >&5
+ echo "$as_me:6781: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -6869,11 +6878,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6872: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6881: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:6876: \$? = $ac_status" >&5
+ echo "$as_me:6885: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -8338,7 +8347,7 @@ linux*)
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 8341 "configure"' > conftest.$ac_ext
+ echo '#line 8350 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -9235,7 +9244,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9238 "configure"
+#line 9247 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9335,7 +9344,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9338 "configure"
+#line 9347 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11678,11 +11687,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11681: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11690: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11685: \$? = $ac_status" >&5
+ echo "$as_me:11694: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -11782,11 +11791,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11785: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11794: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11789: \$? = $ac_status" >&5
+ echo "$as_me:11798: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12318,7 +12327,7 @@ linux*)
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 12321 "configure"' > conftest.$ac_ext
+ echo '#line 12330 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -13376,11 +13385,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13379: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13388: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13383: \$? = $ac_status" >&5
+ echo "$as_me:13392: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -13480,11 +13489,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13483: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13492: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13487: \$? = $ac_status" >&5
+ echo "$as_me:13496: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14929,7 +14938,7 @@ linux*)
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 14932 "configure"' > conftest.$ac_ext
+ echo '#line 14941 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -15707,11 +15716,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15710: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15719: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15714: \$? = $ac_status" >&5
+ echo "$as_me:15723: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -15975,11 +15984,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15978: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15987: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15982: \$? = $ac_status" >&5
+ echo "$as_me:15991: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16079,11 +16088,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16082: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16091: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16086: \$? = $ac_status" >&5
+ echo "$as_me:16095: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17548,7 +17557,7 @@ linux*)
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 17551 "configure"' > conftest.$ac_ext
+ echo '#line 17560 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -22906,6 +22915,97 @@ else
fi
+# these enables are for optional or experimental features
+if test -z "$enable_pam_passthru" ; then
+ enable_pam_passthru=yes # if not set on cmdline, set default
+fi
+echo "$as_me:$LINENO: checking for --enable-pam-passthru" >&5
+echo $ECHO_N "checking for --enable-pam-passthru... $ECHO_C" >&6
+# Check whether --enable-pam-passthru or --disable-pam-passthru was given.
+if test "${enable_pam_passthru+set}" = set; then
+ enableval="$enable_pam_passthru"
+
+fi;
+if test "$enable_pam_passthru" = yes ; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_PAM_PASSTHRU 1
+_ACEOF
+
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+if test "$enable_pam_passthru" = "yes"; then
+ enable_pam_passthru_TRUE=
+ enable_pam_passthru_FALSE='#'
+else
+ enable_pam_passthru_TRUE='#'
+ enable_pam_passthru_FALSE=
+fi
+
+
+if test -z "$enable_dna" ; then
+ enable_dna=yes # if not set on cmdline, set default
+fi
+echo "$as_me:$LINENO: checking for --enable-dna" >&5
+echo $ECHO_N "checking for --enable-dna... $ECHO_C" >&6
+# Check whether --enable-dna or --disable-dna was given.
+if test "${enable_dna+set}" = set; then
+ enableval="$enable_dna"
+
+fi;
+if test "$enable_dna" = yes ; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_DNA 1
+_ACEOF
+
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+if test "$enable_dna" = "yes"; then
+ enable_dna_TRUE=
+ enable_dna_FALSE='#'
+else
+ enable_dna_TRUE='#'
+ enable_dna_FALSE=
+fi
+
+
+if test -z "$enable_ldapi" ; then
+ enable_ldapi=yes # if not set on cmdline, set default
+fi
+echo "$as_me:$LINENO: checking for --enable-ldapi" >&5
+echo $ECHO_N "checking for --enable-ldapi... $ECHO_C" >&6
+# Check whether --enable-ldapi or --disable-ldapi was given.
+if test "${enable_ldapi+set}" = set; then
+ enableval="$enable_ldapi"
+
+fi;
+if test "$enable_ldapi" = yes ; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_LDAPI 1
+_ACEOF
+
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# the default prefix - override with --prefix or --with-fhs
# BEGIN COPYRIGHT BLOCK
@@ -22990,9 +23090,6 @@ scripttemplatedir=/$PACKAGE_NAME/script-templates
-{ echo "$as_me:$LINENO: checking for instconfigdir..." >&5
-echo "$as_me: checking for instconfigdir..." >&6;}
-
# check for --with-instconfigdir
echo "$as_me:$LINENO: checking for --with-instconfigdir" >&5
echo $ECHO_N "checking for --with-instconfigdir... $ECHO_C" >&6
@@ -25107,6 +25204,20 @@ echo "$as_me: error: conditional \"BUNDLE\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${enable_pam_passthru_TRUE}" && test -z "${enable_pam_passthru_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"enable_pam_passthru\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"enable_pam_passthru\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${enable_dna_TRUE}" && test -z "${enable_dna_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"enable_dna\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"enable_dna\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
if test -z "${WINNT_TRUE}" && test -z "${WINNT_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"WINNT\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@@ -25733,6 +25844,10 @@ s,@LIBOBJS@,$LIBOBJS,;t t
s,@debug_defs@,$debug_defs,;t t
s,@BUNDLE_TRUE@,$BUNDLE_TRUE,;t t
s,@BUNDLE_FALSE@,$BUNDLE_FALSE,;t t
+s,@enable_pam_passthru_TRUE@,$enable_pam_passthru_TRUE,;t t
+s,@enable_pam_passthru_FALSE@,$enable_pam_passthru_FALSE,;t t
+s,@enable_dna_TRUE@,$enable_dna_TRUE,;t t
+s,@enable_dna_FALSE@,$enable_dna_FALSE,;t t
s,@configdir@,$configdir,;t t
s,@sampledatadir@,$sampledatadir,;t t
s,@propertydir@,$propertydir,;t t
diff --git a/configure.ac b/configure.ac
index 336e757b..c2e66d6c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,7 +51,7 @@ AC_FUNC_VPRINTF
AC_CHECK_FUNCS([setrlimit endpwent ftruncate getcwd gethostbyname inet_ntoa localtime_r memmove memset mkdir munmap putenv rmdir socket strcasecmp strchr strcspn strdup strerror strncasecmp strpbrk strrchr strstr strtol tzset])
AC_MSG_CHECKING(for --enable-debug)
-AC_ARG_ENABLE(debug, [ --enable-debug Enable debug features],
+AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [Enable debug features (default: no)]),
[
AC_MSG_RESULT(yes)
debug_defs="-DDEBUG -DMCC_DEBUG"
@@ -64,7 +64,7 @@ AC_SUBST([debug_defs])
# Used for legacy style packaging where we bundle all of the dependencies.
AC_MSG_CHECKING(for --enable-bundle)
-AC_ARG_ENABLE(bundle, [ --enable-bundle Enable bundled dependencies],
+AC_ARG_ENABLE(bundle, AS_HELP_STRING([--enable-bundle], [Enable bundled dependencies (default: no)]),
[
AC_MSG_RESULT(yes)
bundle="1";
@@ -75,6 +75,52 @@ AC_ARG_ENABLE(bundle, [ --enable-bundle Enable bundled dependencies],
])
AM_CONDITIONAL(BUNDLE,test "$bundle" = "1")
+# these enables are for optional or experimental features
+if test -z "$enable_pam_passthru" ; then
+ enable_pam_passthru=yes # if not set on cmdline, set default
+fi
+AC_MSG_CHECKING(for --enable-pam-passthru)
+AC_ARG_ENABLE(pam-passthru,
+ AS_HELP_STRING([--enable-pam-passthru],
+ [enable the PAM passthrough auth plugin (default: yes)]))
+if test "$enable_pam_passthru" = yes ; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([ENABLE_PAM_PASSTHRU], [1], [enable the pam passthru auth plugin])
+else
+ AC_MSG_RESULT(no)
+fi
+AM_CONDITIONAL(enable_pam_passthru,test "$enable_pam_passthru" = "yes")
+
+if test -z "$enable_dna" ; then
+ enable_dna=yes # if not set on cmdline, set default
+fi
+AC_MSG_CHECKING(for --enable-dna)
+AC_ARG_ENABLE(dna,
+ AS_HELP_STRING([--enable-dna],
+ [enable the Distributed Numeric Assignment (DNA) plugin (default: yes)]))
+if test "$enable_dna" = yes ; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([ENABLE_DNA], [1], [enable the dna plugin])
+else
+ AC_MSG_RESULT(no)
+fi
+AM_CONDITIONAL(enable_dna,test "$enable_dna" = "yes")
+
+if test -z "$enable_ldapi" ; then
+ enable_ldapi=yes # if not set on cmdline, set default
+fi
+AC_MSG_CHECKING(for --enable-ldapi)
+AC_ARG_ENABLE(ldapi,
+ AS_HELP_STRING([--enable-ldapi],
+ [enable LDAP over unix domain socket (LDAPI) support (default: yes)]))
+if test "$enable_ldapi" = yes ; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([ENABLE_LDAPI], [1], [enable ldapi support in the server])
+else
+ AC_MSG_RESULT(no)
+fi
+
+# the default prefix - override with --prefix or --with-fhs
AC_PREFIX_DEFAULT([/opt/$PACKAGE_NAME])
m4_include(m4/fhs.m4)
@@ -115,11 +161,11 @@ AC_SUBST(serverdir)
AC_SUBST(serverplugindir)
AC_SUBST(scripttemplatedir)
-AC_CHECKING(for instconfigdir)
-
# check for --with-instconfigdir
AC_MSG_CHECKING(for --with-instconfigdir)
-AC_ARG_WITH(instconfigdir, [ --with-instconfigdir=/path Base directory for instance specific writable configuration directories (default $sysconfdir/$PACKAGE_NAME)],
+AC_ARG_WITH(instconfigdir,
+ AS_HELP_STRING([--with-instconfigdir=/path],
+ [Base directory for instance specific writable configuration directories (default $sysconfdir/$PACKAGE_NAME)]),
[
if test $withval = yes ; then
AC_ERROR([Please specify a full path with --with-instconfigdir])
diff --git a/ldap/admin/src/create_instance.c b/ldap/admin/src/create_instance.c
index 8da5696b..cf5c16b3 100644
--- a/ldap/admin/src/create_instance.c
+++ b/ldap/admin/src/create_instance.c
@@ -3149,7 +3149,8 @@ char *ds_gen_confs(char *sroot, server_config_s *cf, char *cs_path)
#endif
/* enable pass thru authentication */
- if (cf->use_existing_config_ds || cf->use_existing_user_ds)
+ if ((cf->use_existing_config_ds && cf->config_ldap_url) ||
+ (cf->use_existing_user_ds && cf->user_ldap_url))
{
LDAPURLDesc *desc = 0;
char *url = cf->use_existing_config_ds ? cf->config_ldap_url :
@@ -3195,7 +3196,7 @@ char *ds_gen_confs(char *sroot, server_config_s *cf, char *cs_path)
fprintf(f, "\n");
}
-#ifdef BUILD_PAM_PASSTHRU
+#ifdef ENABLE_PAM_PASSTHRU
#if !defined( XP_WIN32 )
/* PAM Pass Through Auth plugin - off by default */
fprintf(f, "dn: cn=PAM Pass Through Auth,cn=plugins,cn=config\n");
@@ -3215,13 +3216,27 @@ char *ds_gen_confs(char *sroot, server_config_s *cf, char *cs_path)
fprintf(f, "pamExcludeSuffix: %s\n", cf->netscaperoot);
}
fprintf(f, "pamExcludeSuffix: cn=config\n");
- fprintf(f, "pamMapMethod: RDN\n");
+ fprintf(f, "pamIDMapMethod: RDN\n");
+ fprintf(f, "pamIDAttr: notUsedWithRDNMethod\n");
fprintf(f, "pamFallback: FALSE\n");
fprintf(f, "pamSecure: TRUE\n");
fprintf(f, "pamService: ldapserver\n");
fprintf(f, "\n");
#endif /* NO PAM FOR WINDOWS */
-#endif /* BUILD_PAM_PASSTHRU */
+#endif /* ENABLE_PAM_PASSTHRU */
+
+#ifdef ENABLE_DNA
+ fprintf(f, "dn: cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config\n");
+ fprintf(f, "objectclass: top\n");
+ fprintf(f, "objectclass: nsSlapdPlugin\n");
+ fprintf(f, "objectclass: extensibleObject\n");
+ fprintf(f, "objectclass: nsContainer\n");
+ fprintf(f, "cn: Distributed Numeric Assignment Plugin\n");
+ fprintf(f, "nsslapd-plugininitfunc: dna_init\n");
+ fprintf(f, "nsslapd-plugintype: preoperation\n");
+ fprintf(f, "nsslapd-pluginenabled: off\n");
+ fprintf(f, "nsslapd-pluginPath: %s/libdna-plugin%s\n", cf->plugin_dir, shared_lib);
+#endif /* ENABLE_DNA */
fprintf(f, "dn: cn=ldbm database,cn=plugins,cn=config\n");
fprintf(f, "objectclass: top\n");