#! /bin/sh
# $OpenLDAP$
-# from OpenLDAP: pkg/ldap/configure.in,v 1.306 2000/06/05 05:19:11 kurt Exp
+# from OpenLDAP: pkg/ldap/configure.in,v 1.307 2000/06/05 21:56:28 kurt Exp
# Copyright 1998-2000 The OpenLDAP Foundation. All Rights Reserved.
#
ac_help="$ac_help
--enable-dynamic enable linking built binaries with dynamic libs (no)"
ac_help="$ac_help
- --enable-bdb2 enable bdb2 backend (no)"
-ac_help="$ac_help
- --with-bdb2-module module type (static)"
-ac_help="$ac_help
- --enable-dnssrv enable bdb2 backend (no)"
+ --enable-dnssrv enable dnssrv backend (no)"
ac_help="$ac_help
--with-dnssrv-module module type (static)"
ac_help="$ac_help
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:680: checking host system type" >&5
+echo "configure:676: checking host system type" >&5
if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
# Make sure we can run config.sub.
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:721: checking target system type" >&5
+echo "configure:717: checking target system type" >&5
if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
# Make sure we can run config.sub.
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:761: checking build system type" >&5
+echo "configure:757: checking build system type" >&5
if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
# Make sure we can run config.sub.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:838: checking for a BSD compatible install" >&5
+echo "configure:834: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"\${ac_cv_path_install+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:895: checking whether build environment is sane" >&5
+echo "configure:891: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:956: checking for $ac_word" >&5
+echo "configure:952: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
done
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:986: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:982: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:1026: checking for working aclocal" >&5
+echo "configure:1022: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1039: checking for working autoconf" >&5
+echo "configure:1035: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:1052: checking for working automake" >&5
+echo "configure:1048: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1065: checking for working autoheader" >&5
+echo "configure:1061: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1078: checking for working makeinfo" >&5
+echo "configure:1074: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1098: checking for $ac_word" >&5
+echo "configure:1094: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking configure arguments""... $ac_c" 1>&6
-echo "configure:1149: checking configure arguments" >&5
+echo "configure:1145: checking configure arguments" >&5
top_builddir=`pwd`
fi
# end --enable-dynamic
-# OpenLDAP --enable-bdb2
- # Check whether --enable-bdb2 or --disable-bdb2 was given.
-if test "${enable_bdb2+set}" = set; then
- enableval="$enable_bdb2"
-
- ol_arg=invalid
- for ol_val in auto yes no ; do
- if test "$enableval" = "$ol_val" ; then
- ol_arg="$ol_val"
- fi
- done
- if test "$ol_arg" = "invalid" ; then
- { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
- fi
- ol_enable_bdb2="$ol_arg"
-
-else
- ol_enable_bdb2="no"
-fi
-# end --enable-bdb2
-# OpenLDAP --with-bdb2_module
- # Check whether --with-bdb2_module or --without-bdb2_module was given.
-if test "${with_bdb2_module+set}" = set; then
- withval="$with_bdb2_module"
-
- ol_arg=invalid
- for ol_val in static dynamic ; do
- if test "$withval" = "$ol_val" ; then
- ol_arg="$ol_val"
- fi
- done
- if test "$ol_arg" = "invalid" ; then
- { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
- fi
- ol_with_bdb2_module="$ol_arg"
-
-else
- ol_with_bdb2_module="static"
-fi
-# end --with-bdb2_module
-
# OpenLDAP --enable-dnssrv
# Check whether --enable-dnssrv or --disable-dnssrv was given.
if test "${enable_dnssrv+set}" = set; then
# validate options
if test $ol_enable_slapd = no ; then
- if test $ol_enable_bdb2 = yes ; then
- echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
- fi
- if test $ol_enable_dnssrv = yes ; then
+ if test $ol_enable_dnssrv = yes ; then
echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
fi
if test $ol_enable_ldap = yes ; then
if test $ol_with_ldbm_type != auto ; then
echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
fi
- if test $ol_with_bdb2_module != static ; then
- echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
- fi
if test $ol_with_dnssrv_module != static ; then
echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
fi
fi
# force settings to no
- ol_enable_bdb2=no
ol_enable_dnssrv=no
ol_enable_ldap=no
ol_enable_ldbm=no
ol_with_ldbm_api=no
ol_with_ldbm_type=no
- ol_with_bdb2_module=static
ol_with_dnssrv_module=static
ol_with_ldap_module=static
ol_with_ldbm_module=static
echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
fi
- if test $ol_enable_bdb2 = yes ; then
- { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
- fi
-
if test $ol_enable_modules != yes -a \
$ol_enable_dnssrv = no -a \
$ol_enable_ldap = no -a \
ol_with_ldbm_type=no
ol_with_ldbm_module=static
-elif test $ol_enable_bdb2 = yes ; then
-
- if test $ol_with_ldbm_api != auto -a \
- $ol_with_ldbm_api != berkeley ; then
- { echo "configure: error: BDB2 requires LDBM API berkeley or auto" 1>&2; exit 1; }
- fi
-
- ol_with_ldbm_api=db2
-
else
-
- if test $ol_enable_bdb2 != no ; then
- if test $ol_with_ldbm_api != auto -a \
- $ol_with_ldbm_api != berkeley ; then
- echo "configure: warning: BDB2 requires LDBM api berkeley or auto" 1>&2
- ol_enable_bdb2=no
- fi
- fi
-
- if test $ol_with_ldbm_api = gdbm -a \
+ if test $ol_with_ldbm_api = gdbm -a \
$ol_with_ldbm_type = btree ; then
{ echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
fi
BUILD_QUIPU=no
BUILD_THREAD=no
-BUILD_BDB2=no
BUILD_DNSSRV=no
BUILD_LDAP=no
BUILD_LDBM=no
BUILD_SQL=no
BUILD_TCL=no
-BUILD_BDB2_DYNAMIC=static
BUILD_DNSSRV_DYNAMIC=static
BUILD_LDAP_DYNAMIC=static
BUILD_LDBM_DYNAMIC=static
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2565: checking for $ac_word" >&5
+echo "configure:2488: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2617: checking for $ac_word" >&5
+echo "configure:2540: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2677: checking for $ac_word" >&5
+echo "configure:2600: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2707: checking for $ac_word" >&5
+echo "configure:2630: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2737: checking for $ac_word" >&5
+echo "configure:2660: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2788: checking for $ac_word" >&5
+echo "configure:2711: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2820: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
+echo "configure:2743: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
cat > conftest.$ac_ext << EOF
-#line 2831 "configure"
+#line 2754 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2862: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2785: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2867: checking whether we are using GNU C" >&5
+echo "configure:2790: checking whether we are using GNU C" >&5
if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2895: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2818: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$ac_cv_prog_gcc" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:2938: checking for ld used by GCC" >&5
+echo "configure:2861: checking for ld used by GCC" >&5
ac_prog=`($CC -print-prog-name=ld) 2>&5`
case "$ac_prog" in
# Accept absolute paths.
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:2962: checking for GNU ld" >&5
+echo "configure:2885: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:2965: checking for non-GNU ld" >&5
+echo "configure:2888: checking for non-GNU ld" >&5
fi
if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:3000: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:2923: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:3016: checking for BSD-compatible nm" >&5
+echo "configure:2939: checking for BSD-compatible nm" >&5
if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:3052: checking whether ln -s works" >&5
+echo "configure:2975: checking whether ln -s works" >&5
if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$lt_target" in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 3107 "configure"' > conftest.$ac_ext
- if { (eval echo configure:3108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 3030 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:3031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
LD="${LD-ld} -32"
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:3129: checking whether the C compiler needs -belf" >&5
+echo "configure:3052: checking whether the C compiler needs -belf" >&5
if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3134 "configure"
+#line 3057 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:3141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ac_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3164: checking for $ac_word" >&5
+echo "configure:3087: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3196: checking for $ac_word" >&5
+echo "configure:3119: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
set dummy ${ac_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3231: checking for $ac_word" >&5
+echo "configure:3154: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3263: checking for $ac_word" >&5
+echo "configure:3186: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
set dummy ${ac_tool_prefix}objdump; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3298: checking for $ac_word" >&5
+echo "configure:3221: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "objdump", so it can be a program name with args.
set dummy objdump; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3330: checking for $ac_word" >&5
+echo "configure:3253: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3398: checking for $ac_word" >&5
+echo "configure:3321: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# test for ln hardlink support
echo $ac_n "checking whether ln works""... $ac_c" 1>&6
-echo "configure:3429: checking whether ln works" >&5
+echo "configure:3352: checking whether ln works" >&5
if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:3452: checking whether ln -s works" >&5
+echo "configure:3375: checking whether ln -s works" >&5
if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "sendmail", so it can be a program name with args.
set dummy sendmail; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3480: checking for $ac_word" >&5
+echo "configure:3403: checking for $ac_word" >&5
if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "vi", so it can be a program name with args.
set dummy vi; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3516: checking for $ac_word" >&5
+echo "configure:3439: checking for $ac_word" >&5
if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "finger", so it can be a program name with args.
set dummy finger; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3552: checking for $ac_word" >&5
+echo "configure:3475: checking for $ac_word" >&5
if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3591: checking for $ac_word" >&5
+echo "configure:3514: checking for $ac_word" >&5
if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:3642: checking how to run the C preprocessor" >&5
+echo "configure:3565: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 3657 "configure"
+#line 3580 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 3674 "configure"
+#line 3597 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 3691 "configure"
+#line 3614 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
fi
echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:3735: checking for AIX" >&5
+echo "configure:3658: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
-#line 3737 "configure"
+#line 3660 "configure"
#include "confdefs.h"
#ifdef _AIX
yes
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:3759: checking for POSIXized ISC" >&5
+echo "configure:3682: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
-echo "configure:3781: checking for minix/config.h" >&5
+echo "configure:3704: checking for minix/config.h" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3786 "configure"
+#line 3709 "configure"
#include "confdefs.h"
#include <minix/config.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:3830: checking for Cygwin environment" >&5
+echo "configure:3753: checking for Cygwin environment" >&5
if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3835 "configure"
+#line 3758 "configure"
#include "confdefs.h"
int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:3846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:3862: checking for mingw32 environment" >&5
+echo "configure:3785: checking for mingw32 environment" >&5
if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3867 "configure"
+#line 3790 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:3874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
MINGW32=
test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
-echo "configure:3890: checking for EMX OS/2 environment" >&5
+echo "configure:3813: checking for EMX OS/2 environment" >&5
if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3895 "configure"
+#line 3818 "configure"
#include "confdefs.h"
int main() {
return __EMX__;
; return 0; }
EOF
-if { (eval echo configure:3902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_emxos2=yes
else
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3921: checking for executable suffix" >&5
+echo "configure:3844: checking for executable suffix" >&5
if eval "test \"\${ac_cv_exeext+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:3931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:3854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.C | *.o | *.obj | *.xcoff) ;;
ac_exeext=$EXEEXT
echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:3952: checking for object suffix" >&5
+echo "configure:3875: checking for object suffix" >&5
if eval "test \"\${ac_cv_objext+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:3958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
for ac_file in conftest.*; do
case $ac_file in
*.c) ;;
echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
-echo "configure:3982: checking for be_app in -lbe" >&5
+echo "configure:3905: checking for be_app in -lbe" >&5
ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lbe -lroot -lnet $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3990 "configure"
+#line 3913 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
be_app()
; return 0; }
EOF
-if { (eval echo configure:4001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
-echo "configure:4027: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "configure:3950: checking for ${CC-cc} option to accept ANSI C" >&5
if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
do
CC="$ac_save_CC $ac_arg"
cat > conftest.$ac_ext <<EOF
-#line 4044 "configure"
+#line 3967 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
; return 0; }
EOF
-if { (eval echo configure:4081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_prog_cc_stdc="$ac_arg"; break
else
OL_MKDEP="${CC-cc}"
if test -z "${MKDEP_FLAGS}"; then
echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
-echo "configure:4115: checking for ${OL_MKDEP} depend flag" >&5
+echo "configure:4038: checking for ${OL_MKDEP} depend flag" >&5
if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<EOF
noCode;
EOF
- if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
+ if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
| egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
then
if test ! -f conftest."${ac_object}" ; then
fi
echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
-echo "configure:4158: checking for afopen in -ls" >&5
+echo "configure:4081: checking for afopen in -ls" >&5
ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ls $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4166 "configure"
+#line 4089 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
afopen()
; return 0; }
EOF
-if { (eval echo configure:4177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4210: checking for $ac_hdr" >&5
+echo "configure:4133: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4215 "configure"
+#line 4138 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
fi
echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
-echo "configure:4252: checking for lt_dlinit in -lltdl" >&5
+echo "configure:4175: checking for lt_dlinit in -lltdl" >&5
ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lltdl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4260 "configure"
+#line 4183 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
lt_dlinit()
; return 0; }
EOF
-if { (eval echo configure:4271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
ol_link_modules=yes
else
- ol_with_bdb2_module=static
ol_with_dnssrv_module=static
ol_with_ldap_module=static
ol_with_ldbm_module=static
# test for EBCDIC
echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
-echo "configure:4316: checking for EBCDIC" >&5
+echo "configure:4238: checking for EBCDIC" >&5
if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4322 "configure"
+#line 4244 "configure"
#include "confdefs.h"
#if !('M' == 0xd4)
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:4355: checking for ANSI C header files" >&5
+echo "configure:4277: checking for ANSI C header files" >&5
if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4360 "configure"
+#line 4282 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ol_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 4385 "configure"
+#line 4307 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if test $ol_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 4403 "configure"
+#line 4325 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 4424 "configure"
+#line 4346 "configure"
#include "confdefs.h"
#include <ctype.h>
#ifndef HAVE_EBCDIC
exit (0); }
EOF
-if { (eval echo configure:4442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:4476: checking for $ac_hdr that defines DIR" >&5
+echo "configure:4398: checking for $ac_hdr that defines DIR" >&5
if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4481 "configure"
+#line 4403 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:4489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:4514: checking for opendir in -ldir" >&5
+echo "configure:4436: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4522 "configure"
+#line 4444 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
opendir()
; return 0; }
EOF
-if { (eval echo configure:4533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:4555: checking for opendir in -lx" >&5
+echo "configure:4477: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4563 "configure"
+#line 4485 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
opendir()
; return 0; }
EOF
-if { (eval echo configure:4574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:4597: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:4519: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4602 "configure"
+#line 4524 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:4618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
fi
echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
-echo "configure:4639: checking POSIX termios" >&5
+echo "configure:4561: checking POSIX termios" >&5
if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4644 "configure"
+#line 4566 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <unistd.h>
tcgetattr(0, 0);
; return 0; }
EOF
-if { (eval echo configure:4654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_sys_posix_termios=yes
else
echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
-echo "configure:4670: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
+echo "configure:4592: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gwinsz_in_termios_h=no
if test $am_cv_sys_posix_termios = yes; then
cat > conftest.$ac_ext <<EOF
-#line 4679 "configure"
+#line 4601 "configure"
#include "confdefs.h"
#include <sys/types.h>
# include <termios.h>
if test $gwinsz_in_termios_h = no; then
cat > conftest.$ac_ext <<EOF
-#line 4699 "configure"
+#line 4621 "configure"
#include "confdefs.h"
#include <sys/types.h>
# include <sys/ioctl.h>
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4782: checking for $ac_hdr" >&5
+echo "configure:4704: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4787 "configure"
+#line 4709 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
-echo "configure:4822: checking for sigset in -lV3" >&5
+echo "configure:4744: checking for sigset in -lV3" >&5
ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lV3 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4830 "configure"
+#line 4752 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
sigset()
; return 0; }
EOF
-if { (eval echo configure:4841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test $ac_cv_header_winsock_h = yes; then
echo $ac_n "checking for winsock""... $ac_c" 1>&6
-echo "configure:4871: checking for winsock" >&5
+echo "configure:4793: checking for winsock" >&5
if eval "test \"\${ol_cv_winsock+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4876 "configure"
+#line 4798 "configure"
#include "confdefs.h"
#include <winsock.h>
int main() {
; return 0; }
EOF
-if { (eval echo configure:4888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_winsock=yes
else
echo $ac_n "checking for socket""... $ac_c" 1>&6
-echo "configure:4916: checking for socket" >&5
+echo "configure:4838: checking for socket" >&5
if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4921 "configure"
+#line 4843 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char socket(); below. */
; return 0; }
EOF
-if { (eval echo configure:4945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_socket=yes"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
-echo "configure:4964: checking for main in -lsocket" >&5
+echo "configure:4886: checking for main in -lsocket" >&5
ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4972 "configure"
+#line 4894 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:4979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
-echo "configure:5007: checking for main in -lnet" >&5
+echo "configure:4929: checking for main in -lnet" >&5
ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lnet $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5015 "configure"
+#line 4937 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
-echo "configure:5050: checking for main in -lnsl_s" >&5
+echo "configure:4972: checking for main in -lnsl_s" >&5
ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lnsl_s $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5058 "configure"
+#line 4980 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
-echo "configure:5093: checking for main in -lnsl" >&5
+echo "configure:5015: checking for main in -lnsl" >&5
ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5101 "configure"
+#line 5023 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
-echo "configure:5136: checking for socket in -linet" >&5
+echo "configure:5058: checking for socket in -linet" >&5
ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-linet $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5144 "configure"
+#line 5066 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
socket()
; return 0; }
EOF
-if { (eval echo configure:5155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
-echo "configure:5183: checking for main in -lgen" >&5
+echo "configure:5105: checking for main in -lgen" >&5
ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lgen $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5191 "configure"
+#line 5113 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo $ac_n "checking for select""... $ac_c" 1>&6
-echo "configure:5230: checking for select" >&5
+echo "configure:5152: checking for select" >&5
if eval "test \"\${ac_cv_func_select+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5235 "configure"
+#line 5157 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char select(); below. */
; return 0; }
EOF
-if { (eval echo configure:5259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_select=yes"
else
if test "${ac_cv_header_winsock_h}" != yes; then
echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
-echo "configure:5282: checking types of arguments for select()" >&5
+echo "configure:5204: checking types of arguments for select()" >&5
if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
cat > conftest.$ac_ext <<EOF
-#line 5296 "configure"
+#line 5218 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
; return 0; }
EOF
-if { (eval echo configure:5315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_not_found=no ; break 3
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5360: checking for $ac_hdr" >&5
+echo "configure:5282: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5365 "configure"
+#line 5287 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
{ echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
fi
echo $ac_n "checking for regfree""... $ac_c" 1>&6
-echo "configure:5400: checking for regfree" >&5
+echo "configure:5322: checking for regfree" >&5
if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5405 "configure"
+#line 5327 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char regfree(); below. */
; return 0; }
EOF
-if { (eval echo configure:5429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_regfree=yes"
else
echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
-echo "configure:5452: checking for compatible POSIX regex" >&5
+echo "configure:5374: checking for compatible POSIX regex" >&5
if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ol_cv_c_posix_regex=cross
else
cat > conftest.$ac_ext <<EOF
-#line 5461 "configure"
+#line 5383 "configure"
#include "confdefs.h"
#include <sys/types.h>
return rc;
}
EOF
-if { (eval echo configure:5487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ol_cv_c_posix_regex=yes
else
ol_link_dnssrv=no
echo $ac_n "checking for res_query""... $ac_c" 1>&6
-echo "configure:5509: checking for res_query" >&5
+echo "configure:5431: checking for res_query" >&5
if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5514 "configure"
+#line 5436 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char res_query(); below. */
; return 0; }
EOF
-if { (eval echo configure:5538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_res_query=yes"
else
if test $ac_cv_func_res_query = no ; then
echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
-echo "configure:5559: checking for res_query in -lbind" >&5
+echo "configure:5481: checking for res_query in -lbind" >&5
ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lbind $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5567 "configure"
+#line 5489 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
res_query()
; return 0; }
EOF
-if { (eval echo configure:5578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test $ac_cv_func_res_query = no ; then
echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
-echo "configure:5610: checking for __res_query in -lbind" >&5
+echo "configure:5532: checking for __res_query in -lbind" >&5
ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lbind $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5618 "configure"
+#line 5540 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
__res_query()
; return 0; }
EOF
-if { (eval echo configure:5629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test $ac_cv_func_res_query = no ; then
echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
-echo "configure:5661: checking for res_query in -lresolv" >&5
+echo "configure:5583: checking for res_query in -lresolv" >&5
ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5669 "configure"
+#line 5591 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
res_query()
; return 0; }
EOF
-if { (eval echo configure:5680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5730: checking for $ac_hdr" >&5
+echo "configure:5652: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5735 "configure"
+#line 5657 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5788: checking for $ac_hdr" >&5
+echo "configure:5710: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5793 "configure"
+#line 5715 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5830: checking for $ac_hdr" >&5
+echo "configure:5752: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5835 "configure"
+#line 5757 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test $krb5_impl = mit; then
echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
-echo "configure:5874: checking for main in -lkrb5" >&5
+echo "configure:5796: checking for main in -lkrb5" >&5
ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lkrb5 -lcrypto -lcom_err $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5882 "configure"
+#line 5804 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
elif test $krb5_impl = heimdal; then
echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
-echo "configure:5914: checking for main in -lkrb5" >&5
+echo "configure:5836: checking for main in -lkrb5" >&5
ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5922 "configure"
+#line 5844 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5991: checking for $ac_hdr" >&5
+echo "configure:5913: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5996 "configure"
+#line 5918 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ac_cv_header_kerberosIV_krb_h = yes ; then
if test $krb5_impl = mit; then
echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
-echo "configure:6031: checking for main in -lkrb4" >&5
+echo "configure:5953: checking for main in -lkrb4" >&5
ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6039 "configure"
+#line 5961 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:6046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
elif test $krb5_impl = heimdal; then
echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
-echo "configure:6071: checking for main in -lkrb4" >&5
+echo "configure:5993: checking for main in -lkrb4" >&5
ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6079 "configure"
+#line 6001 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:6086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
-echo "configure:6128: checking for des_debug in Kerberos libraries" >&5
+echo "configure:6050: checking for des_debug in Kerberos libraries" >&5
if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
save_LIBS="$LIBS"
LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6136 "configure"
+#line 6058 "configure"
#include "confdefs.h"
#include <kerberosIV/krb.h>
; return 0; }
EOF
-if { (eval echo configure:6149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_var_des_debug=yes
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6188: checking for $ac_hdr" >&5
+echo "configure:6110: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6193 "configure"
+#line 6115 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ac_cv_header_krb_h = yes ; then
echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
-echo "configure:6227: checking for main in -lkrb" >&5
+echo "configure:6149: checking for main in -lkrb" >&5
ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lkrb -ldes $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6235 "configure"
+#line 6157 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:6242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6306: checking for $ac_hdr" >&5
+echo "configure:6228: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6311 "configure"
+#line 6233 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
-echo "configure:6345: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
+echo "configure:6267: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lssl -lcrypto $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6353 "configure"
+#line 6275 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
SSLeay_add_ssl_algorithms()
; return 0; }
EOF
-if { (eval echo configure:6364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test $have_ssleay = no ; then
echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
-echo "configure:6389: checking for SSL_library_init in -lssl" >&5
+echo "configure:6311: checking for SSL_library_init in -lssl" >&5
ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lssl -lcrypto $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6397 "configure"
+#line 6319 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
SSL_library_init()
; return 0; }
EOF
-if { (eval echo configure:6408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test $have_ssleay = no ; then
echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
-echo "configure:6434: checking for ssl3_accept in -lssl" >&5
+echo "configure:6356: checking for ssl3_accept in -lssl" >&5
ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6442 "configure"
+#line 6364 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
ssl3_accept()
; return 0; }
EOF
-if { (eval echo configure:6453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6513: checking for $ac_func" >&5
+echo "configure:6435: checking for $ac_func" >&5
if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6518 "configure"
+#line 6440 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:6542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
ol_cv_func_ctime_r_nargs=0
else
echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
-echo "configure:6571: checking number of arguments of ctime_r" >&5
+echo "configure:6493: checking number of arguments of ctime_r" >&5
if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6576 "configure"
+#line 6498 "configure"
#include "confdefs.h"
#include <time.h>
int main() {
time_t ti; char *buffer; ctime_r(&ti,buffer,32);
; return 0; }
EOF
-if { (eval echo configure:6583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_func_ctime_r_nargs3=yes
else
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 6595 "configure"
+#line 6517 "configure"
#include "confdefs.h"
#include <time.h>
int main() {
time_t ti; char *buffer; ctime_r(&ti,buffer);
; return 0; }
EOF
-if { (eval echo configure:6602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_func_ctime_r_nargs2=yes
else
if test "$ac_cv_func_gethostbyname_r" = yes ; then
echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
-echo "configure:6642: checking number of arguments of gethostbyname_r" >&5
+echo "configure:6564: checking number of arguments of gethostbyname_r" >&5
if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6647 "configure"
+#line 6569 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
buffer, bufsize, &h_errno);
; return 0; }
EOF
-if { (eval echo configure:6661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_func_gethostbyname_r_nargs5=yes
else
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 6673 "configure"
+#line 6595 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
&rhent, &h_errno);
; return 0; }
EOF
-if { (eval echo configure:6688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_func_gethostbyname_r_nargs6=yes
else
if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
-echo "configure:6729: checking number of arguments of gethostbyaddr_r" >&5
+echo "configure:6651: checking number of arguments of gethostbyaddr_r" >&5
if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6734 "configure"
+#line 6656 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
alen, AF_INET, &hent, buffer, bufsize, &h_errno);
; return 0; }
EOF
-if { (eval echo configure:6750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_func_gethostbyaddr_r_nargs7=yes
else
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 6762 "configure"
+#line 6684 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
&rhent, &h_errno);
; return 0; }
EOF
-if { (eval echo configure:6780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_func_gethostbyaddr_r_nargs8=yes
else
echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
-echo "configure:6843: checking for NT Threads" >&5
+echo "configure:6765: checking for NT Threads" >&5
if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
-echo "configure:6849: checking for _beginthread" >&5
+echo "configure:6771: checking for _beginthread" >&5
if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6854 "configure"
+#line 6776 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _beginthread(); below. */
; return 0; }
EOF
-if { (eval echo configure:6878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func__beginthread=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6938: checking for $ac_hdr" >&5
+echo "configure:6860: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6943 "configure"
+#line 6865 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ac_cv_header_pthread_h = yes ; then
echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
-echo "configure:6977: checking POSIX thread version" >&5
+echo "configure:6899: checking POSIX thread version" >&5
if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6983 "configure"
+#line 6905 "configure"
#include "confdefs.h"
# include <pthread.h>
cat > conftest.$ac_ext <<EOF
-#line 7005 "configure"
+#line 6927 "configure"
#include "confdefs.h"
# include <pthread.h>
echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
-echo "configure:7058: checking for LinuxThreads pthread.h" >&5
+echo "configure:6980: checking for LinuxThreads pthread.h" >&5
if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7063 "configure"
+#line 6985 "configure"
#include "confdefs.h"
#include <pthread.h>
EOF
echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
-echo "configure:7090: checking for GNU Pth pthread.h" >&5
+echo "configure:7012: checking for GNU Pth pthread.h" >&5
if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7095 "configure"
+#line 7017 "configure"
#include "confdefs.h"
#include <pthread.h>
#ifdef _POSIX_THREAD_IS_GNU_PTH
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7124: checking for $ac_hdr" >&5
+echo "configure:7046: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7129 "configure"
+#line 7051 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
-echo "configure:7164: checking for pthread_create in default libraries" >&5
+echo "configure:7086: checking for pthread_create in default libraries" >&5
if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
cat > conftest.$ac_ext <<EOF
-#line 7171 "configure"
+#line 7093 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:7227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_pthread_create=yes
else
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 7239 "configure"
+#line 7161 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:7300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ol_cv_pthread_create=yes
else
if test "$ol_link_threads" = no ; then
# try -kthread
echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
-echo "configure:7325: checking for pthread link with -kthread" >&5
+echo "configure:7247: checking for pthread link with -kthread" >&5
if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
cat > conftest.$ac_ext <<EOF
-#line 7336 "configure"
+#line 7258 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:7392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_pthread_kthread=yes
else
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 7404 "configure"
+#line 7326 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:7465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ol_cv_pthread_kthread=yes
else
if test "$ol_link_threads" = no ; then
# try -pthread
echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
-echo "configure:7495: checking for pthread link with -pthread" >&5
+echo "configure:7417: checking for pthread link with -pthread" >&5
if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
cat > conftest.$ac_ext <<EOF
-#line 7506 "configure"
+#line 7428 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:7562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_pthread_pthread=yes
else
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 7574 "configure"
+#line 7496 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:7635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ol_cv_pthread_pthread=yes
else
if test "$ol_link_threads" = no ; then
# try -pthreads
echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
-echo "configure:7665: checking for pthread link with -pthreads" >&5
+echo "configure:7587: checking for pthread link with -pthreads" >&5
if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
cat > conftest.$ac_ext <<EOF
-#line 7676 "configure"
+#line 7598 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:7732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_pthread_pthreads=yes
else
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 7744 "configure"
+#line 7666 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:7805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ol_cv_pthread_pthreads=yes
else
if test "$ol_link_threads" = no ; then
# try -mthreads
echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
-echo "configure:7835: checking for pthread link with -mthreads" >&5
+echo "configure:7757: checking for pthread link with -mthreads" >&5
if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
cat > conftest.$ac_ext <<EOF
-#line 7846 "configure"
+#line 7768 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:7902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_pthread_mthreads=yes
else
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 7914 "configure"
+#line 7836 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:7975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ol_cv_pthread_mthreads=yes
else
if test "$ol_link_threads" = no ; then
# try -thread
echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
-echo "configure:8005: checking for pthread link with -thread" >&5
+echo "configure:7927: checking for pthread link with -thread" >&5
if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
cat > conftest.$ac_ext <<EOF
-#line 8016 "configure"
+#line 7938 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:8072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_pthread_thread=yes
else
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 8084 "configure"
+#line 8006 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:8145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ol_cv_pthread_thread=yes
else
if test "$ol_link_threads" = no ; then
# try -lpthread -lmach -lexc -lc_r
echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
-echo "configure:8176: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
+echo "configure:8098: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
cat > conftest.$ac_ext <<EOF
-#line 8187 "configure"
+#line 8109 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:8243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
else
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 8255 "configure"
+#line 8177 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:8316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
else
if test "$ol_link_threads" = no ; then
# try -lpthread -lmach -lexc
echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
-echo "configure:8346: checking for pthread link with -lpthread -lmach -lexc" >&5
+echo "configure:8268: checking for pthread link with -lpthread -lmach -lexc" >&5
if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
cat > conftest.$ac_ext <<EOF
-#line 8357 "configure"
+#line 8279 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:8413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_pthread_lpthread_lmach_lexc=yes
else
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 8425 "configure"
+#line 8347 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:8486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ol_cv_pthread_lpthread_lmach_lexc=yes
else
if test "$ol_link_threads" = no ; then
# try -lpthread -Wl,-woff,85
echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
-echo "configure:8517: checking for pthread link with -lpthread -Wl,-woff,85" >&5
+echo "configure:8439: checking for pthread link with -lpthread -Wl,-woff,85" >&5
if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
cat > conftest.$ac_ext <<EOF
-#line 8528 "configure"
+#line 8450 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:8584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_pthread_lib_lpthread_woff=yes
else
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 8596 "configure"
+#line 8518 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:8657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ol_cv_pthread_lib_lpthread_woff=yes
else
if test "$ol_link_threads" = no ; then
# try -lpthread
echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
-echo "configure:8688: checking for pthread link with -lpthread" >&5
+echo "configure:8610: checking for pthread link with -lpthread" >&5
if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
cat > conftest.$ac_ext <<EOF
-#line 8699 "configure"
+#line 8621 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:8755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_pthread_lpthread=yes
else
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 8767 "configure"
+#line 8689 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:8828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ol_cv_pthread_lpthread=yes
else
if test "$ol_link_threads" = no ; then
# try -lc_r
echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
-echo "configure:8858: checking for pthread link with -lc_r" >&5
+echo "configure:8780: checking for pthread link with -lc_r" >&5
if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
cat > conftest.$ac_ext <<EOF
-#line 8869 "configure"
+#line 8791 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:8925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_pthread_lc_r=yes
else
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 8937 "configure"
+#line 8859 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:8998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ol_cv_pthread_lc_r=yes
else
if test "$ol_link_threads" = no ; then
# try -threads
echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
-echo "configure:9029: checking for pthread link with -threads" >&5
+echo "configure:8951: checking for pthread link with -threads" >&5
if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
cat > conftest.$ac_ext <<EOF
-#line 9040 "configure"
+#line 8962 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:9096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_pthread_threads=yes
else
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 9108 "configure"
+#line 9030 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:9169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ol_cv_pthread_threads=yes
else
if test "$ol_link_threads" = no ; then
# try -lpthreads -lmach -lexc -lc_r
echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
-echo "configure:9200: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
+echo "configure:9122: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
cat > conftest.$ac_ext <<EOF
-#line 9211 "configure"
+#line 9133 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:9267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
else
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 9279 "configure"
+#line 9201 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:9340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
else
if test "$ol_link_threads" = no ; then
# try -lpthreads -lmach -lexc
echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
-echo "configure:9370: checking for pthread link with -lpthreads -lmach -lexc" >&5
+echo "configure:9292: checking for pthread link with -lpthreads -lmach -lexc" >&5
if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
cat > conftest.$ac_ext <<EOF
-#line 9381 "configure"
+#line 9303 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:9437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_pthread_lpthreads_lmach_lexc=yes
else
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 9449 "configure"
+#line 9371 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:9510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ol_cv_pthread_lpthreads_lmach_lexc=yes
else
if test "$ol_link_threads" = no ; then
# try -lpthreads -lexc
echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
-echo "configure:9540: checking for pthread link with -lpthreads -lexc" >&5
+echo "configure:9462: checking for pthread link with -lpthreads -lexc" >&5
if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
cat > conftest.$ac_ext <<EOF
-#line 9551 "configure"
+#line 9473 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:9607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_pthread_lpthreads_lexc=yes
else
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 9619 "configure"
+#line 9541 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:9680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ol_cv_pthread_lpthreads_lexc=yes
else
if test "$ol_link_threads" = no ; then
# try -lpthreads
echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
-echo "configure:9711: checking for pthread link with -lpthreads" >&5
+echo "configure:9633: checking for pthread link with -lpthreads" >&5
if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
cat > conftest.$ac_ext <<EOF
-#line 9722 "configure"
+#line 9644 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:9778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_pthread_lib_lpthreads=yes
else
rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 9790 "configure"
+#line 9712 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:9851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ol_cv_pthread_lib_lpthreads=yes
else
for ac_func in sched_yield pthread_yield
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9893: checking for $ac_func" >&5
+echo "configure:9815: checking for $ac_func" >&5
if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9898 "configure"
+#line 9820 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:9922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
if test $ac_cv_func_sched_yield = no -a \
$ac_cv_func_pthread_yield = no ; then
echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
-echo "configure:9950: checking for sched_yield in -lrt" >&5
+echo "configure:9872: checking for sched_yield in -lrt" >&5
ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lrt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 9958 "configure"
+#line 9880 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
sched_yield()
; return 0; }
EOF
-if { (eval echo configure:9969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
for ac_func in thr_yield
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:10001: checking for $ac_func" >&5
+echo "configure:9923: checking for $ac_func" >&5
if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10006 "configure"
+#line 9928 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:10030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
for ac_func in pthread_kill
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:10064: checking for $ac_func" >&5
+echo "configure:9986: checking for $ac_func" >&5
if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10069 "configure"
+#line 9991 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:10093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
-echo "configure:10119: checking for pthread_detach with <pthread.h>" >&5
+echo "configure:10041: checking for pthread_detach with <pthread.h>" >&5
if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10125 "configure"
+#line 10047 "configure"
#include "confdefs.h"
#include <pthread.h>
pthread_detach(NULL);
; return 0; }
EOF
-if { (eval echo configure:10137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_func_pthread_detach=yes
else
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:10169: checking for $ac_func" >&5
+echo "configure:10091: checking for $ac_func" >&5
if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10174 "configure"
+#line 10096 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:10198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
-echo "configure:10225: checking for pthread_kill_other_threads_np" >&5
+echo "configure:10147: checking for pthread_kill_other_threads_np" >&5
if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10230 "configure"
+#line 10152 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char pthread_kill_other_threads_np(); below. */
; return 0; }
EOF
-if { (eval echo configure:10254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_pthread_kill_other_threads_np=yes"
else
fi
echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
-echo "configure:10274: checking for LinuxThreads implementation" >&5
+echo "configure:10196: checking for LinuxThreads implementation" >&5
if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
-echo "configure:10287: checking for LinuxThreads consistency" >&5
+echo "configure:10209: checking for LinuxThreads consistency" >&5
if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
-echo "configure:10312: checking if pthread_create() works" >&5
+echo "configure:10234: checking if pthread_create() works" >&5
if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ol_cv_pthread_create_works=yes
else
cat > conftest.$ac_ext <<EOF
-#line 10321 "configure"
+#line 10243 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:10382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ol_cv_pthread_create_works=yes
else
if test $ol_with_yielding_select = auto ; then
echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
-echo "configure:10404: checking if select yields when using pthreads" >&5
+echo "configure:10326: checking if select yields when using pthreads" >&5
if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ol_cv_pthread_select_yields=cross
else
cat > conftest.$ac_ext <<EOF
-#line 10413 "configure"
+#line 10335 "configure"
#include "confdefs.h"
#include <sys/types.h>
exit(2);
}
EOF
-if { (eval echo configure:10489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ol_cv_pthread_select_yields=no
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:10533: checking for $ac_hdr" >&5
+echo "configure:10455: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10538 "configure"
+#line 10460 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
ol_with_threads=found
echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
-echo "configure:10573: checking for cthread_fork" >&5
+echo "configure:10495: checking for cthread_fork" >&5
if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10578 "configure"
+#line 10500 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char cthread_fork(); below. */
; return 0; }
EOF
-if { (eval echo configure:10602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_cthread_fork=yes"
else
if test $ol_link_threads = no ; then
echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
-echo "configure:10624: checking for cthread_fork with -all_load" >&5
+echo "configure:10546: checking for cthread_fork with -all_load" >&5
if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
save_LIBS="$LIBS"
LIBS="-all_load $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 10632 "configure"
+#line 10554 "configure"
#include "confdefs.h"
#include <mach/cthreads.h>
int main() {
; return 0; }
EOF
-if { (eval echo configure:10641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_cthread_all_load=yes
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:10686: checking for $ac_hdr" >&5
+echo "configure:10608: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10691 "configure"
+#line 10613 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ac_cv_header_pth_h = yes ; then
echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
-echo "configure:10725: checking for pth_version in -lpth" >&5
+echo "configure:10647: checking for pth_version in -lpth" >&5
ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lpth $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 10733 "configure"
+#line 10655 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
pth_version()
; return 0; }
EOF
-if { (eval echo configure:10744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:10788: checking for $ac_hdr" >&5
+echo "configure:10710: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10793 "configure"
+#line 10715 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
-echo "configure:10826: checking for thr_create in -lthread" >&5
+echo "configure:10748: checking for thr_create in -lthread" >&5
ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 10834 "configure"
+#line 10756 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
thr_create()
; return 0; }
EOF
-if { (eval echo configure:10845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:10885: checking for $ac_func" >&5
+echo "configure:10807: checking for $ac_func" >&5
if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10890 "configure"
+#line 10812 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:10914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:10945: checking for $ac_hdr" >&5
+echo "configure:10867: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10950 "configure"
+#line 10872 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ac_cv_header_lwp_lwp_h = yes ; then
echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
-echo "configure:10983: checking for lwp_create in -llwp" >&5
+echo "configure:10905: checking for lwp_create in -llwp" >&5
ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-llwp $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 10991 "configure"
+#line 10913 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
lwp_create()
; return 0; }
EOF
-if { (eval echo configure:11002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11055: checking for $ac_hdr" >&5
+echo "configure:10977: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 11060 "configure"
+#line 10982 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
for ac_func in sched_yield pthread_yield
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:11094: checking for $ac_func" >&5
+echo "configure:11016: checking for $ac_func" >&5
if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 11099 "configure"
+#line 11021 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:11123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
-echo "configure:11149: checking for LinuxThreads pthread.h" >&5
+echo "configure:11071: checking for LinuxThreads pthread.h" >&5
if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 11154 "configure"
+#line 11076 "configure"
#include "confdefs.h"
#include <pthread.h>
EOF
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11184: checking for $ac_hdr" >&5
+echo "configure:11106: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 11189 "configure"
+#line 11111 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11224: checking for $ac_hdr" >&5
+echo "configure:11146: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 11229 "configure"
+#line 11151 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11264: checking for $ac_hdr" >&5
+echo "configure:11186: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 11269 "configure"
+#line 11191 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11196: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
-echo "configure:11333: checking for thread specific errno" >&5
+echo "configure:11255: checking for thread specific errno" >&5
if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 11339 "configure"
+#line 11261 "configure"
#include "confdefs.h"
#include <errno.h>
int main() {
errno = 0;
; return 0; }
EOF
-if { (eval echo configure:11346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_errno_thread_specific=yes
else
echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
-echo "configure:11362: checking for thread specific h_errno" >&5
+echo "configure:11284: checking for thread specific h_errno" >&5
if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 11368 "configure"
+#line 11290 "configure"
#include "confdefs.h"
#include <netdb.h>
int main() {
h_errno = 0;
; return 0; }
EOF
-if { (eval echo configure:11375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_h_errno_thread_specific=yes
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11434: checking for $ac_hdr" >&5
+echo "configure:11356: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 11439 "configure"
+#line 11361 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
-echo "configure:11472: checking if Berkeley DB header compatibility" >&5
+echo "configure:11394: checking if Berkeley DB header compatibility" >&5
if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 11478 "configure"
+#line 11400 "configure"
#include "confdefs.h"
#if HAVE_DB_185_H
ol_cv_lib_db=no
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
-echo "configure:11515: checking for Berkeley DB link (default)" >&5
+echo "configure:11437: checking for Berkeley DB link (default)" >&5
if eval "test \"\${ol_cv_db_none+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 11525 "configure"
+#line 11447 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:11554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_none=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
-echo "configure:11578: checking for Berkeley DB link (-ldb)" >&5
+echo "configure:11500: checking for Berkeley DB link (-ldb)" >&5
if eval "test \"\${ol_cv_db_db+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 11588 "configure"
+#line 11510 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:11617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
-echo "configure:11641: checking for Berkeley DB link (-ldb3)" >&5
+echo "configure:11563: checking for Berkeley DB link (-ldb3)" >&5
if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 11651 "configure"
+#line 11573 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:11680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db3=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
-echo "configure:11704: checking for Berkeley DB link (-ldb2)" >&5
+echo "configure:11626: checking for Berkeley DB link (-ldb2)" >&5
if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 11714 "configure"
+#line 11636 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:11743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db2=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
-echo "configure:11767: checking for Berkeley DB link (-ldb1)" >&5
+echo "configure:11689: checking for Berkeley DB link (-ldb1)" >&5
if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 11777 "configure"
+#line 11699 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:11806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db1=yes
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11841: checking for $ac_hdr" >&5
+echo "configure:11763: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 11846 "configure"
+#line 11768 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
ol_cv_lib_db=no
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
-echo "configure:11881: checking for Berkeley DB link (default)" >&5
+echo "configure:11803: checking for Berkeley DB link (default)" >&5
if eval "test \"\${ol_cv_db_none+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 11891 "configure"
+#line 11813 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:11920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_none=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
-echo "configure:11944: checking for Berkeley DB link (-ldb)" >&5
+echo "configure:11866: checking for Berkeley DB link (-ldb)" >&5
if eval "test \"\${ol_cv_db_db+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 11954 "configure"
+#line 11876 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:11983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
-echo "configure:12007: checking for Berkeley DB link (-ldb3)" >&5
+echo "configure:11929: checking for Berkeley DB link (-ldb3)" >&5
if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 12017 "configure"
+#line 11939 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:12046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db3=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
-echo "configure:12070: checking for Berkeley DB link (-ldb2)" >&5
+echo "configure:11992: checking for Berkeley DB link (-ldb2)" >&5
if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 12080 "configure"
+#line 12002 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:12109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db2=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
-echo "configure:12133: checking for Berkeley DB link (-ldb1)" >&5
+echo "configure:12055: checking for Berkeley DB link (-ldb1)" >&5
if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 12143 "configure"
+#line 12065 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:12172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db1=yes
else
if test "$ol_cv_lib_db" != no ; then
ol_cv_berkeley_db=yes
echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
-echo "configure:12198: checking for Berkeley DB thread support" >&5
+echo "configure:12120: checking for Berkeley DB thread support" >&5
if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ol_cv_berkeley_db_thread=cross
else
cat > conftest.$ac_ext <<EOF
-#line 12212 "configure"
+#line 12134 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
return rc;
}
EOF
-if { (eval echo configure:12252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ol_cv_berkeley_db_thread=yes
else
if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
-echo "configure:12316: checking for MDBM library" >&5
+echo "configure:12238: checking for MDBM library" >&5
if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ol_LIBS="$LIBS"
echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
-echo "configure:12322: checking for mdbm_set_chain" >&5
+echo "configure:12244: checking for mdbm_set_chain" >&5
if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 12327 "configure"
+#line 12249 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char mdbm_set_chain(); below. */
; return 0; }
EOF
-if { (eval echo configure:12351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_mdbm_set_chain=yes"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
-echo "configure:12370: checking for mdbm_set_chain in -lmdbm" >&5
+echo "configure:12292: checking for mdbm_set_chain in -lmdbm" >&5
ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lmdbm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 12378 "configure"
+#line 12300 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
mdbm_set_chain()
; return 0; }
EOF
-if { (eval echo configure:12389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:12424: checking for $ac_hdr" >&5
+echo "configure:12346: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 12429 "configure"
+#line 12351 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
done
echo $ac_n "checking for db""... $ac_c" 1>&6
-echo "configure:12461: checking for db" >&5
+echo "configure:12383: checking for db" >&5
if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
-echo "configure:12494: checking for GDBM library" >&5
+echo "configure:12416: checking for GDBM library" >&5
if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ol_LIBS="$LIBS"
echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
-echo "configure:12500: checking for gdbm_open" >&5
+echo "configure:12422: checking for gdbm_open" >&5
if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 12505 "configure"
+#line 12427 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gdbm_open(); below. */
; return 0; }
EOF
-if { (eval echo configure:12529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_gdbm_open=yes"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
-echo "configure:12548: checking for gdbm_open in -lgdbm" >&5
+echo "configure:12470: checking for gdbm_open in -lgdbm" >&5
ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lgdbm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 12556 "configure"
+#line 12478 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
gdbm_open()
; return 0; }
EOF
-if { (eval echo configure:12567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:12602: checking for $ac_hdr" >&5
+echo "configure:12524: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 12607 "configure"
+#line 12529 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
done
echo $ac_n "checking for db""... $ac_c" 1>&6
-echo "configure:12639: checking for db" >&5
+echo "configure:12561: checking for db" >&5
if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test $ol_with_ldbm_api = ndbm ; then
echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
-echo "configure:12673: checking for NDBM library" >&5
+echo "configure:12595: checking for NDBM library" >&5
if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ol_LIBS="$LIBS"
echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
-echo "configure:12679: checking for dbm_open" >&5
+echo "configure:12601: checking for dbm_open" >&5
if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 12684 "configure"
+#line 12606 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dbm_open(); below. */
; return 0; }
EOF
-if { (eval echo configure:12708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_dbm_open=yes"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
-echo "configure:12727: checking for dbm_open in -lndbm" >&5
+echo "configure:12649: checking for dbm_open in -lndbm" >&5
ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lndbm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 12735 "configure"
+#line 12657 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dbm_open()
; return 0; }
EOF
-if { (eval echo configure:12746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
-echo "configure:12766: checking for dbm_open in -ldbm" >&5
+echo "configure:12688: checking for dbm_open in -ldbm" >&5
ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ldbm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 12774 "configure"
+#line 12696 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dbm_open()
; return 0; }
EOF
-if { (eval echo configure:12785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:12822: checking for $ac_hdr" >&5
+echo "configure:12744: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 12827 "configure"
+#line 12749 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
done
echo $ac_n "checking for db""... $ac_c" 1>&6
-echo "configure:12859: checking for db" >&5
+echo "configure:12781: checking for db" >&5
if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ol_enable_ldbm=no
fi
-ol_link_bdb2=no
-if test $ol_enable_bdb2 != no ; then
- if test $ol_enable_bdb2 = yes -a $ol_link_ldbm != berkeley ; then
- { echo "configure: error: BDB2 requires LDBM BerkeleyDB 2" 1>&2; exit 1; }
- elif test $ol_link_ldbm = berkeley ; then
- ol_link_bdb2=$ol_link_ldbm
- fi
-fi
-
if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
LINK_BINS_DYNAMIC="yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:12921: checking for $ac_hdr" >&5
+echo "configure:12834: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 12926 "configure"
+#line 12839 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
have_wrappers=no
else
cat > conftest.$ac_ext <<EOF
-#line 12962 "configure"
+#line 12875 "configure"
#include "confdefs.h"
int allow_severity = 0;
hosts_access()
; return 0; }
EOF
-if { (eval echo configure:12972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:12885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
have_wrappers=yes
else
WRAP_LIBS="-lwrap"
echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
-echo "configure:12992: checking for main in -lnsl" >&5
+echo "configure:12905: checking for main in -lnsl" >&5
ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 13000 "configure"
+#line 12913 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:13007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test $ol_enable_syslog != no ; then
echo $ac_n "checking for openlog""... $ac_c" 1>&6
-echo "configure:13048: checking for openlog" >&5
+echo "configure:12961: checking for openlog" >&5
if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 13053 "configure"
+#line 12966 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char openlog(); below. */
; return 0; }
EOF
-if { (eval echo configure:13077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_openlog=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:13107: checking for $ac_hdr" >&5
+echo "configure:13020: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 13112 "configure"
+#line 13025 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:13117: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:13030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
else
for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
-echo "configure:13149: checking for main in -l$lib" >&5
+echo "configure:13062: checking for main in -l$lib" >&5
ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-l$lib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 13157 "configure"
+#line 13070 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:13164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:13208: checking for $ac_hdr" >&5
+echo "configure:13121: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 13213 "configure"
+#line 13126 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:13218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:13131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ol_link_termcap = no ; then
echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
-echo "configure:13247: checking for tputs in -ltermcap" >&5
+echo "configure:13160: checking for tputs in -ltermcap" >&5
ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ltermcap $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 13255 "configure"
+#line 13168 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
tputs()
; return 0; }
EOF
-if { (eval echo configure:13266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test $ol_link_termcap = no ; then
echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
-echo "configure:13299: checking for initscr in -lncurses" >&5
+echo "configure:13212: checking for initscr in -lncurses" >&5
ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 13307 "configure"
+#line 13220 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
initscr()
; return 0; }
EOF
-if { (eval echo configure:13318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test $ol_with_cyrus_sasl != no ; then
ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
-echo "configure:13362: checking for sasl.h" >&5
+echo "configure:13275: checking for sasl.h" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 13367 "configure"
+#line 13280 "configure"
#include "confdefs.h"
#include <sasl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:13372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:13285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ac_cv_header_sasl_h = yes ; then
echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
-echo "configure:13396: checking for sasl_client_init in -lsasl" >&5
+echo "configure:13309: checking for sasl_client_init in -lsasl" >&5
ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lsasl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 13404 "configure"
+#line 13317 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
sasl_client_init()
; return 0; }
EOF
-if { (eval echo configure:13415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
ol_LIBS=$LIBS
LIBS="-lfetch -lcom_err $LIBS"
echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
-echo "configure:13479: checking fetch(3) library" >&5
+echo "configure:13392: checking fetch(3) library" >&5
if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 13485 "configure"
+#line 13398 "configure"
#include "confdefs.h"
#include <sys/param.h>
struct url *u = fetchParseURL("file:///");
; return 0; }
EOF
-if { (eval echo configure:13495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_lib_fetch=yes
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:13533: checking for $ac_hdr" >&5
+echo "configure:13446: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 13538 "configure"
+#line 13451 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:13543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:13456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
save_LIBS="$LIBS"
LIBS="$TERMCAP_LIBS $LIBS"
echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
-echo "configure:13574: checking for readline in -lreadline" >&5
+echo "configure:13487: checking for readline in -lreadline" >&5
ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lreadline $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 13582 "configure"
+#line 13495 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
readline()
; return 0; }
EOF
-if { (eval echo configure:13593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test $ol_enable_crypt != no ; then
echo $ac_n "checking for crypt""... $ac_c" 1>&6
-echo "configure:13635: checking for crypt" >&5
+echo "configure:13548: checking for crypt" >&5
if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 13640 "configure"
+#line 13553 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char crypt(); below. */
; return 0; }
EOF
-if { (eval echo configure:13664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_crypt=yes"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:13683: checking for crypt in -lcrypt" >&5
+echo "configure:13596: checking for crypt in -lcrypt" >&5
ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lcrypt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 13691 "configure"
+#line 13604 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
crypt()
; return 0; }
EOF
-if { (eval echo configure:13702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test $ol_enable_proctitle != no ; then
echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
-echo "configure:13745: checking for setproctitle" >&5
+echo "configure:13658: checking for setproctitle" >&5
if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 13750 "configure"
+#line 13663 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char setproctitle(); below. */
; return 0; }
EOF
-if { (eval echo configure:13774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_setproctitle=yes"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
-echo "configure:13793: checking for setproctitle in -lutil" >&5
+echo "configure:13706: checking for setproctitle in -lutil" >&5
ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lutil $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 13801 "configure"
+#line 13714 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
setproctitle()
; return 0; }
EOF
-if { (eval echo configure:13812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:13848: checking for ANSI C header files" >&5
+echo "configure:13761: checking for ANSI C header files" >&5
if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 13853 "configure"
+#line 13766 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:13861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:13774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 13878 "configure"
+#line 13791 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 13896 "configure"
+#line 13809 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 13917 "configure"
+#line 13830 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
exit (0); }
EOF
-if { (eval echo configure:13935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:13848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
fi
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:13959: checking for mode_t" >&5
+echo "configure:13872: checking for mode_t" >&5
if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 13964 "configure"
+#line 13877 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:13995: checking for off_t" >&5
+echo "configure:13908: checking for off_t" >&5
if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 14000 "configure"
+#line 13913 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:14031: checking for pid_t" >&5
+echo "configure:13944: checking for pid_t" >&5
if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 14036 "configure"
+#line 13949 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
-echo "configure:14067: checking for ptrdiff_t" >&5
+echo "configure:13980: checking for ptrdiff_t" >&5
if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 14072 "configure"
+#line 13985 "configure"
#include "confdefs.h"
#include <stddef.h>
int main() {
ptrdiff_t p
; return 0; }
EOF
-if { (eval echo configure:14079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:13992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_type_ptrdiff_t=yes
else
fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:14100: checking return type of signal handlers" >&5
+echo "configure:14013: checking return type of signal handlers" >&5
if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 14105 "configure"
+#line 14018 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:14122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:14035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:14141: checking for size_t" >&5
+echo "configure:14054: checking for size_t" >&5
if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 14146 "configure"
+#line 14059 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:14178: checking for ssize_t" >&5
+echo "configure:14091: checking for ssize_t" >&5
if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 14183 "configure"
+#line 14096 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
-echo "configure:14214: checking for caddr_t" >&5
+echo "configure:14127: checking for caddr_t" >&5
if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 14219 "configure"
+#line 14132 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
-echo "configure:14251: checking for socklen_t" >&5
+echo "configure:14164: checking for socklen_t" >&5
if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 14256 "configure"
+#line 14169 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
socklen_t len;
; return 0; }
EOF
-if { (eval echo configure:14270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:14183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_type_socklen_t=yes
else
fi
echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
-echo "configure:14291: checking for member st_blksize in aggregate type struct stat" >&5
+echo "configure:14204: checking for member st_blksize in aggregate type struct stat" >&5
if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 14296 "configure"
+#line 14209 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
struct stat foo; foo.st_blksize;
; return 0; }
EOF
-if { (eval echo configure:14304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:14217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_struct_member_st_blksize=yes
else
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:14326: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:14239: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"\${ac_cv_header_time+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 14331 "configure"
+#line 14244 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:14340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:14253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
fi
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:14361: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:14274: checking whether struct tm is in sys/time.h or time.h" >&5
if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 14366 "configure"
+#line 14279 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:14374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:14287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
fi
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:14395: checking for uid_t in sys/types.h" >&5
+echo "configure:14308: checking for uid_t in sys/types.h" >&5
if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 14400 "configure"
+#line 14313 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
fi
echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
-echo "configure:14429: checking for sig_atomic_t" >&5
+echo "configure:14342: checking for sig_atomic_t" >&5
if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 14434 "configure"
+#line 14347 "configure"
#include "confdefs.h"
#include <signal.h>
int main() {
sig_atomic_t atomic;
; return 0; }
EOF
-if { (eval echo configure:14441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:14354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_type_sig_atomic_t=yes
else
# test for pw_gecos in struct passwd
echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
-echo "configure:14465: checking struct passwd for pw_gecos" >&5
+echo "configure:14378: checking struct passwd for pw_gecos" >&5
if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 14471 "configure"
+#line 14384 "configure"
#include "confdefs.h"
#include <pwd.h>
int main() {
; return 0; }
EOF
-if { (eval echo configure:14481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:14394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_struct_passwd_pw_gecos=yes
else
# test for pw_passwd in struct passwd
echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
-echo "configure:14503: checking struct passwd for pw_passwd" >&5
+echo "configure:14416: checking struct passwd for pw_passwd" >&5
if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 14509 "configure"
+#line 14422 "configure"
#include "confdefs.h"
#include <pwd.h>
int main() {
; return 0; }
EOF
-if { (eval echo configure:14519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:14432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_struct_passwd_pw_passwd=yes
else
echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
-echo "configure:14541: checking if toupper() requires islower()" >&5
+echo "configure:14454: checking if toupper() requires islower()" >&5
if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ol_cv_c_upper_lower=safe
else
cat > conftest.$ac_ext <<EOF
-#line 14550 "configure"
+#line 14463 "configure"
#include "confdefs.h"
#include <ctype.h>
exit(1);
}
EOF
-if { (eval echo configure:14562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:14475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ol_cv_c_upper_lower=no
else
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:14585: checking for working const" >&5
+echo "configure:14498: checking for working const" >&5
if eval "test \"\${ac_cv_c_const+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 14590 "configure"
+#line 14503 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:14639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:14552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
fi
echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
-echo "configure:14660: checking if compiler understands volatile" >&5
+echo "configure:14573: checking if compiler understands volatile" >&5
if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 14665 "configure"
+#line 14578 "configure"
#include "confdefs.h"
int x, y, z;
int main() {
*b = 0;
; return 0; }
EOF
-if { (eval echo configure:14674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:14587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_c_volatile=yes
else
else
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:14704: checking whether byte ordering is bigendian" >&5
+echo "configure:14617: checking whether byte ordering is bigendian" >&5
if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
-#line 14711 "configure"
+#line 14624 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:14722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:14635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
-#line 14726 "configure"
+#line 14639 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:14737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:14650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 14757 "configure"
+#line 14670 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:14770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:14683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
fi
echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:14796: checking size of short" >&5
+echo "configure:14709: checking size of short" >&5
if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 14802 "configure"
+#line 14715 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
switch (0) case 0: case (sizeof (short) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:14812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:14725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_short=$ac_size
else
echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:14835: checking size of int" >&5
+echo "configure:14748: checking size of int" >&5
if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 14841 "configure"
+#line 14754 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
switch (0) case 0: case (sizeof (int) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:14851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:14764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_int=$ac_size
else
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:14874: checking size of long" >&5
+echo "configure:14787: checking size of long" >&5
if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 14880 "configure"
+#line 14793 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
switch (0) case 0: case (sizeof (long) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:14890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:14803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_long=$ac_size
else
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:14941: checking for 8-bit clean memcmp" >&5
+echo "configure:14854: checking for 8-bit clean memcmp" >&5
if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
-#line 14949 "configure"
+#line 14862 "configure"
#include "confdefs.h"
main()
}
EOF
-if { (eval echo configure:14959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:14872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
echo $ac_n "checking for strftime""... $ac_c" 1>&6
-echo "configure:14977: checking for strftime" >&5
+echo "configure:14890: checking for strftime" >&5
if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 14982 "configure"
+#line 14895 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strftime(); below. */
; return 0; }
EOF
-if { (eval echo configure:15006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_strftime=yes"
else
echo "$ac_t""no" 1>&6
# strftime is in -lintl on SCO UNIX.
echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
-echo "configure:15028: checking for strftime in -lintl" >&5
+echo "configure:14941: checking for strftime in -lintl" >&5
ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 15036 "configure"
+#line 14949 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
strftime()
; return 0; }
EOF
-if { (eval echo configure:15047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
-echo "configure:15075: checking for inet_aton()" >&5
+echo "configure:14988: checking for inet_aton()" >&5
if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 15080 "configure"
+#line 14993 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
int rc = inet_aton( "255.255.255.255", &in );
; return 0; }
EOF
-if { (eval echo configure:15102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_func_inet_aton=yes
else
echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
-echo "configure:15124: checking for _spawnlp" >&5
+echo "configure:15037: checking for _spawnlp" >&5
if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 15129 "configure"
+#line 15042 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _spawnlp(); below. */
; return 0; }
EOF
-if { (eval echo configure:15153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func__spawnlp=yes"
else
echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
-echo "configure:15177: checking for _snprintf" >&5
+echo "configure:15090: checking for _snprintf" >&5
if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 15182 "configure"
+#line 15095 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _snprintf(); below. */
; return 0; }
EOF
-if { (eval echo configure:15206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func__snprintf=yes"
else
echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
-echo "configure:15232: checking for _vsnprintf" >&5
+echo "configure:15145: checking for _vsnprintf" >&5
if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 15237 "configure"
+#line 15150 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _vsnprintf(); below. */
; return 0; }
EOF
-if { (eval echo configure:15261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func__vsnprintf=yes"
else
echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:15287: checking for vprintf" >&5
+echo "configure:15200: checking for vprintf" >&5
if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 15292 "configure"
+#line 15205 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */
; return 0; }
EOF
-if { (eval echo configure:15316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vprintf=yes"
else
if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:15340: checking for _doprnt" >&5
+echo "configure:15253: checking for _doprnt" >&5
if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 15345 "configure"
+#line 15258 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */
; return 0; }
EOF
-if { (eval echo configure:15369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func__doprnt=yes"
else
for ac_func in vsnprintf vsprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15398: checking for $ac_func" >&5
+echo "configure:15311: checking for $ac_func" >&5
if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 15403 "configure"
+#line 15316 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:15427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15506: checking for $ac_func" >&5
+echo "configure:15419: checking for $ac_func" >&5
if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 15511 "configure"
+#line 15424 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:15535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
for ac_func in getopt tempnam
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15563: checking for $ac_func" >&5
+echo "configure:15476: checking for $ac_func" >&5
if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 15568 "configure"
+#line 15481 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:15592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
# Check Configuration
echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
-echo "configure:15629: checking declaration of sys_errlist" >&5
+echo "configure:15542: checking declaration of sys_errlist" >&5
if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 15635 "configure"
+#line 15548 "configure"
#include "confdefs.h"
#include <stdio.h>
char *c = (char *) *sys_errlist
; return 0; }
EOF
-if { (eval echo configure:15648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:15561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_dcl_sys_errlist=yes
ol_cv_have_sys_errlist=yes
echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
-echo "configure:15671: checking existence of sys_errlist" >&5
+echo "configure:15584: checking existence of sys_errlist" >&5
if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 15677 "configure"
+#line 15590 "configure"
#include "confdefs.h"
#include <errno.h>
int main() {
char *c = (char *) *sys_errlist
; return 0; }
EOF
-if { (eval echo configure:15684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_have_sys_errlist=yes
else
SLAPD_MODULES_LDFLAGS="-dlopen self"
fi
-if test "$ol_link_bdb2" != no ; then
- cat >> confdefs.h <<\EOF
-#define SLAPD_BDB2 1
-EOF
-
- BUILD_SLAPD=yes
- BUILD_BDB2=yes
- if test "$ol_with_bdb2_module" != static ; then
- cat >> confdefs.h <<\EOF
-#define SLAPD_BDB2_DYNAMIC 1
-EOF
-
- BUILD_BDB2=mod
- BUILD_BDB2_DYNAMIC=shared
- SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
- fi
-fi
-
if test "$ol_link_dnssrv" != no ; then
cat >> confdefs.h <<\EOF
#define SLAPD_DNSSRV 1
-
-
libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk \
servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
-servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
s%@LT_LIB_LINKAGE@%$LT_LIB_LINKAGE%g
s%@DYN_EXT@%$DYN_EXT%g
s%@BUILD_SLAPD@%$BUILD_SLAPD%g
-s%@BUILD_BDB2@%$BUILD_BDB2%g
s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
s%@BUILD_LDAP@%$BUILD_LDAP%g
s%@BUILD_LDBM@%$BUILD_LDBM%g
s%@BUILD_SHELL@%$BUILD_SHELL%g
s%@BUILD_SQL@%$BUILD_SQL%g
s%@BUILD_TCL@%$BUILD_TCL%g
-s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk \
servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
-servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
OL_ARG_ENABLE(dynamic,[ --enable-dynamic enable linking built binaries with dynamic libs], no)dnl
dnl SLAPD Backend options
-OL_ARG_ENABLE(bdb2,[ --enable-bdb2 enable bdb2 backend], no)dnl
-OL_ARG_WITH(bdb2_module,[ --with-bdb2-module module type], static,
- [static dynamic])
-OL_ARG_ENABLE(dnssrv,[ --enable-dnssrv enable bdb2 backend], no)dnl
+OL_ARG_ENABLE(dnssrv,[ --enable-dnssrv enable dnssrv backend], no)dnl
OL_ARG_WITH(dnssrv_module,[ --with-dnssrv-module module type], static,
[static dynamic])
OL_ARG_ENABLE(ldap,[ --enable-ldap enable ldap backend], no)dnl
# validate options
if test $ol_enable_slapd = no ; then
dnl SLAPD was specificallly disabled
- if test $ol_enable_bdb2 = yes ; then
- AC_MSG_WARN([slapd disabled, ignoring --enable-bdb2 argument])
- fi
if test $ol_enable_dnssrv = yes ; then
AC_MSG_WARN([slapd disabled, ignoring --enable-dnssrv argument])
fi
if test $ol_with_ldbm_type != auto ; then
AC_MSG_WARN([slapd disabled, ignoring --with-ldbm-type argument])
fi
- if test $ol_with_bdb2_module != static ; then
- AC_MSG_WARN([slapd disabled, ignoring --with-bdb2-module argument])
- fi
if test $ol_with_dnssrv_module != static ; then
AC_MSG_WARN([slapd disabled, ignoring --with-dnssrv-module argument])
fi
fi
# force settings to no
- ol_enable_bdb2=no
ol_enable_dnssrv=no
ol_enable_ldap=no
ol_enable_ldbm=no
ol_with_ldbm_api=no
ol_with_ldbm_type=no
- ol_with_bdb2_module=static
ol_with_dnssrv_module=static
ol_with_ldap_module=static
ol_with_ldbm_module=static
AC_MSG_WARN([LDBM disabled, ignoring --with-ldbm-module argument])
fi
- if test $ol_enable_bdb2 = yes ; then
- AC_MSG_ERROR([BDB2 requires --enable-ldbm])
- fi
-
if test $ol_enable_modules != yes -a \
$ol_enable_dnssrv = no -a \
$ol_enable_ldap = no -a \
ol_with_ldbm_type=no
ol_with_ldbm_module=static
-elif test $ol_enable_bdb2 = yes ; then
- dnl SLAPD with BDB2
-
- if test $ol_with_ldbm_api != auto -a \
- $ol_with_ldbm_api != berkeley ; then
- AC_MSG_ERROR([BDB2 requires LDBM API berkeley or auto])
- fi
-
- ol_with_ldbm_api=db2
-
else
dnl SLAPD with LDBM
-
- if test $ol_enable_bdb2 != no ; then
- if test $ol_with_ldbm_api != auto -a \
- $ol_with_ldbm_api != berkeley ; then
- AC_MSG_WARN([BDB2 requires LDBM api berkeley or auto])
- ol_enable_bdb2=no
- fi
- fi
-
if test $ol_with_ldbm_api = gdbm -a \
$ol_with_ldbm_type = btree ; then
AC_MSG_ERROR([GDBM only supports LDBM type hash])
BUILD_QUIPU=no
BUILD_THREAD=no
-BUILD_BDB2=no
BUILD_DNSSRV=no
BUILD_LDAP=no
BUILD_LDBM=no
BUILD_SQL=no
BUILD_TCL=no
-BUILD_BDB2_DYNAMIC=static
BUILD_DNSSRV_DYNAMIC=static
BUILD_LDAP_DYNAMIC=static
BUILD_LDBM_DYNAMIC=static
fi
ol_link_modules=yes
else
- ol_with_bdb2_module=static
ol_with_dnssrv_module=static
ol_with_ldap_module=static
ol_with_ldbm_module=static
ol_enable_ldbm=no
fi
-dnl ----------------------------------------------------------------
-ol_link_bdb2=no
-if test $ol_enable_bdb2 != no ; then
- if test $ol_enable_bdb2 = yes -a $ol_link_ldbm != berkeley ; then
- AC_MSG_ERROR(BDB2 requires LDBM BerkeleyDB 2)
- elif test $ol_link_ldbm = berkeley ; then
- ol_link_bdb2=$ol_link_ldbm
- fi
-fi
-
dnl ----------------------------------------------------------------
if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
LINK_BINS_DYNAMIC="yes"
SLAPD_MODULES_LDFLAGS="-dlopen self"
fi
-if test "$ol_link_bdb2" != no ; then
- AC_DEFINE(SLAPD_BDB2,1,[define to support BDB2 backend])
- BUILD_SLAPD=yes
- BUILD_BDB2=yes
- if test "$ol_with_bdb2_module" != static ; then
- AC_DEFINE(SLAPD_BDB2_DYNAMIC,1,
- [define to support dynamic BDB2 backend])
- BUILD_BDB2=mod
- BUILD_BDB2_DYNAMIC=shared
- SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
- fi
-fi
-
if test "$ol_link_dnssrv" != no ; then
AC_DEFINE(SLAPD_DNSSRV,1,[define to support DNS SRV backend])
BUILD_SLAPD=yes
AC_SUBST(DYN_EXT)
AC_SUBST(BUILD_SLAPD)
- AC_SUBST(BUILD_BDB2)
AC_SUBST(BUILD_DNSSRV)
AC_SUBST(BUILD_LDAP)
AC_SUBST(BUILD_LDBM)
AC_SUBST(BUILD_SHELL)
AC_SUBST(BUILD_SQL)
AC_SUBST(BUILD_TCL)
- AC_SUBST(BUILD_BDB2_DYNAMIC)
AC_SUBST(BUILD_DNSSRV_DYNAMIC)
AC_SUBST(BUILD_LDAP_DYNAMIC)
AC_SUBST(BUILD_LDBM_DYNAMIC)
libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk \
servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
-servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
/* define to support modules */
#undef SLAPD_MODULES
-/* define to support BDB2 backend */
-#undef SLAPD_BDB2
-
-/* define to support dynamic BDB2 backend */
-#undef SLAPD_BDB2_DYNAMIC
-
/* define to support DNS SRV backend */
#undef SLAPD_DNSSRV
/* define this for ACL Group support */
#define SLAPD_ACLGROUPS 1
-/* define this to use SLAPD Berkeley DB2 backend */
-/* #define SLAPD_BDB2 1 */
-
/* define this for ClearText password support */
#define SLAPD_CLEARTEXT 1
+++ /dev/null
-# $OpenLDAP$
-
-SRCS = idl.c add.c search.c cache.c dbcache.c dn2id.c entry.c id2entry.c \
- index.c id2children.c nextid.c abandon.c compare.c group.c \
- modify.c modrdn.c delete.c init.c config.c bind.c attr.c \
- filterindex.c unbind.c close.c alias.c startup.c \
- timing.c porter.c txn.c tools.c
-OBJS = idl.lo add.lo search.lo cache.lo dbcache.lo dn2id.lo entry.lo id2entry.lo \
- index.lo id2children.lo nextid.lo abandon.lo compare.lo group.lo \
- modify.lo modrdn.lo delete.lo init.lo config.lo bind.lo attr.lo \
- filterindex.lo unbind.lo close.lo alias.lo startup.lo \
- timing.lo porter.lo txn.lo tools.lo
-
-LDAP_INCDIR= ../../../include
-LDAP_LIBDIR= ../../../libraries
-
-BUILD_OPT = "--enable-bdb2"
-BUILD_MOD = @BUILD_BDB2@
-LINKAGE = @BUILD_BDB2_DYNAMIC@
-
-LIBBASE = back_bdb2
-
-XINCPATH = -I.. -I$(srcdir)/..
-XDEFS = $(MODULES_CPPFLAGS)
-
-all-local-lib: ../.backend
-
-../.backend: lib$(LIBBASE).a
- @touch $@
-
+++ /dev/null
-/* abandon.c - ldbm backend abandon routine */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/string.h>
-#include <ac/time.h>
-#include <ac/unistd.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-
-
-/*ARGSUSED*/
-static int
-bdb2i_back_abandon_internal(
- BackendDB *be,
- Connection *c,
- Operation *o,
- int msgid )
-{
- return 0;
-}
-
-
-int
-bdb2_back_abandon(
- BackendDB *be,
- Connection *conn,
- Operation *op,
- int msgid )
-{
- struct timeval time1;
- int ret;
-
- bdb2i_start_timing( be->bd_info, &time1 );
-
- ret = bdb2i_back_abandon_internal( be, conn, op, msgid );
-
- bdb2i_stop_timing( be->bd_info, time1, "ABND", conn, op );
-
- return( ret );
-}
-
-
+++ /dev/null
-/* add.c - ldap bdb2 back-end add routine */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/socket.h>
-#include <ac/string.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-#include "proto-back-bdb2.h"
-
-static DB_LOCK lock;
-
-
-static int
-bdb2i_back_add_internal(
- BackendDB *be,
- Connection *conn,
- Operation *op,
- Entry *e
-)
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- char *pdn;
- Entry *p = NULL;
- int rc;
- struct timeval time1;
-
- Debug(LDAP_DEBUG_ARGS, "==> bdb2i_back_add: %s\n", e->e_dn, 0, 0);
-
- if ( ( bdb2i_dn2id( be, e->e_ndn ) ) != NOID ) {
- send_ldap_result( conn, op, LDAP_ALREADY_EXISTS,
- NULL, NULL, NULL, NULL );
- return( -1 );
- }
-
- if ( schema_check_entry( e ) != 0 ) {
- Debug( LDAP_DEBUG_TRACE, "entry failed schema check\n",
- 0, 0, 0 );
-
- send_ldap_result( conn, op, LDAP_OBJECT_CLASS_VIOLATION,
- NULL, NULL, NULL, NULL );
- return( -1 );
- }
-
- /*
- * Get the parent dn and see if the corresponding entry exists.
- * If the parent does not exist, only allow the "root" user to
- * add the entry.
- */
-
- pdn = dn_parent( be, e->e_ndn );
-
- if( pdn != NULL && *pdn != '\0' ) {
- Entry *matched = NULL;
-
- assert( *pdn != '\0' );
-
- /* get parent with writer lock */
- if ( (p = bdb2i_dn2entry_w( be, pdn, &matched )) == NULL ) {
- char *matched_dn;
- struct berval **refs;
-
- if( matched != NULL ) {
- matched_dn = ch_strdup( matched->e_dn );
- refs = is_entry_referral( matched )
- ? get_entry_referrals( be, conn, op, matched )
- : NULL;
-
- bdb2i_cache_return_entry_w( &li->li_cache, matched );
-
- } else {
- matched_dn = NULL;
- refs = default_referral;
- }
-
- Debug( LDAP_DEBUG_TRACE, "parent does not exist\n",
- 0, 0, 0 );
-
- send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT,
- matched_dn, NULL, NULL, NULL );
-
- if ( matched != NULL ) {
- ber_bvecfree( refs );
- free( matched_dn );
- }
-
- free( pdn );
- return -1;
- }
-
- free(pdn);
-
- if ( ! access_allowed( be, conn, op, p,
- "children", NULL, ACL_WRITE ) )
- {
- /* free parent and writer lock */
- bdb2i_cache_return_entry_w( &li->li_cache, p );
-
- Debug( LDAP_DEBUG_TRACE, "no access to parent\n", 0,
- 0, 0 );
- send_ldap_result( conn, op, LDAP_INSUFFICIENT_ACCESS,
- NULL, NULL, NULL, NULL );
-
- return -1;
- }
-
-
- if ( is_entry_alias( p ) ) {
- /* parent is an alias, don't allow add */
-
- /* free parent and writer lock */
- bdb2i_cache_return_entry_w( &li->li_cache, p );
-
- Debug( LDAP_DEBUG_TRACE, "parent is alias\n", 0,
- 0, 0 );
- send_ldap_result( conn, op, LDAP_ALIAS_PROBLEM,
- NULL, NULL, NULL, NULL );
-
- return -1;
- }
-
- if ( is_entry_referral( p ) ) {
- /* parent is an referral, don't allow add */
- char *matched_dn = ch_strdup( matched->e_dn );
- struct berval **refs = is_entry_referral( matched )
- ? get_entry_referrals( be, conn, op, matched )
- : NULL;
-
- /* free parent and writer lock */
- bdb2i_cache_return_entry_w( &li->li_cache, p );
-
- Debug( LDAP_DEBUG_TRACE, "parent is referral\n", 0,
- 0, 0 );
- send_ldap_result( conn, op, LDAP_REFERRAL,
- matched_dn, NULL, refs, NULL );
-
- ber_bvecfree( refs );
- free( matched_dn );
- return -1;
- }
-
- } else {
- if(pdn != NULL) {
- assert( *pdn == '\0' );
- free(pdn);
- }
-
- /* no parent, must be adding entry to root */
- if ( !be_isroot( be, op->o_ndn ) && !be_issuffix(be, "") ) {
- Debug( LDAP_DEBUG_TRACE, "%s add denied\n",
- pdn == NULL ? "suffix" : "entry at root",
- 0, 0 );
-
- send_ldap_result( conn, op, LDAP_INSUFFICIENT_ACCESS,
- NULL, NULL, NULL, NULL );
-
- return -1;
- }
- }
-
- e->e_id = bdb2i_next_id( be );
-
- /*
- * Try to add the entry to the cache, assign it a new dnid.
- */
- bdb2i_start_timing( be->bd_info, &time1 );
-
- rc = bdb2i_cache_add_entry_rw( &li->li_cache, e, CACHE_WRITE_LOCK );
-
- bdb2i_stop_timing( be->bd_info, time1, "ADD-CACHE", conn, op );
-
- if ( rc != 0 ) {
- if( p != NULL) {
- /* free parent and writer lock */
- bdb2i_cache_return_entry_w( &li->li_cache, p );
- }
-
- Debug( LDAP_DEBUG_ANY, "cache_add_entry_lock failed\n", 0, 0,
- 0 );
-
- send_ldap_result( conn, op,
- rc > 0 ? LDAP_ALREADY_EXISTS : LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
-
- return( -1 );
- }
-
- rc = -1;
-
- /*
- * Add the entry to the attribute indexes, then add it to
- * the id2entry and dn2id index.
- */
-
- bdb2i_start_timing( be->bd_info, &time1 );
-
- /* attribute indexes */
- if ( bdb2i_index_add_entry( be, e ) != 0 ) {
- Debug( LDAP_DEBUG_TRACE, "bdb2i_index_add_entry failed\n", 0,
- 0, 0 );
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
-
- bdb2i_stop_timing( be->bd_info, time1, "ADD-INDEX", conn, op );
-
- goto return_results;
- }
-
- bdb2i_stop_timing( be->bd_info, time1, "ADD-INDEX", conn, op );
-
- bdb2i_start_timing( be->bd_info, &time1 );
-
- /* dn2id index */
- if ( bdb2i_dn2id_add( be, e->e_ndn, e->e_id ) != 0 ) {
- Debug( LDAP_DEBUG_TRACE, "bdb2i_dn2id_add failed\n", 0,
- 0, 0 );
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
-
- bdb2i_stop_timing( be->bd_info, time1, "ADD-DN2ID", conn, op );
-
- goto return_results;
- }
-
- bdb2i_stop_timing( be->bd_info, time1, "ADD-DN2ID", conn, op );
-
- bdb2i_start_timing( be->bd_info, &time1 );
-
- /* id2entry index */
- if ( bdb2i_id2entry_add( be, e ) != 0 ) {
- Debug( LDAP_DEBUG_TRACE, "bdb2i_id2entry_add failed\n", 0,
- 0, 0 );
- (void) bdb2i_dn2id_delete( be, e->e_ndn, e->e_id );
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
-
- bdb2i_stop_timing( be->bd_info, time1, "ADD-ID2ENTRY", conn, op );
-
- goto return_results;
- }
-
- bdb2i_stop_timing( be->bd_info, time1, "ADD-ID2ENTRY", conn, op );
-
- send_ldap_result( conn, op, LDAP_SUCCESS,
- NULL, NULL, NULL, NULL );
- rc = 0;
-
-return_results:;
- if (p != NULL) {
- /* free parent and writer lock */
- bdb2i_cache_return_entry_w( &li->li_cache, p );
- }
-
- if ( rc ) {
- /* free entry and writer lock */
- bdb2i_cache_return_entry_w( &li->li_cache, e );
- }
-
- return( rc );
-}
-
-
-int
-bdb2_back_add(
- BackendDB *be,
- Connection *conn,
- Operation *op,
- Entry *e
-)
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- struct timeval time1;
- int ret;
-
- bdb2i_start_timing( be->bd_info, &time1 );
-
- if ( bdb2i_enter_backend_w( &lock ) != 0 ) {
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
- return( -1 );
- }
-
- /* check, if a new default attribute index will be created,
- in which case we have to open the index file BEFORE TP */
- switch ( slapMode & SLAP_MODE ) {
- case SLAP_SERVER_MODE:
- case SLAP_TOOL_MODE:
- bdb2i_check_default_attr_index_add( li, e );
- break;
- }
-
- ret = bdb2i_back_add_internal( be, conn, op, e );
-
- /* if the operation was successful, we will delay the unlock */
- if ( ret )
- (void) bdb2i_leave_backend_w( lock );
-
- bdb2i_stop_timing( be->bd_info, time1, "ADD", conn, op );
-
- return( ret );
-}
-
-
-int
-bdb2i_release_add_lock( void )
-{
- (void) bdb2i_leave_backend_w( lock );
- return 0;
-}
-
-
+++ /dev/null
-/* $OpenLDAP$ */
-/*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
- */
-
-#include "portable.h"
-
-#include <stdio.h>
-#include <ac/string.h>
-#include <ac/socket.h>
-#include "slap.h"
-#include "back-bdb2.h"
-#include "proto-back-bdb2.h"
-
-static char* get_alias_dn(
- Entry *e,
- int *err,
- char **errmsg );
-
-static char* new_superior(
- char *dn,
- char *oldSup,
- char *newSup );
-
-static int dnlist_subordinate(
- char** dnlist,
- char *dn );
-
-Entry *bdb2i_deref_r(
- Backend* be,
- Entry* alias,
- char* dn,
- int* err,
- Entry** matched,
- char** text )
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- Entry *entry;
- Entry *sup;
- unsigned depth;
- char **dnlist;
-
- assert( ( alias != NULL && dn == NULL ) || ( alias == NULL && dn != NULL ) );
-
- *matched = NULL;
- *err = LDAP_SUCCESS;
- *text = NULL;
-
- if( alias == NULL ) {
- dn = ch_strdup( dn );
- entry = bdb2i_dn2entry_r( be, dn, &sup );
-
- } else {
- dn = ch_strdup( alias->e_ndn );
- entry = alias;
- sup = NULL;
- }
-
- dnlist = NULL;
- charray_add( &dnlist, dn );
-
- for( depth=0 ; ; depth++ ) {
- if( entry != NULL ) {
- Entry *newe;
- char *aliasDN;
-
- /* have entry, may be an alias */
-
- if( !is_entry_alias( entry ) ) {
- /* entry is not an alias */
- break;
- }
-
- /* entry is alias */
- if( depth > be->be_max_deref_depth ) {
- *matched = entry;
- entry = NULL;
- *err = LDAP_ALIAS_DEREF_PROBLEM;
- *text = "maximum deref depth exceeded";
- break;
- }
-
- /* deref entry */
- aliasDN = get_alias_dn( entry, err, text );
-
- if( aliasDN == NULL ) {
- *matched = entry;
- entry = NULL;
- break;
- }
-
- /* check if aliasDN is a subordinate of any DN in our list */
- if( dnlist_subordinate( dnlist, aliasDN ) ) {
- *matched = entry;
- entry = NULL;
- *err = LDAP_ALIAS_PROBLEM;
- *text = "circular alias";
- break;
- }
-
- /* attempt to dereference alias */
-
- newe = bdb2i_dn2entry_r( be, aliasDN, &sup );
-
- if( newe != NULL ) {
- free( dn );
- bdb2i_cache_return_entry_r(&li->li_cache, entry );
- entry = newe;
- dn = ch_strdup( entry->e_ndn );
- charray_add( &dnlist, dn );
- continue;
-
- }
-
- if ( sup != NULL ) {
- bdb2i_cache_return_entry_r(&li->li_cache, entry );
- entry = NULL;
- continue;
- }
-
- /* no newe and no superior, we're done */
- break;
-
- } else if( sup != NULL ) {
- /* have superior, may be an alias */
- Entry *newe;
- Entry *newSup;
- char *supDN;
- char *aliasDN;
-
- if( !is_entry_alias( sup ) ) {
- /* entry is not an alias */
- *matched = sup;
- sup = NULL;
- break;
- }
-
- /* entry is alias */
- if( depth > be->be_max_deref_depth ) {
- *matched = sup;
- entry = NULL;
- *err = LDAP_ALIAS_DEREF_PROBLEM;
- *text = "maximum deref depth exceeded";
- break;
- }
-
- /* deref entry */
- supDN = get_alias_dn( sup, err, text );
-
- if( supDN == NULL ) {
- *matched = sup;
- break;
- }
-
- aliasDN = new_superior( dn, sup->e_ndn, supDN );
-
- if( aliasDN == NULL ) {
- free(aliasDN);
- *matched = sup;
- *err = LDAP_ALIAS_PROBLEM;
- *text = "superior alias problem";
- break;
- }
-
- /* check if aliasDN is a subordinate of any DN in our list */
- if( dnlist_subordinate( dnlist, aliasDN ) ) {
- free(aliasDN);
- *matched = entry;
- entry = NULL;
- *err = LDAP_ALIAS_PROBLEM;
- *text = "subordinate circular alias";
- break;
- }
-
- /* attempt to dereference alias */
- newe = bdb2i_dn2entry_r( be, aliasDN, &newSup );
-
- if( newe != NULL ) {
- free(aliasDN);
- free( dn );
- bdb2i_cache_return_entry_r(&li->li_cache, sup );
- entry = newe;
- dn = ch_strdup( entry->e_ndn );
- charray_add( &dnlist, dn );
- continue;
-
- }
-
- if ( newSup != NULL ) {
- free( dn );
- bdb2i_cache_return_entry_r(&li->li_cache, sup );
- sup = newSup;
- dn = aliasDN;
- continue;
- }
-
- break;
-
- } else {
- /* no newe and no superior, we're done */
- break;
- }
- }
-
- free( dn );
- charray_free( dnlist );
- return entry;
-}
-
-
-static char* get_alias_dn(
- Entry *e,
- int *err,
- char **errmsg )
-{
- Attribute *a = attr_find( e->e_attrs, "aliasedobjectname" );
-
- if( a == NULL ) {
- /*
- * there was an aliasedobjectname defined but no data.
- */
- *err = LDAP_ALIAS_PROBLEM;
- *errmsg = "alias missing aliasedObjectName attribute";
- return NULL;
- }
-
- /*
- * aliasedObjectName should be SINGLE-VALUED with a single value.
- */
- if ( a->a_vals[0] == NULL || a->a_vals[0]->bv_val == NULL ) {
- /*
- * there was an aliasedobjectname defined but no data.
- */
- *err = LDAP_ALIAS_PROBLEM;
- *errmsg = "alias missing aliasedObjectName value";
- return NULL;
- }
-
- if( a->a_vals[1] != NULL ) {
- *err = LDAP_ALIAS_PROBLEM;
- *errmsg = "alias has multivalued aliasedObjectName";
- return NULL;
- }
-
- return a->a_vals[0]->bv_val;
-}
-
-static char* new_superior(
- char *dn,
- char *oldSup,
- char *newSup )
-{
- char *newDN;
- size_t dnlen, olen, nlen;
- assert( dn && oldSup && newSup );
-
- dnlen = strlen( dn );
- olen = strlen( oldSup );
- nlen = strlen( newSup );
-
- newDN = ch_malloc( dnlen - olen + nlen + 1 );
-
- memcpy( newDN, dn, dnlen - olen );
- memcpy( &newDN[dnlen - olen], newSup, nlen );
- newDN[dnlen - olen + nlen] = '\0';
-
- return newDN;
-}
-
-static int dnlist_subordinate(
- char** dnlist,
- char *dn )
-{
- int i;
- assert( dnlist );
-
- for( i = 0; dnlist[i] != NULL; i++ ) {
- if( dn_issuffix( dnlist[i], dn ) ) {
- return 1;
- }
- }
-
- return 0;
-}
-
+++ /dev/null
-/* attr.c - backend routines for dealing with attributes */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/socket.h>
-#include <ac/string.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-
-static int
-ainfo_type_cmp(
- char *type,
- struct attrinfo *a
-)
-{
- return( strcasecmp( type, a->ai_type ) );
-}
-
-static int
-ainfo_cmp(
- struct attrinfo *a,
- struct attrinfo *b
-)
-{
- return( strcasecmp( a->ai_type, b->ai_type ) );
-}
-
-/*
- * Called when a duplicate "index" line is encountered.
- *
- * returns 1 => original from init code, indexmask updated
- * 2 => original not from init code, warn the user
- */
-
-static int
-ainfo_dup(
- struct attrinfo *a,
- struct attrinfo *b
-)
-{
- /*
- * if the duplicate definition is because we initialized the attr,
- * just add what came from the config file. otherwise, complain.
- */
- if ( a->ai_indexmask & INDEX_FROMINIT ) {
- a->ai_indexmask |= b->ai_indexmask;
-
- return( 1 );
- }
-
- return( 2 );
-}
-
-void
-bdb2i_attr_masks(
- struct ldbminfo *li,
- char *type,
- int *indexmask,
- int *syntaxmask
-)
-{
- struct attrinfo *a;
-
- *indexmask = 0;
- *syntaxmask = 0;
- if ( (a = (struct attrinfo *) avl_find( li->li_attrs, type,
- (AVL_CMP) ainfo_type_cmp )) == NULL ) {
- if ( (a = (struct attrinfo *) avl_find( li->li_attrs, "default",
- (AVL_CMP) ainfo_type_cmp )) == NULL ) {
- return;
- }
- }
- *indexmask = a->ai_indexmask;
- if ( strcasecmp( a->ai_type, "default" ) == 0 ) {
- *syntaxmask = attr_syntax( type );
- } else {
- *syntaxmask = a->ai_syntaxmask;
- }
-}
-
-
-/* BDB2 changed */
-void
-bdb2i_attr_index_config(
- struct ldbminfo *li,
- const char *fname,
- int lineno,
- int argc,
- char **argv,
- int init
-)
-{
- int i, j;
- char **attrs, **indexes;
- struct attrinfo *a;
-
- attrs = str2charray( argv[0], "," );
- if ( argc > 1 ) {
- indexes = str2charray( argv[1], "," );
- }
- for ( i = 0; attrs[i] != NULL; i++ ) {
- a = (struct attrinfo *) ch_malloc( sizeof(struct attrinfo) );
- a->ai_type = ch_strdup( attrs[i] );
- a->ai_syntaxmask = attr_syntax( a->ai_type );
- if ( argc == 1 ) {
- a->ai_indexmask = (INDEX_PRESENCE | INDEX_EQUALITY |
- INDEX_APPROX | INDEX_SUB);
- } else {
- a->ai_indexmask = 0;
- for ( j = 0; indexes[j] != NULL; j++ ) {
- if ( strncasecmp( indexes[j], "pres", 4 )
- == 0 ) {
- a->ai_indexmask |= INDEX_PRESENCE;
- } else if ( strncasecmp( indexes[j], "eq", 2 )
- == 0 ) {
- a->ai_indexmask |= INDEX_EQUALITY;
- } else if ( strncasecmp( indexes[j], "approx",
- 6 ) == 0 ) {
- a->ai_indexmask |= INDEX_APPROX;
- } else if ( strncasecmp( indexes[j], "sub", 3 )
- == 0 ) {
- a->ai_indexmask |= INDEX_SUB;
- } else if ( strncasecmp( indexes[j], "none", 4 )
- == 0 ) {
- if ( a->ai_indexmask != 0 ) {
- fprintf( stderr,
-"%s: line %d: index type \"none\" cannot be combined with other types\n",
- fname, lineno );
- }
- a->ai_indexmask = 0;
- } else {
- fprintf( stderr,
- "%s: line %d: unknown index type \"%s\" (ignored)\n",
- fname, lineno, indexes[j] );
- fprintf( stderr,
- "valid index types are \"pres\", \"eq\", \"approx\", or \"sub\"\n" );
- }
- }
- }
- if ( init ) {
- a->ai_indexmask |= INDEX_FROMINIT;
- } else {
- if ( a->ai_indexmask )
- bdb2i_txn_attr_config( li, a->ai_type, 0 );
- }
-
- switch (avl_insert( &li->li_attrs, (caddr_t) a,
- (AVL_CMP) ainfo_cmp, (AVL_DUP) ainfo_dup ))
- {
- case 1: /* duplicate - updating init version */
- free( a->ai_type );
- free( (char *) a );
- break;
-
- case 2: /* user duplicate - ignore and warn */
- fprintf( stderr,
- "%s: line %d: duplicate index definition for attr \"%s\" (ignored)\n",
- fname, lineno, a->ai_type );
- free( a->ai_type );
- free( (char *) a );
- break;
-
- default:; /* inserted ok */
- /* FALL */
- }
- }
- charray_free( attrs );
- if ( argc > 1 )
- charray_free( indexes );
-}
+++ /dev/null
-/* back-bdb2.h - ldap bdb2 back-end header file */
-/* $OpenLDAP$ */
-
-#ifndef _BACK_BDB2_H_
-#define _BACK_BDB2_H_
-
-#include "ldbm.h"
-#include "db.h"
-
-LDAP_BEGIN_DECL
-
-#define DEFAULT_CACHE_SIZE 1000
-
-/* since DEFAULT_DB_PAGE_SIZE is 1K, we have 128K,
- which is suggested by Sleepycat */
-#define DEFAULT_DBCACHE_SIZE (128 * DEFAULT_DB_PAGE_SIZE)
-
-#define DEFAULT_DB_DIRECTORY LDAP_RUNDIR LDAP_DIRSEP "openldap-bdb2"
-#define DEFAULT_DB_HOME DEFAULT_DB_DIRECTORY
-#define DEFAULT_MODE 0600
-
-#define SUBLEN 3
-
-#define DN_BASE_PREFIX '='
-#define DN_ONE_PREFIX '@'
-#define DN_SUBTREE_PREFIX '?'
-
-#define BDB2_SUFFIX ".bdb2"
-
-
-/*
- * there is a single index for each attribute. these prefixes ensure
- * that there is no collision among keys.
- */
-#define EQ_PREFIX '=' /* prefix for equality keys */
-#define APPROX_PREFIX '~' /* prefix for approx keys */
-#define SUB_PREFIX '*' /* prefix for substring keys */
-#define CONT_PREFIX '\\' /* prefix for continuation keys */
-
-/* allow 3 characters per byte + PREFIX + EOS */
-#define CONT_SIZE ( sizeof(long)*3 + 1 + 1 )
-
-
-#define UNKNOWN_PREFIX '?' /* prefix for unknown keys */
-
-#define DEFAULT_BLOCKSIZE 8192
-
-/*
- * This structure represents an id block on disk and an id list
- * in core.
- *
- * The fields have the following meanings:
- *
- * b_nmax maximum number of ids in this block. if this is == ALLIDSBLOCK,
- * then this block represents all ids.
- * b_nids current number of ids in use in this block. if this
- * is == INDBLOCK, then this block is an indirect block
- * containing a list of other blocks containing actual ids.
- * the list is terminated by an id of NOID.
- * b_ids a list of the actual ids themselves
- */
-
-typedef ID ID_BLOCK;
-
-#define ID_BLOCK_NMAX_OFFSET 0
-#define ID_BLOCK_NIDS_OFFSET 1
-#define ID_BLOCK_IDS_OFFSET 2
-
-/* all ID_BLOCK macros operate on a pointer to a ID_BLOCK */
-
-#define ID_BLOCK_NMAX(b) ((b)[ID_BLOCK_NMAX_OFFSET])
-#define ID_BLOCK_NIDS(b) ((b)[ID_BLOCK_NIDS_OFFSET])
-#define ID_BLOCK_ID(b, n) ((b)[ID_BLOCK_IDS_OFFSET+(n)])
-
-#define ID_BLOCK_NOID(b, n) (ID_BLOCK_ID((b),(n)) == NOID)
-
-#define ID_BLOCK_ALLIDS_VALUE 0
-#define ID_BLOCK_ALLIDS(b) (ID_BLOCK_NMAX(b) == ID_BLOCK_ALLIDS_VALUE)
-
-#define ID_BLOCK_INDIRECT_VALUE 0
-#define ID_BLOCK_INDIRECT(b) (ID_BLOCK_NIDS(b) == ID_BLOCK_INDIRECT_VALUE)
-
-/* for the in-core cache of entries */
-struct cache {
- int c_maxsize;
- int c_cursize;
- Avlnode *c_dntree;
- Avlnode *c_idtree;
- Entry *c_lruhead; /* lru - add accessed entries here */
- Entry *c_lrutail; /* lru - rem lru entries from here */
- ldap_pvt_thread_mutex_t c_mutex;
-};
-
-#define CACHE_READ_LOCK 0
-#define CACHE_WRITE_LOCK 1
-
-/* for the cache of open index files (re-used for txn) */
-struct dbcache {
- int dbc_refcnt;
- int dbc_maxids;
- int dbc_maxindirect;
- long dbc_blksize;
- char *dbc_name;
- LDBM dbc_db;
-
- struct dbcache *next;
-};
-
-typedef struct dbcache BDB2_TXN_FILES;
-typedef struct dbcache DBCache;
-
-
-/* for the cache of attribute information (which are indexed, etc.) */
-struct attrinfo {
- char *ai_type; /* type name (cn, sn, ...) */
- int ai_indexmask; /* how the attr is indexed */
-#define INDEX_PRESENCE 0x0001
-#define INDEX_EQUALITY 0x0002
-#define INDEX_APPROX 0x0004
-#define INDEX_SUB 0x0008
-#define INDEX_UNKNOWN 0x0010
-#define INDEX_FROMINIT 0x1000
- int ai_syntaxmask; /* what kind of syntax */
-/* ...from slap.h...
-#define SYNTAX_CIS 0x01
-#define SYNTAX_CES 0x02
-#define SYNTAX_BIN 0x04
- ... etc. ...
-*/
-};
-
-/* TP stuff */
-
-typedef struct _bdb2_txn_head {
-
- /* log size and timer to control checkpoints */
- u_int32_t txn_log;
- u_int32_t txn_time;
-
- /* a list of all DB files in use */
- BDB2_TXN_FILES *dbFiles;
-
- /* we have five fixed files */
-#define BDB2_DB_DN_FILE 0
-#define BDB2_DB_DN2ID_FILE 1
-#define BDB2_DB_ID2ENTRY_FILE 2
-#define BDB2_DB_ID2CHILDREN_FILE 3
-#define BDB2_DB_OC_IDX_FILE 4
-
- /* a database handle for the NEXTID file
- (must be opened like all DB files at startup
- and closed on shutdown */
- LDBM nextidFile;
-
- /* is the default attribute index set to non-none */
- int withDefIDX;
-#define BDB2_WITH_DEF_IDX 1
-
- /* a handle for the backend's environment */
- DB_ENV **dbenvH;
-
-} BDB2_TXN_HEAD;
-
-
-/* end of TP stuff */
-
-
-/* the private description of a backend type */
-struct ldbtype {
- char *lty_dbhome;
- size_t lty_mpsize;
- int lty_betiming;
-};
-
-#define with_timing(bi) (((struct ldbtype *) \
- (bi)->bi_private)->lty_betiming == 1)
-
-/* The DB environment */
-extern DB_ENV bdb2i_dbEnv;
-
-
-/* the private description of a database */
-struct ldbminfo {
- ID li_nextid;
- char *li_nextid_file;
- int li_mode;
- char *li_directory;
- struct cache li_cache;
- Avlnode *li_attrs;
- int li_dbcachesize;
-
- /* a list of all files of the database */
- BDB2_TXN_HEAD li_txn_head;
-};
-
-
-#include "proto-back-bdb2.h"
-
-LDAP_END_DECL
-
-#endif /* _back_bdb2_h_ */
+++ /dev/null
-# Microsoft Developer Studio Project File - Name="backbdb2" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=backbdb2 - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "backbdb2.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "backbdb2.mak" CFG="backbdb2 - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "backbdb2 - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "backbdb2 - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-
-!IF "$(CFG)" == "backbdb2 - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF "$(CFG)" == "backbdb2 - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ENDIF
-
-# Begin Target
-
-# Name "backbdb2 - Win32 Release"
-# Name "backbdb2 - Win32 Debug"
-# End Target
-# End Project
+++ /dev/null
-Microsoft Developer Studio Workspace File, Format Version 5.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "backbdb2"=".\backbdb2.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
+++ /dev/null
-/* bind.c - bdb2 backend bind and unbind routines */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/krb.h>
-#include <ac/socket.h>
-#include <ac/string.h>
-#include <ac/unistd.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-#include "proto-back-bdb2.h"
-
-static int
-bdb2i_back_bind_internal(
- BackendDB *be,
- Connection *conn,
- Operation *op,
- char *dn,
- int method,
- struct berval *cred,
- char** edn
-)
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- Entry *e;
- Attribute *a;
- int rc;
- Entry *matched;
-#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
- char krbname[MAX_K_NAME_SZ + 1];
- AUTH_DAT ad;
-#endif
-
- Debug(LDAP_DEBUG_ARGS, "==> bdb2_back_bind: dn: %s\n", dn, 0, 0);
-
- *edn = NULL;
-
- /* get entry with reader lock */
- if ( (e = bdb2i_dn2entry_r( be, dn, &matched )) == NULL ) {
- char *matched_dn = NULL;
- struct berval **refs = NULL;
-
- if ( matched != NULL ) {
- matched_dn = ch_strdup( matched->e_dn );
- refs = is_entry_referral( matched )
- ? get_entry_referrals( be, conn, op, matched )
- : NULL;
- bdb2i_cache_return_entry_r( &li->li_cache, matched );
- } else {
- refs = default_referral;
- }
-
- /* allow noauth binds */
- rc = 1;
- if ( method == LDAP_AUTH_SIMPLE ) {
- if( cred->bv_len == 0 ) {
- /* SUCCESS */
- send_ldap_result( conn, op, LDAP_SUCCESS,
- NULL, NULL, NULL, NULL );
-
- } else if ( be_isroot_pw( be, dn, cred ) ) {
- /* front end will send result */
- *edn = ch_strdup( be_root_dn( be ) );
- rc = 0;
-
- } else if ( refs != NULL ) {
- send_ldap_result( conn, op, LDAP_REFERRAL,
- matched_dn, NULL, refs, NULL );
-
- } else {
- send_ldap_result( conn, op, LDAP_INVALID_CREDENTIALS,
- NULL, NULL, NULL, NULL );
- }
-
- } else if ( method == LDAP_AUTH_SASL ) {
- if( mech != NULL && strcasecmp(mech,"DIGEST-MD5") == 0 ) {
- /* insert DIGEST calls here */
- send_ldap_result( conn, op, LDAP_AUTH_METHOD_NOT_SUPPORTED,
- NULL, NULL, NULL, NULL );
-
- } else {
- send_ldap_result( conn, op, LDAP_AUTH_METHOD_NOT_SUPPORTED,
- NULL, NULL, NULL, NULL );
- }
-
- } else if ( refs != NULL ) {
- send_ldap_result( conn, op, LDAP_REFERRAL,
- matched_dn, NULL, refs, NULL );
-
- } else {
- send_ldap_result( conn, op, LDAP_INVALID_CREDENTIALS,
- NULL, NULL, NULL, NULL );
- }
-
- if ( matched != NULL ) {
- ber_bvecfree( refs );
- free( matched_dn );
- }
- return( rc );
- }
-
- *edn = ch_strdup( e->e_dn );
-
- /* check for deleted */
-
- if ( ! access_allowed( be, conn, op, e,
- "entry", NULL, ACL_AUTH ) )
- {
- send_ldap_result( conn, op, LDAP_INSUFFICIENT_ACCESS,
- NULL, NULL, NULL, NULL );
- rc = 1;
- goto return_results;
- }
-
- if ( is_entry_alias( e ) ) {
- /* entry is a alias, don't allow bind */
- Debug( LDAP_DEBUG_TRACE, "entry is alias\n", 0,
- 0, 0 );
-
- send_ldap_result( conn, op, LDAP_ALIAS_PROBLEM,
- NULL, NULL, NULL, NULL );
-
- rc = 1;
- goto return_results;
- }
-
-
- if ( is_entry_referral( e ) ) {
- /* entry is a referral, don't allow bind */
- struct berval **refs = get_entry_referrals( be,
- conn, op, e );
-
- Debug( LDAP_DEBUG_TRACE, "entry is referral\n", 0,
- 0, 0 );
-
- if( refs != NULL ) {
- send_ldap_result( conn, op, LDAP_REFERRAL,
- e->e_dn, NULL, refs, NULL );
- } else {
- send_ldap_result( conn, op, LDAP_INVALID_CREDENTIALS,
- NULL, NULL, NULL, NULL );
- }
-
- ber_bvecfree( refs );
-
- rc = 1;
- goto return_results;
- }
-
- switch ( method ) {
- case LDAP_AUTH_SIMPLE:
- if ( cred->bv_len == 0 ) {
- send_ldap_result( conn, op, LDAP_SUCCESS,
- NULL, NULL, NULL, NULL );
-
- /* stop front end from sending result */
- rc = 1;
- goto return_results;
- }
-
- /* check for root dn/passwd */
- if ( be_isroot_pw( be, dn, cred ) ) {
- /* front end will send result */
- if( *edn != NULL ) free( *edn );
- *edn = ch_strdup( be_root_dn( be ) );
- rc = 0;
- goto return_results;
- }
-
- if ( ! access_allowed( be, conn, op, e,
- "userpassword", NULL, ACL_AUTH ) )
- {
- send_ldap_result( conn, op, LDAP_INSUFFICIENT_ACCESS,
- NULL, NULL, NULL, NULL);
- rc = 1;
- goto return_results;
- }
-
- if ( (a = attr_find( e->e_attrs, "userpassword" )) == NULL ) {
- send_ldap_result( conn, op, LDAP_INAPPROPRIATE_AUTH,
- NULL, NULL, NULL, NULL);
-
- /* stop front end from sending result */
- rc = 1;
- goto return_results;
- }
-
- if ( slap_passwd_check( a, cred ) != 0 ) {
- send_ldap_result( conn, op, LDAP_INVALID_CREDENTIALS,
- NULL, NULL, NULL, NULL);
- /* stop front end from sending result */
- rc = 1;
- goto return_results;
- }
- rc = 0;
- break;
-
-#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
- case LDAP_AUTH_KRBV41:
- if ( bdb2i_krbv4_ldap_auth( be, cred, &ad ) != LDAP_SUCCESS ) {
- send_ldap_result( conn, op, LDAP_INVALID_CREDENTIALS,
- NULL, NULL, NULL, NULL);
- rc = 1;
- goto return_results;
- }
-
- if ( ! access_allowed( be, conn, op, e,
- "krbname", NULL, ACL_AUTH ) )
- {
- send_ldap_result( conn, op, LDAP_INSUFFICIENT_ACCESS,
- NULL, NULL, NULL, NULL);
- rc = 1;
- goto return_results;
- }
-
- sprintf( krbname, "%s%s%s@%s", ad.pname, *ad.pinst ? "."
- : "", ad.pinst, ad.prealm );
-
- if ( (a = attr_find( e->e_attrs, "krbname" )) == NULL ) {
- /*
- * no krbName values present: check against DN
- */
- if ( strcasecmp( dn, krbname ) == 0 ) {
- rc = 0; /* XXX wild ass guess */
- break;
- }
- send_ldap_result( conn, op, LDAP_INAPPROPRIATE_AUTH,
- NULL, NULL, NULL, NULL);
- rc = 1;
- goto return_results;
- } else { /* look for krbName match */
- struct berval krbval;
-
- krbval.bv_val = krbname;
- krbval.bv_len = strlen( krbname );
-
- if ( value_find( a->a_vals, &krbval, a->a_syntax, 3 ) != 0 ) {
- send_ldap_result( conn, op, LDAP_INVALID_CREDENTIALS,
- NULL, NULL, NULL, NULL);
- rc = 1;
- goto return_results;
- }
- }
- rc = 0;
- break;
-
- case LDAP_AUTH_KRBV42:
- send_ldap_result( conn, op, LDAP_SUCCESS,
- NULL, NULL, NULL, NULL );
- /* stop front end from sending result */
- rc = 1;
- goto return_results;
-#endif
-
- case LDAP_AUTH_SASL:
- /* insert sasl code here */
-
- default:
- send_ldap_result( conn, op, LDAP_STRONG_AUTH_NOT_SUPPORTED,
- NULL, "auth method not supported", NULL, NULL );
- rc = 1;
- goto return_results;
- }
-
-return_results:;
- /* free entry and reader lock */
- bdb2i_cache_return_entry_r( &li->li_cache, e );
-
- /* front end with send result on success (rc==0) */
- return( rc );
-}
-
-
-int
-bdb2_back_bind(
- BackendDB *be,
- Connection *conn,
- Operation *op,
- char *dn,
- char *ndn,
- int method,
- char *mech,
- struct berval *cred,
- char** edn
-)
-{
- DB_LOCK lock;
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- struct timeval time1;
- int ret;
-
- bdb2i_start_timing( be->bd_info, &time1 );
-
- if ( bdb2i_enter_backend_r( &lock ) != 0 ) {
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
- return( 1 );
- }
-
- ret = bdb2i_back_bind_internal( be, conn, op, ndn, method, mech, cred, edn );
-
- (void) bdb2i_leave_backend_r( lock );
-
- bdb2i_stop_timing( be->bd_info, time1, "BIND", conn, op );
-
- return( ret );
-}
-
-
+++ /dev/null
-/* cache.c - routines to maintain an in-core cache of entries */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/errno.h>
-#include <ac/string.h>
-#include <ac/socket.h>
-
-#include "slap.h"
-
-#include "back-bdb2.h"
-
-/* LDBM backend specific entry info -- visible only to the cache */
-struct ldbm_entry_info {
- /*
- * These items are specific to the LDBM backend and should
- * be hidden.
- */
- int lei_state; /* for the cache */
-#define CACHE_ENTRY_UNDEFINED 0
-#define CACHE_ENTRY_CREATING 1
-#define CACHE_ENTRY_READY 2
-#define CACHE_ENTRY_DELETED 3
-
- int lei_refcnt; /* # threads ref'ing this entry */
- Entry *lei_lrunext; /* for cache lru list */
- Entry *lei_lruprev;
-};
-#define LEI(e) ((struct ldbm_entry_info *) ((e)->e_private))
-
-static int cache_delete_entry_internal(struct cache *cache, Entry *e);
-#ifdef LDAP_DEBUG
-static void lru_print(struct cache *cache);
-#endif
-
-static int
-cache_entry_private_init( Entry*e )
-{
- assert( e->e_private == NULL );
-
- if( e->e_private != NULL ) {
- /* this should never happen */
- return 1;
- }
-
- e->e_private = ch_calloc(1, sizeof(struct ldbm_entry_info));
-
- return 0;
-}
-
-static int
-cache_entry_private_destroy( Entry*e )
-{
- assert( e->e_private );
-
- free( e->e_private );
- e->e_private = NULL;
- return 0;
-}
-
-void
-bdb2i_cache_return_entry_rw( struct cache *cache, Entry *e, int rw )
-{
- /* set cache mutex */
- ldap_pvt_thread_mutex_lock( &cache->c_mutex );
-
- assert( e->e_private );
-
- LEI(e)->lei_refcnt--;
-
- if ( LEI(e)->lei_state == CACHE_ENTRY_CREATING ) {
- Debug( LDAP_DEBUG_TRACE,
- "====> bdb2i_cache_return_entry_%s( %ld ): created (%d)\n",
- rw ? "w" : "r", e->e_id, LEI(e)->lei_refcnt );
-
- LEI(e)->lei_state = CACHE_ENTRY_READY;
-
- } else if ( LEI(e)->lei_state == CACHE_ENTRY_DELETED ) {
- if( LEI(e)->lei_refcnt > 0 ) {
- Debug( LDAP_DEBUG_TRACE,
- "====> bdb2i_cache_return_entry_%s( %ld ): delete pending (%d)\n",
- rw ? "w" : "r", e->e_id, LEI(e)->lei_refcnt );
-
- } else {
- Debug( LDAP_DEBUG_TRACE,
- "====> bdb2i_cache_return_entry_%s( %ld ): deleted (%d)\n",
- rw ? "w" : "r", e->e_id, LEI(e)->lei_refcnt );
-
- cache_entry_private_destroy( e );
- entry_free( e );
- }
-
- } else {
- Debug( LDAP_DEBUG_TRACE,
- "====> bdb2i_cache_return_entry_%s( %ld ): returned (%d)\n",
- rw ? "w" : "r", e->e_id, LEI(e)->lei_refcnt);
- }
-
- /* free cache mutex */
- ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
-}
-
-#define LRU_DELETE( cache, e ) { \
- if ( LEI(e)->lei_lruprev != NULL ) { \
- LEI(LEI(e)->lei_lruprev)->lei_lrunext = LEI(e)->lei_lrunext; \
- } else { \
- (cache)->c_lruhead = LEI(e)->lei_lrunext; \
- } \
- if ( LEI(e)->lei_lrunext != NULL ) { \
- LEI(LEI(e)->lei_lrunext)->lei_lruprev = LEI(e)->lei_lruprev; \
- } else { \
- (cache)->c_lrutail = LEI(e)->lei_lruprev; \
- } \
-}
-
-#define LRU_ADD( cache, e ) { \
- LEI(e)->lei_lrunext = (cache)->c_lruhead; \
- if ( LEI(e)->lei_lrunext != NULL ) { \
- LEI(LEI(e)->lei_lrunext)->lei_lruprev = (e); \
- } \
- (cache)->c_lruhead = (e); \
- LEI(e)->lei_lruprev = NULL; \
- if ( (cache)->c_lrutail == NULL ) { \
- (cache)->c_lrutail = (e); \
- } \
-}
-
-/*
- * bdb2i_cache_add_entry_rw - create and lock an entry in the cache
- * returns: 0 entry has been created and locked
- * 1 entry already existed
- * -1 something bad happened
- */
-int
-bdb2i_cache_add_entry_rw(
- struct cache *cache,
- Entry *e,
- int rw
-)
-{
- int i;
- Entry *ee;
-
- /* set cache mutex */
- ldap_pvt_thread_mutex_lock( &cache->c_mutex );
-
- assert( e->e_private == NULL );
-
- if( cache_entry_private_init(e) != 0 ) {
- /* free cache mutex */
- ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
-
- Debug( LDAP_DEBUG_ANY,
- "====> bdb2i_cache_add_entry( %ld ): \"%s\": private init failed!\n",
- e->e_id, e->e_dn, 0 );
-
- return( -1 );
- }
-
- if ( avl_insert( &cache->c_dntree, (caddr_t) e,
- (AVL_CMP) entry_dn_cmp, avl_dup_error ) != 0 )
- {
- Debug( LDAP_DEBUG_TRACE,
- "====> bdb2i_cache_add_entry( %ld ): \"%s\": already in dn cache\n",
- e->e_id, e->e_dn, 0 );
-
- cache_entry_private_destroy(e);
-
- /* free cache mutex */
- ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
- return( 1 );
- }
-
- /* id tree */
- if ( avl_insert( &cache->c_idtree, (caddr_t) e,
- (AVL_CMP) entry_id_cmp, avl_dup_error ) != 0 )
- {
- Debug( LDAP_DEBUG_ANY,
- "====> bdb2i_cache_add_entry( %ld ): \"%s\": already in id cache\n",
- e->e_id, e->e_dn, 0 );
-
- /* delete from dn tree inserted above */
- if ( avl_delete( &cache->c_dntree, (caddr_t) e,
- (AVL_CMP) entry_dn_cmp ) == NULL )
- {
- Debug( LDAP_DEBUG_ANY, "====> can't delete from dn cache\n",
- 0, 0, 0 );
- }
-
- cache_entry_private_destroy(e);
-
- /* free cache mutex */
- ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
- return( -1 );
- }
-
- /* put the entry into 'CREATING' state */
- /* will be marked after when entry is returned */
- LEI(e)->lei_state = CACHE_ENTRY_CREATING;
- LEI(e)->lei_refcnt = 1;
-
- /* lru */
- LRU_ADD( cache, e );
- if ( ++cache->c_cursize > cache->c_maxsize ) {
- /*
- * find the lru entry not currently in use and delete it.
- * in case a lot of entries are in use, only look at the
- * first 10 on the tail of the list.
- */
- i = 0;
- while ( cache->c_lrutail != NULL &&
- LEI(cache->c_lrutail)->lei_refcnt != 0 &&
- i < 10 )
- {
- /* move this in-use entry to the front of the q */
- ee = cache->c_lrutail;
- LRU_DELETE( cache, ee );
- LRU_ADD( cache, ee );
- i++;
- }
-
- /*
- * found at least one to delete - try to get back under
- * the max cache size.
- */
- while ( cache->c_lrutail != NULL &&
- LEI(cache->c_lrutail)->lei_refcnt == 0 &&
- cache->c_cursize > cache->c_maxsize )
- {
- e = cache->c_lrutail;
-
- /* delete from cache and lru q */
- cache_delete_entry_internal( cache, e );
- cache_entry_private_destroy( e );
- entry_free( e );
- }
- }
-
- /* free cache mutex */
- ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
- return( 0 );
-}
-
-/*
- * cache_update_entry - update a LOCKED entry which has been deleted.
- * returns: 0 entry has been created and locked
- * 1 entry already existed
- * -1 something bad happened
- */
-int
-bdb2i_cache_update_entry(
- struct cache *cache,
- Entry *e
-)
-{
- int i;
- Entry *ee;
-
- /* set cache mutex */
- ldap_pvt_thread_mutex_lock( &cache->c_mutex );
-
- assert( e->e_private );
-
- if ( avl_insert( &cache->c_dntree, (caddr_t) e,
- (AVL_CMP) entry_dn_cmp, avl_dup_error ) != 0 )
- {
- Debug( LDAP_DEBUG_TRACE,
- "====> bdb2i_cache_add_entry( %ld ): \"%s\": already in dn cache\n",
- e->e_id, e->e_dn, 0 );
-
- /* free cache mutex */
- ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
- return( 1 );
- }
-
- /* id tree */
- if ( avl_insert( &cache->c_idtree, (caddr_t) e,
- (AVL_CMP) entry_id_cmp, avl_dup_error ) != 0 )
- {
- Debug( LDAP_DEBUG_ANY,
- "====> bdb2i_cache_update_entry( %ld ): \"%s\": already in id cache\n",
- e->e_id, e->e_dn, 0 );
-
- /* delete from dn tree inserted above */
- if ( avl_delete( &cache->c_dntree, (caddr_t) e,
- (AVL_CMP) entry_dn_cmp ) == NULL )
- {
- Debug( LDAP_DEBUG_ANY, "====> can't delete from dn cache\n",
- 0, 0, 0 );
- }
-
- /* free cache mutex */
- ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
- return( -1 );
- }
-
- /* put the entry into 'CREATING' state */
- /* will be marked after when entry is returned */
- LEI(e)->lei_state = CACHE_ENTRY_CREATING;
-
- /* lru */
- LRU_ADD( cache, e );
- if ( ++cache->c_cursize > cache->c_maxsize ) {
- /*
- * find the lru entry not currently in use and delete it.
- * in case a lot of entries are in use, only look at the
- * first 10 on the tail of the list.
- */
- i = 0;
- while ( cache->c_lrutail != NULL &&
- LEI(cache->c_lrutail)->lei_refcnt != 0 &&
- i < 10 )
- {
- /* move this in-use entry to the front of the q */
- ee = cache->c_lrutail;
- LRU_DELETE( cache, ee );
- LRU_ADD( cache, ee );
- i++;
- }
-
- /*
- * found at least one to delete - try to get back under
- * the max cache size.
- */
- while ( cache->c_lrutail != NULL &&
- LEI(cache->c_lrutail)->lei_refcnt == 0 &&
- cache->c_cursize > cache->c_maxsize )
- {
- e = cache->c_lrutail;
-
- /* delete from cache and lru q */
- cache_delete_entry_internal( cache, e );
- cache_entry_private_destroy( e );
- entry_free( e );
- }
- }
-
- /* free cache mutex */
- ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
- return( 0 );
-}
-
-/*
- * bdb2i_cache_find_entry_dn2id - find an entry in the cache, given dn
- */
-
-ID
-bdb2i_cache_find_entry_dn2id(
- BackendDB *be,
- struct cache *cache,
- const char *dn
-)
-{
- Entry e, *ep;
- ID id;
- int count = 0;
-
- e.e_dn = (char *) dn;
- e.e_ndn = ch_strdup( dn );
- (void) dn_normalize( e.e_ndn );
-
-try_again:
- /* set cache mutex */
- ldap_pvt_thread_mutex_lock( &cache->c_mutex );
-
- if ( (ep = (Entry *) avl_find( cache->c_dntree, (caddr_t) &e,
- (AVL_CMP) entry_dn_cmp )) != NULL )
- {
- int state;
- count++;
-
- /*
- * ep now points to an unlocked entry
- * we do not need to lock the entry if we only
- * check the state, refcnt, LRU, and id.
- */
-
- assert( ep->e_private );
-
- /* save id */
- id = ep->e_id;
- state = LEI(ep)->lei_state;
-
- /*
- * entry is deleted or not fully created yet
- */
- if ( state != CACHE_ENTRY_READY ) {
- assert(state != CACHE_ENTRY_UNDEFINED);
-
- /* free cache mutex */
- ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
-
- Debug(LDAP_DEBUG_TRACE,
- "====> bdb2i_cache_find_entry_dn2id(\"%s\"): %ld (not ready) %d\n",
- dn, id, state);
-
- ldap_pvt_thread_yield();
- goto try_again;
- }
-
- /* lru */
- LRU_DELETE( cache, ep );
- LRU_ADD( cache, ep );
-
- /* free cache mutex */
- ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
-
- Debug(LDAP_DEBUG_TRACE,
- "====> bdb2i_cache_find_entry_dn2id(\"%s\"): %ld (%d tries)\n",
- dn, id, count);
-
- } else {
- /* free cache mutex */
- ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
-
- id = NOID;
- }
-
- free(e.e_ndn);
-
- return( id );
-}
-
-/*
- * cache_find_entry_id - find an entry in the cache, given id
- */
-
-Entry *
-bdb2i_cache_find_entry_id(
- struct cache *cache,
- ID id,
- int rw
-)
-{
- Entry e;
- Entry *ep;
- int count=0;
-
- e.e_id = id;
-
-try_again:
- /* set cache mutex */
- ldap_pvt_thread_mutex_lock( &cache->c_mutex );
-
- if ( (ep = (Entry *) avl_find( cache->c_idtree, (caddr_t) &e,
- (AVL_CMP) entry_id_cmp )) != NULL )
- {
- int state;
-
- assert( ep->e_private );
-
- state = LEI(ep)->lei_state;
-
- /*
- * entry is deleted or not fully created yet
- */
- if ( state != CACHE_ENTRY_READY ) {
- ID ep_id = ep->e_id;
-
- assert(state != CACHE_ENTRY_UNDEFINED);
-
- /* free cache mutex */
- ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
-
- Debug(LDAP_DEBUG_TRACE,
- "====> bdb2i_cache_find_entry_id( %ld ): %ld (not ready) %d\n",
- id, ep_id, state);
-
- ldap_pvt_thread_yield();
- goto try_again;
- }
-
- /* lru */
- LRU_DELETE( cache, ep );
- LRU_ADD( cache, ep );
-
- LEI(ep)->lei_refcnt++;
-
- /* free cache mutex */
- ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
-
- Debug(LDAP_DEBUG_TRACE,
- "====> bdb2i_cache_find_entry_id( %ld ) \"%s\" (found) (%d tries)\n",
- id, ep->e_dn, count);
-
- return( ep );
- }
-
- /* free cache mutex */
- ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
-
- return( NULL );
-}
-
-/*
- * cache_delete_entry - delete the entry e from the cache. the caller
- * should have obtained e (increasing its ref count) via a call to one
- * of the cache_find_* routines. the caller should *not* call the
- * cache_return_entry() routine prior to calling cache_delete_entry().
- * it performs this function.
- *
- * returns: 0 e was deleted ok
- * 1 e was not in the cache
- * -1 something bad happened
- */
-int
-bdb2i_cache_delete_entry(
- struct cache *cache,
- Entry *e
-)
-{
- int rc;
-
- /* set cache mutex */
- ldap_pvt_thread_mutex_lock( &cache->c_mutex );
-
- assert( e->e_private );
-
- Debug( LDAP_DEBUG_TRACE, "====> bdb2i_cache_delete_entry( %ld )\n",
- e->e_id, 0, 0 );
-
- rc = cache_delete_entry_internal( cache, e );
-
- /* free cache mutex */
- ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
- return( rc );
-}
-
-static int
-cache_delete_entry_internal(
- struct cache *cache,
- Entry *e
-)
-{
- int rc = 0; /* return code */
-
- /* dn tree */
- if ( avl_delete( &cache->c_dntree, (caddr_t) e, (AVL_CMP) entry_dn_cmp )
- == NULL )
- {
- rc = -1;
- }
-
- /* id tree */
- if ( avl_delete( &cache->c_idtree, (caddr_t) e, (AVL_CMP) entry_id_cmp )
- == NULL )
- {
- rc = -1;
- }
-
- if (rc != 0) {
- return rc;
- }
-
- /* lru */
- LRU_DELETE( cache, e );
- cache->c_cursize--;
-
- /*
- * flag entry to be freed later by a call to cache_return_entry()
- */
- LEI(e)->lei_state = CACHE_ENTRY_DELETED;
-
- return( 0 );
-}
-
-#ifdef LDAP_DEBUG
-
-static void
-lru_print( struct cache *cache )
-{
- Entry *e;
-
- fprintf( stderr, "LRU queue (head to tail):\n" );
- for ( e = cache->c_lruhead; e != NULL; e = LEI(e)->lei_lrunext ) {
- fprintf( stderr, "\tdn \"%20s\" id %ld refcnt %d\n",
- e->e_dn, e->e_id, LEI(e)->lei_refcnt );
- }
- fprintf( stderr, "LRU queue (tail to head):\n" );
- for ( e = cache->c_lrutail; e != NULL; e = LEI(e)->lei_lruprev ) {
- fprintf( stderr, "\tdn \"%20s\" id %ld refcnt %d\n",
- e->e_dn, e->e_id, LEI(e)->lei_refcnt );
- }
-}
-
-#endif
-
+++ /dev/null
-/* close.c - close bdb2 backend database */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/socket.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-
-static int
-bdb2i_back_db_close_internal( BackendDB *be )
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- DB_LOCK lock;
-
- /* since close will probably write the NEXTID file,
- wee need transaction control */
- if ( bdb2i_enter_backend_w( &lock ) != 0 ) {
- return( -1 );
- }
-
- if ( li->li_nextid != NOID ) {
- Debug( LDAP_DEBUG_TRACE, "bdb2 backend saving nextid\n", 0, 0, 0 );
- if ( bdb2i_next_id_save( be ) < 0 ) {
- Debug( LDAP_DEBUG_ANY, "bdb2 backend nextid save failed!\n",
- 0, 0, 0 );
- }
- }
-
- /* before closing all files, leave the backend (thus commiting
- all writes) and set a last checkpoint */
- (void) bdb2i_leave_backend_w( lock );
- (void) bdb2i_set_txn_checkpoint( bdb2i_dbEnv.tx_info, 1 );
-
- /* close all DB files */
- Debug( LDAP_DEBUG_TRACE, "bdb2 backend closing DB files\n", 0, 0, 0 );
- bdb2i_txn_close_files( be );
- Debug( LDAP_DEBUG_TRACE, "bdb2 backend done closing DB files\n", 0, 0, 0 );
-
- return 0;
-}
-
-
-int
-bdb2_back_db_close( BackendDB *be )
-{
- struct timeval time1;
- int ret;
-
- bdb2i_start_timing( be->bd_info, &time1 );
-
- ret = bdb2i_back_db_close_internal( be );
-
- bdb2i_stop_timing( be->bd_info, time1, "CLOSE", NULL, NULL );
-
- return( ret );
-}
-
-
+++ /dev/null
-/* compare.c - bdb2 backend compare routine */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/socket.h>
-#include <ac/string.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-#include "proto-back-bdb2.h"
-
-static int
-bdb2i_back_compare_internal(
- BackendDB *be,
- Connection *conn,
- Operation *op,
- char *dn,
- Ava *ava
-)
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- Entry *matched;
- Entry *e;
- Attribute *a;
- int rc;
- int manageDSAit = get_manageDSAit( op );
-
- /* get entry with reader lock */
- if ( (e = bdb2i_dn2entry_r( be, dn, &matched )) == NULL ) {
- char *matched_dn = NULL;
- struct berval **refs = NULL;
-
- if ( matched != NULL ) {
- matched_dn = ch_strdup( matched->e_dn );
- refs = is_entry_referral( matched )
- ? get_entry_referrals( be, conn, op, matched )
- : NULL;
- bdb2i_cache_return_entry_r( &li->li_cache, matched );
- } else {
- refs = default_referral;
- }
-
- send_ldap_result( conn, op, LDAP_REFERRAL,
- matched_dn, NULL, refs, NULL );
-
- if( matched != NULL ) {
- ber_bvecfree( refs );
- free( matched_dn );
- }
-
- return( 1 );
- }
-
- if (!manageDSAit && is_entry_referral( e ) ) {
- /* entry is a referral, don't allow add */
- struct berval **refs = get_entry_referrals( be,
- conn, op, e );
-
- Debug( LDAP_DEBUG_TRACE, "entry is referral\n", 0,
- 0, 0 );
-
- send_ldap_result( conn, op, LDAP_REFERRAL,
- e->e_dn, NULL, refs, NULL );
-
- ber_bvecfree( refs );
-
- rc = 1;
- goto return_results;
- }
-
- if ( ! access_allowed( be, conn, op, e,
- ava->ava_type, &ava->ava_value, ACL_COMPARE ) )
- {
- send_ldap_result( conn, op, LDAP_INSUFFICIENT_ACCESS,
- NULL, NULL, NULL, NULL );
- rc = 1;
- goto return_results;
- }
-
- if ( (a = attr_find( e->e_attrs, ava->ava_type )) == NULL ) {
- send_ldap_result( conn, op, LDAP_NO_SUCH_ATTRIBUTE,
- NULL, NULL, NULL, NULL );
- rc = 1;
- goto return_results;
- }
-
- if ( value_find( a->a_vals, &ava->ava_value, a->a_syntax, 1 ) == 0 )
- send_ldap_result( conn, op, LDAP_COMPARE_TRUE,
- NULL, NULL, NULL, NULL );
- else
- send_ldap_result( conn, op, LDAP_COMPARE_FALSE,
- NULL, NULL, NULL, NULL );
-
- rc = 0;
-
-return_results:;
- bdb2i_cache_return_entry_r( &li->li_cache, e );
- return( rc );
-}
-
-
-int
-bdb2_back_compare(
- BackendDB *be,
- Connection *conn,
- Operation *op,
- char *dn,
- char *ndn,
- Ava *ava
-)
-{
- DB_LOCK lock;
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- struct timeval time1;
- int ret;
-
- bdb2i_start_timing( be->bd_info, &time1 );
-
- if ( bdb2i_enter_backend_r( &lock ) != 0 ) {
-
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
- return( 1 );
-
- }
-
- ret = bdb2i_back_compare_internal( be, conn, op, ndn, ava );
- (void) bdb2i_leave_backend_r( lock );
- bdb2i_stop_timing( be->bd_info, time1, "CMP", conn, op );
-
- return( ret );
-}
-
-
+++ /dev/null
-/* config.c - bdb2 backend configuration file routine */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/socket.h>
-#include <ac/string.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-
-static int
-bdb2i_back_config_internal(
- BackendInfo *bi,
- const char *fname,
- int lineno,
- int argc,
- char **argv
-)
-{
- struct ldbtype *lty = (struct ldbtype *) bi->bi_private;
-
- if ( lty == NULL ) {
- fprintf( stderr, "%s: line %d: ldbm backend type info is null!\n",
- fname, lineno );
- return( 1 );
- }
-
- /* directory where DB control files live */
- if ( strcasecmp( argv[0], "home" ) == 0 ) {
- if ( argc < 2 ) {
- fprintf( stderr,
- "%s: line %d: missing dir in \"home <dir>\" line\n",
- fname, lineno );
- return( 1 );
- }
- lty->lty_dbhome = ch_strdup( argv[1] );
-
- /* size of the DB memory pool */
- } else if ( strcasecmp( argv[0], "mpoolsize" ) == 0 ) {
- if ( argc < 2 ) {
- fprintf( stderr,
- "%s: line %d: missing size in \"mpoolsize <size>\" line\n",
- fname, lineno );
- return( 1 );
- }
- lty->lty_mpsize = (size_t) atoi( argv[1] );
- /* we should at least have the suggested 128k */
- if ( lty->lty_mpsize < DEFAULT_DBCACHE_SIZE )
- lty->lty_mpsize = DEFAULT_DBCACHE_SIZE;
-
- /* anything else */
- } else {
- fprintf( stderr,
-"%s: line %d: unknown directive \"%s\" in ldbm backend definition (ignored)\n",
- fname, lineno, argv[0] );
- }
-
- return 0;
-}
-
-
-int
-bdb2_back_config(
- BackendInfo *bi,
- const char *fname,
- int lineno,
- int argc,
- char **argv
-)
-{
- struct timeval time1;
- int ret;
-
- bdb2i_start_timing( bi, &time1 );
-
- ret = bdb2i_back_config_internal( bi, fname, lineno, argc, argv );
- bdb2i_stop_timing( bi, time1, "BE-CONFIG", NULL, NULL );
-
- return( ret );
-}
-
-
-static int
-bdb2i_back_db_config_internal(
- BackendDB *be,
- const char *fname,
- int lineno,
- int argc,
- char **argv
-)
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
-
- if ( li == NULL ) {
- fprintf( stderr, "%s: line %d: ldbm database info is null!\n",
- fname, lineno );
- return( 1 );
- }
-
- /* directory where database files live */
- if ( strcasecmp( argv[0], "directory" ) == 0 ) {
- if ( argc < 2 ) {
- fprintf( stderr,
- "%s: line %d: missing dir in \"directory <dir>\" line\n",
- fname, lineno );
- return( 1 );
- }
- li->li_directory = ch_strdup( argv[1] );
-
- li->li_nextid_file =
- ch_malloc( strlen(li->li_directory) + sizeof("/NEXTID") + 1 );
-
- strcpy(li->li_nextid_file, li->li_directory);
- strcat(li->li_nextid_file, "/NEXTID");
-
- /* mode with which to create new database files */
- } else if ( strcasecmp( argv[0], "mode" ) == 0 ) {
- if ( argc < 2 ) {
- fprintf( stderr,
- "%s: line %d: missing mode in \"mode <mode>\" line\n",
- fname, lineno );
- return( 1 );
- }
- li->li_mode = strtol( argv[1], NULL, 0 );
-
- /* attribute to index */
- } else if ( strcasecmp( argv[0], "index" ) == 0 ) {
- if ( argc < 2 ) {
- fprintf( stderr,
-"%s: line %d: missing attr in \"index <attr> [pres,eq,approx,sub]\" line\n",
- fname, lineno );
- return( 1 );
- } else if ( argc > 3 ) {
- fprintf( stderr,
-"%s: line %d: extra junk after \"index <attr> [pres,eq,approx,sub]\" line (ignored)\n",
- fname, lineno );
- }
- bdb2i_attr_index_config( li, fname, lineno, argc - 1, &argv[1], 0 );
-
- /* size of the cache in entries */
- } else if ( strcasecmp( argv[0], "cachesize" ) == 0 ) {
- if ( argc < 2 ) {
- fprintf( stderr,
- "%s: line %d: missing size in \"cachesize <size>\" line\n",
- fname, lineno );
- return( 1 );
- }
- li->li_cache.c_maxsize = atoi( argv[1] );
-
- /* size of each dbcache in bytes */
- } else if ( strcasecmp( argv[0], "dbcachesize" ) == 0 ) {
- if ( argc < 2 ) {
- fprintf( stderr,
- "%s: line %d: missing size in \"dbcachesize <size>\" line\n",
- fname, lineno );
- return( 1 );
- }
- li->li_dbcachesize = atoi( argv[1] );
- /* we should at least have the suggested 128k */
- if ( li->li_dbcachesize < DEFAULT_DBCACHE_SIZE )
- li->li_dbcachesize = DEFAULT_DBCACHE_SIZE;
-
- /* anything else */
- } else {
- fprintf( stderr,
-"%s: line %d: unknown directive \"%s\" in ldbm database definition (ignored)\n",
- fname, lineno, argv[0] );
- }
-
- return 0;
-}
-
-
-int
-bdb2_back_db_config(
- BackendDB *be,
- const char *fname,
- int lineno,
- int argc,
- char **argv
-)
-{
- struct timeval time1;
- int ret;
-
- bdb2i_start_timing( be->bd_info, &time1 );
-
- ret = bdb2i_back_db_config_internal( be, fname, lineno, argc, argv );
-
- bdb2i_stop_timing( be->bd_info, time1, "DB-CONFIG", NULL, NULL );
-
- return( ret );
-}
-
-
+++ /dev/null
-/* ldbmcache.c - maintain a cache of open bdb2 files */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/errno.h>
-#include <ac/socket.h>
-#include <ac/string.h>
-#include <ac/time.h>
-
-#include <sys/stat.h>
-
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-
-#include "slap.h"
-#include "back-bdb2.h"
-
-struct dbcache *
-bdb2i_cache_open(
- BackendDB *be,
- char *name,
- char *suffix,
- int flags
-)
-{
- /* all files are open, so return handle from file cache */
- switch ( slapMode & SLAP_MODE ) {
-
- case SLAP_SERVER_MODE:
- case SLAP_TOOL_MODE:
- {
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- char buf[MAXPATHLEN];
-
- /* use short name */
- sprintf( buf, "%s%s", name, suffix );
- return( bdb2i_get_db_file_cache( li, buf ));
-
- }
- break;
-
- default:
- /* if not SERVER or TOOL, who else would ask?
- NO ONE, so return error */
-
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_cache_open: database user (%d) unknown -- cannot open \"%s%s\".\n",
- slapMode, name, suffix );
- return( NULL );
- }
-}
-
-void
-bdb2i_cache_close( BackendDB *be, struct dbcache *db )
-{
- /* all files stay open until SERVER or TOOL shut down */
- switch ( slapMode & SLAP_MODE ) {
- case SLAP_SERVER_MODE:
- case SLAP_TOOL_MODE:
- return;
-
- default:
- /* if unknown user, complain */
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_cache_close: database user (%d) unknown -- ignored.\n",
- slapMode, 0, 0 );
- return;
- }
-}
-
-void
-bdb2i_cache_really_close( BackendDB *be, struct dbcache *db )
-{
- /* all files stay open until SERVER or TOOL shut down */
- switch ( slapMode & SLAP_MODE ) {
- case SLAP_SERVER_MODE:
- case SLAP_TOOL_MODE:
- return;
-
- default:
- /* if unknown user, complain */
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_cache_really_close: database user (%d) unknown -- ignored.\n",
- slapMode, 0, 0 );
- return;
- }
-}
-
-void
-bdb2i_cache_flush_all( BackendDB *be )
-{
- /* if SERVER or TOOL, syncing is done by TP, or during shutdown */
- switch ( slapMode & SLAP_MODE ) {
-
- case SLAP_SERVER_MODE:
- case SLAP_TOOL_MODE:
- return;
-
- default:
- /* if unknown user, complain */
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_cache_flush_all: database user (%d) unknown -- ignored.\n",
- slapMode, 0, 0 );
- return;
- }
-}
-
-Datum
-bdb2i_cache_fetch(
- struct dbcache *db,
- Datum key
-)
-{
- Datum data;
-
- ldbm_datum_init( data );
-
- data = bdb2i_db_fetch( db->dbc_db, key );
-
- return( data );
-}
-
-int
-bdb2i_cache_store(
- struct dbcache *db,
- Datum key,
- Datum data,
- int flags
-)
-{
- int rc;
- struct timeval time1;
-
-#ifdef LDBM_DEBUG
- Statslog( LDAP_DEBUG_STATS,
- "=> bdb2i_cache_store(): key.dptr=%s, key.dsize=%d\n",
- key.dptr, key.dsize, 0, 0, 0 );
-
- Statslog( LDAP_DEBUG_STATS,
- "=> bdb2i_cache_store(): key.dptr=0x%08x, data.dptr=0x%0 8x\n",
- key.dptr, data.dptr, 0, 0, 0 );
-
- Statslog( LDAP_DEBUG_STATS,
- "=> bdb2i_cache_store(): data.dptr=%s, data.dsize=%d\n",
- data.dptr, data.dsize, 0, 0, 0 );
-
- Statslog( LDAP_DEBUG_STATS,
- "=> bdb2i_cache_store(): flags=0x%08x\n",
- flags, 0, 0, 0, 0 );
-#endif /* LDBM_DEBUG */
-
- if ( slapMode & SLAP_TIMED_MODE )
- bdb2i_uncond_start_timing( &time1 );
-
- rc = bdb2i_db_store( db->dbc_db, key, data, flags );
-
- if ( slapMode & SLAP_TIMED_MODE ) {
- char buf[BUFSIZ];
- char buf2[BUFSIZ];
-
- *buf2 = '\0';
- if ( !( strcasecmp( db->dbc_name, "dn.bdb2" )))
- sprintf( buf2, " [%s]", key.dptr );
- sprintf( buf, "ADD-BDB2( %s%s )", db->dbc_name, buf2 );
- bdb2i_uncond_stop_timing( time1, buf,
- NULL, NULL, LDAP_DEBUG_TRACE );
- }
-
- return( rc );
-}
-
-int
-bdb2i_cache_delete(
- struct dbcache *db,
- Datum key
-)
-{
- int rc;
-
- rc = bdb2i_db_delete( db->dbc_db, key );
-
- return( rc );
-}
+++ /dev/null
-/* delete.c - bdb2 backend delete routine */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/string.h>
-#include <ac/socket.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-#include "proto-back-bdb2.h"
-
-static int
-bdb2i_back_delete_internal(
- BackendDB *be,
- Connection *conn,
- Operation *op,
- char *dn
-)
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- Entry *matched = NULL;
- char *pdn = NULL;
- Entry *e, *p = NULL;
- int rc = -1, manageDSAit;
-
- Debug(LDAP_DEBUG_ARGS, "==> bdb2i_back_delete: %s\n", dn, 0, 0);
-
- /* get entry with writer lock */
- if ( (e = bdb2i_dn2entry_w( be, dn, &matched )) == NULL ) {
- char *matched_dn = NULL;
- struct berval **refs = NULL;
-
- Debug(LDAP_DEBUG_ARGS, "<=- bdb2i_back_delete: no such object %s\n",
- dn, 0, 0);
-
- if ( matched != NULL ) {
- matched_dn = ch_strdup( matched->e_dn );
- refs = is_entry_referral( matched )
- ? get_entry_referrals( be, conn, op, matched )
- : NULL;
- bdb2i_cache_return_entry_r( &li->li_cache, matched );
- } else {
- refs = default_referral;
- }
-
- send_ldap_result( conn, op, LDAP_REFERRAL,
- matched_dn, NULL, refs, NULL );
-
- if( matched != NULL ) {
- ber_bvecfree( refs );
- free( matched_dn );
- }
-
- return( -1 );
- }
-
- if (!manageDSAit && is_entry_referral( e ) ) {
- /* entry is a referral, don't allow add */
- struct berval **refs = get_entry_referrals( be,
- conn, op, e );
-
- Debug( LDAP_DEBUG_TRACE, "entry is referral\n", 0,
- 0, 0 );
-
- send_ldap_result( conn, op, LDAP_REFERRAL,
- e->e_dn, NULL, refs, NULL );
-
- ber_bvecfree( refs );
- goto return_results;
- }
-
-
- if ( bdb2i_has_children( be, e ) ) {
- Debug(LDAP_DEBUG_ARGS, "<=- bdb2i_back_delete: non leaf %s\n",
- dn, 0, 0);
- send_ldap_result( conn, op, LDAP_NOT_ALLOWED_ON_NONLEAF,
- NULL, NULL, NULL, NULL );
- goto return_results;
- }
-
-#ifdef SLAPD_CHILD_MODIFICATION_WITH_ENTRY_ACL
- if ( ! access_allowed( be, conn, op, e,
- "entry", NULL, ACL_WRITE ) )
- {
- Debug(LDAP_DEBUG_ARGS,
- "<=- bdb2i_back_delete: insufficient access %s\n",
- dn, 0, 0);
- send_ldap_result( conn, op, LDAP_INSUFFICIENT_ACCESS,
- NULL, NULL, NULL, NULL );
- goto return_results;
- }
-#endif
-
- /* find parent's entry */
- if( (pdn = dn_parent( be, e->e_ndn )) != NULL ) {
- if( (p = bdb2i_dn2entry_w( be, pdn, &matched )) == NULL) {
- Debug( LDAP_DEBUG_TRACE,
- "<=- bdb2i_back_delete: parent does not exist\n", 0, 0, 0);
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
- goto return_results;
- }
-
- /* check parent for "children" acl */
- if ( ! access_allowed( be, conn, op, p,
- "children", NULL, ACL_WRITE ) )
- {
- Debug( LDAP_DEBUG_TRACE,
- "<=- bdb2i_back_delete: no access to parent\n", 0, 0, 0 );
- send_ldap_result( conn, op, LDAP_INSUFFICIENT_ACCESS,
- NULL, NULL, NULL, NULL );
- goto return_results;
- }
-
- } else {
- /* no parent, must be root to delete */
- if( ! be_isroot( be, op->o_ndn ) ) {
- Debug( LDAP_DEBUG_TRACE,
- "<=- bdb2i_back_delete: no parent & not root\n", 0, 0, 0);
- send_ldap_result( conn, op, LDAP_INSUFFICIENT_ACCESS,
- NULL, NULL, NULL, NULL );
- goto return_results;
- }
- }
-
- /* delete from dn2id mapping */
- if ( bdb2i_dn2id_delete( be, e->e_ndn, e->e_id ) != 0 ) {
- Debug(LDAP_DEBUG_ARGS,
- "<=- bdb2i_back_delete: operations error %s\n",
- dn, 0, 0);
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
- goto return_results;
- }
-
- /* delete from disk and cache */
- if ( bdb2i_id2entry_delete( be, e ) != 0 ) {
- Debug(LDAP_DEBUG_ARGS,
- "<=- bdb2i_back_delete: operations error %s\n",
- dn, 0, 0);
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
- goto return_results;
- }
-
- send_ldap_result( conn, op, LDAP_SUCCESS,
- NULL, NULL, NULL, NULL );
- rc = 0;
-
-return_results:;
- if ( pdn != NULL ) free(pdn);
-
- if( p != NULL ) {
- /* free parent and writer lock */
- bdb2i_cache_return_entry_w( &li->li_cache, p );
-
- }
-
- /* free entry and writer lock */
- bdb2i_cache_return_entry_w( &li->li_cache, e );
-
- if ( matched != NULL ) free(matched);
-
- return rc;
-}
-
-
-int
-bdb2_back_delete(
- BackendDB *be,
- Connection *conn,
- Operation *op,
- char *dn,
- char *ndn
-)
-{
- DB_LOCK lock;
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- struct timeval time1;
- int ret;
-
- bdb2i_start_timing( be->bd_info, &time1 );
-
- if ( bdb2i_enter_backend_w( &lock ) != 0 ) {
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
- return( -1 );
- }
-
- ret = bdb2i_back_delete_internal( be, conn, op, ndn );
- (void) bdb2i_leave_backend_w( lock );
- bdb2i_stop_timing( be->bd_info, time1, "DEL", conn, op );
-
- return( ret );
-}
-
-
+++ /dev/null
-/* dn2id.c - routines to deal with the dn2id index */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/string.h>
-#include <ac/socket.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-#include "proto-back-bdb2.h"
-
-int
-bdb2i_dn2id_add(
- BackendDB *be,
- const char *dn,
- ID id
-)
-{
- int rc, flags;
- struct dbcache *db;
- Datum key, data;
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
-
- Debug( LDAP_DEBUG_TRACE, "=> bdb2i_dn2id_add( \"%s\", %ld )\n", dn, id, 0 );
-
- if ( (db = bdb2i_cache_open( be, "dn2id", BDB2_SUFFIX, LDBM_WRCREAT ))
- == NULL ) {
- Debug( LDAP_DEBUG_ANY, "Could not open/create dn2id%s\n",
- BDB2_SUFFIX, 0, 0 );
- return( -1 );
- }
-
- ldbm_datum_init( key );
- key.dsize = strlen( dn ) + 2;
- key.dptr = ch_malloc( key.dsize );
- sprintf( key.dptr, "%c%s", DN_BASE_PREFIX, dn );
-
- ldbm_datum_init( data );
- data.dptr = (char *) &id;
- data.dsize = sizeof(ID);
-
- flags = LDBM_INSERT;
- rc = bdb2i_cache_store( db, key, data, flags );
-
- free( key.dptr );
-
- if ( rc != -1 ) {
- char *pdn = dn_parent( NULL, dn );
-
- if( pdn != NULL ) {
- ldbm_datum_init( key );
- key.dsize = strlen( pdn ) + 2;
- key.dptr = ch_malloc( key.dsize );
- sprintf( key.dptr, "%c%s", DN_ONE_PREFIX, pdn );
- rc = bdb2i_idl_insert_key( be, db, key, id );
- free( key.dptr );
- free( pdn );
- }
- }
-
- if ( rc != -1 ) {
- char **subtree = dn_subtree( NULL, dn );
-
- if( subtree != NULL ) {
- int i;
- for( i=0; subtree[i] != NULL; i++ ) {
- ldbm_datum_init( key );
- key.dsize = strlen( subtree[i] ) + 2;
- key.dptr = ch_malloc( key.dsize );
- sprintf( key.dptr, "%c%s", DN_SUBTREE_PREFIX, subtree[i] );
-
- rc = bdb2i_idl_insert_key( be, db, key, id );
-
- free( key.dptr );
- }
-
- charray_free( subtree );
- }
- }
-
- bdb2i_cache_close( be, db );
-
- Debug( LDAP_DEBUG_TRACE, "<= bdb2i_dn2id_add %d\n", rc, 0, 0 );
- return( rc );
-}
-
-ID
-bdb2i_dn2id(
- BackendDB *be,
- const char *dn
-)
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- struct dbcache *db;
- ID id;
- Datum key, data;
-
- Debug( LDAP_DEBUG_TRACE, "=> bdb2i_dn2id( \"%s\" )\n", dn, 0, 0 );
-
- /* first check the cache */
- if ( (id = bdb2i_cache_find_entry_dn2id( be, &li->li_cache, dn )) != NOID ) {
- Debug( LDAP_DEBUG_TRACE, "<= bdb2i_dn2id %ld (in cache)\n", id,
- 0, 0 );
- return( id );
- }
-
- if ( (db = bdb2i_cache_open( be, "dn2id", BDB2_SUFFIX, LDBM_WRCREAT ))
- == NULL ) {
- Debug( LDAP_DEBUG_ANY, "<= bdb2i_dn2id could not open dn2id%s\n",
- BDB2_SUFFIX, 0, 0 );
- return( NOID );
- }
-
- ldbm_datum_init( key );
-
- key.dsize = strlen( dn ) + 2;
- key.dptr = ch_malloc( key.dsize );
- sprintf( key.dptr, "%c%s", DN_BASE_PREFIX, dn );
-
- data = bdb2i_cache_fetch( db, key );
-
- bdb2i_cache_close( be, db );
-
- free( key.dptr );
-
- if ( data.dptr == NULL ) {
- Debug( LDAP_DEBUG_TRACE, "<= bdb2i_dn2id NOID\n", 0, 0, 0 );
- return( NOID );
- }
-
- (void) memcpy( (char *) &id, data.dptr, sizeof(ID) );
-
- ldbm_datum_free( db->dbc_db, data );
-
- Debug( LDAP_DEBUG_TRACE, "<= bdb2i_dn2id %ld\n", id, 0, 0 );
- return( id );
-}
-
-ID_BLOCK *
-bdb2i_dn2idl(
- BackendDB *be,
- const char *dn,
- int prefix )
-{
- struct dbcache *db;
- Datum key;
- ID_BLOCK *idl;
-
- Debug( LDAP_DEBUG_TRACE, "=> bdb2i_dn2idl( \"%c%s\" )\n", prefix, dn, 0 );
-
- if ( (db = bdb2i_cache_open( be, "dn2id", BDB2_SUFFIX, LDBM_WRCREAT ))
- == NULL ) {
- Debug( LDAP_DEBUG_ANY,
- "<= bdb2i_dn2idl could not open dn2id%s\n", BDB2_SUFFIX,
- 0, 0 );
- return( NULL );
- }
-
- ldbm_datum_init( key );
-
- key.dsize = strlen( dn ) + 2;
- key.dptr = ch_malloc( key.dsize );
- sprintf( key.dptr, "%c%s", prefix, dn );
-
- idl = bdb2i_idl_fetch( be, db, key );
-
- free( key.dptr );
-
- bdb2i_cache_close( be, db );
-
- return( idl );
-}
-
-int
-bdb2i_dn2id_delete(
- BackendDB *be,
- const char *dn,
- ID id
-)
-{
- struct dbcache *db;
- Datum key;
- int rc;
-
- Debug( LDAP_DEBUG_TRACE, "=> bdb2i_dn2id_delete( \"%s\", %ld )\n",
- dn, id, 0 );
-
- if ( (db = bdb2i_cache_open( be, "dn2id", BDB2_SUFFIX, LDBM_WRCREAT ))
- == NULL ) {
- Debug( LDAP_DEBUG_ANY,
- "<= bdb2i_dn2id_delete could not open dn2id%s\n", BDB2_SUFFIX,
- 0, 0 );
- return( -1 );
- }
-
- {
- char *pdn = dn_parent( NULL, dn );
-
- if( pdn != NULL ) {
- ldbm_datum_init( key );
- key.dsize = strlen( pdn ) + 2;
- key.dptr = ch_malloc( key.dsize );
- sprintf( key.dptr, "%c%s", DN_ONE_PREFIX, pdn );
- (void) bdb2i_idl_delete_key( be, db, key, id );
- free( key.dptr );
- free( pdn );
- }
- }
-
- {
- char **subtree = dn_subtree( NULL, dn );
-
- if( subtree != NULL ) {
- int i;
- for( i=0; subtree[i] != NULL; i++ ) {
- ldbm_datum_init( key );
- key.dsize = strlen( subtree[i] ) + 2;
- key.dptr = ch_malloc( key.dsize );
- sprintf( key.dptr, "%c%s", DN_SUBTREE_PREFIX, subtree[i] );
-
- (void) bdb2i_idl_delete_key( be, db, key, id );
-
- free( key.dptr );
- }
-
- charray_free( subtree );
- }
- }
-
- ldbm_datum_init( key );
-
- key.dsize = strlen( dn ) + 2;
- key.dptr = ch_malloc( key.dsize );
- sprintf( key.dptr, "%c%s", DN_BASE_PREFIX, dn );
-
- rc = bdb2i_cache_delete( db, key );
-
- free( key.dptr );
-
- bdb2i_cache_close( be, db );
-
- Debug( LDAP_DEBUG_TRACE, "<= bdb2i_dn2id_delete %d\n", rc, 0, 0 );
- return( rc );
-}
-
-/*
- * dn2entry - look up dn in the cache/indexes and return the corresponding
- * entry.
- */
-
-Entry *
-bdb2i_dn2entry_rw(
- BackendDB *be,
- const char *dn,
- Entry **matched,
- int rw
-)
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- ID id;
- Entry *e = NULL;
- char *pdn;
-
- Debug(LDAP_DEBUG_TRACE, "dn2entry_%s: dn: \"%s\"\n",
- rw ? "w" : "r", dn, 0);
-
- if( matched != NULL ) {
- /* caller cares about match */
- *matched = NULL;
- }
-
- if ( (id = bdb2i_dn2id( be, dn )) != NOID &&
- (e = bdb2i_id2entry_rw( be, id, rw )) != NULL )
- {
- return( e );
- }
-
- if ( id != NOID ) {
- Debug(LDAP_DEBUG_ANY,
- "dn2entry_%s: no entry for valid id (%ld), dn \"%s\"\n",
- rw ? "w" : "r", id, dn);
- /* must have been deleted from underneath us */
- /* treat as if NOID was found */
- }
-
- /* caller doesn't care about match */
- if( matched == NULL ) return NULL;
-
- /* entry does not exist - see how much of the dn does exist */
- /* dn_parent checks returns NULL if dn is suffix */
- if ( (pdn = dn_parent( be, dn )) != NULL ) {
- /* get entry with reader lock */
- if ( (e = bdb2i_dn2entry_r( be, pdn, matched )) != NULL ) {
- *matched = e;
- }
- free( pdn );
- }
-
- return( NULL );
-}
-
-
+++ /dev/null
-/* entry.c - ldbm backend entry_release routine */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/socket.h>
-#include <ac/string.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-#include "proto-back-bdb2.h"
-
-
-int
-bdb2_back_entry_release_rw(
- BackendDB *be,
- Entry *e,
- int rw
-)
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
-
- /* free entry and reader or writer lock */
- bdb2i_cache_return_entry_rw( &li->li_cache, e, rw );
- bdb2i_release_add_lock();
-
- return 0;
-}
+++ /dev/null
-/* $OpenLDAP$ */
-#ifndef _BDB2_EXTERNAL_H
-#define _BDB2_EXTERNAL_H
-
-LDAP_BEGIN_DECL
-
-extern int bdb2_back_initialize LDAP_P(( BackendInfo *bi ));
-extern int bdb2_back_open LDAP_P(( BackendInfo *bi ));
-extern int bdb2_back_close LDAP_P(( BackendInfo *bi ));
-extern int bdb2_back_destroy LDAP_P(( BackendInfo *bi ));
-
-extern int bdb2_back_config LDAP_P(( BackendInfo *bt,
- const char *fname, int lineno, int argc, char **argv ));
-
-extern int bdb2_back_db_init LDAP_P(( BackendDB *bd ));
-extern int bdb2_back_db_open LDAP_P(( BackendDB *bd ));
-extern int bdb2_back_db_close LDAP_P(( BackendDB *bd ));
-extern int bdb2_back_db_destroy LDAP_P(( BackendDB *bd ));
-
-extern int bdb2_back_db_config LDAP_P(( BackendDB *bd,
- const char *fname, int lineno, int argc, char **argv ));
-
-extern int bdb2_back_bind LDAP_P(( BackendDB *bd,
- Connection *conn, Operation *op,
- const char *dn, const char *ndn, int method,
- struct berval *cred, char** edn ));
-
-extern int bdb2_back_unbind LDAP_P(( BackendDB *bd,
- Connection *conn, Operation *op ));
-
-extern int bdb2_back_search LDAP_P(( BackendDB *bd,
- Connection *conn, Operation *op,
- const char *base, const char *nbase,
- int scope, int deref, int sizelimit, int timelimit,
- Filter *filter, const char *filterstr,
- char **attrs, int attrsonly ));
-
-extern int bdb2_back_compare LDAP_P((BackendDB *bd,
- Connection *conn, Operation *op,
- const char *dn, const char *ndn,
- Ava *ava ));
-
-extern int bdb2_back_modify LDAP_P(( BackendDB *bd,
- Connection *conn, Operation *op,
- const char *dn, const char *ndn,
- Modifications *ml ));
-
-extern int bdb2_back_modrdn LDAP_P(( BackendDB *bd,
- Connection *conn, Operation *op,
- const char *dn, const char *ndn,
- const char *newrdn, int deleteoldrdn,
- const char *newSuperior ));
-
-extern int bdb2_back_add LDAP_P(( BackendDB *bd,
- Connection *conn, Operation *op, Entry *e ));
-
-extern int bdb2_back_delete LDAP_P(( BackendDB *bd,
- Connection *conn, Operation *op,
- const char *dn, const char *ndn ));
-
-extern int bdb2_back_abandon LDAP_P(( BackendDB *bd,
- Connection *conn, Operation *op, int msgid ));
-
-extern int bdb2_back_group LDAP_P(( BackendDB *bd,
- Entry *target, const char* gr_ndn, const char* op_ndn,
- const char* objectclassValue, const char* groupattrName));
-
-/* hooks for slap tools */
-extern int bdb2_tool_entry_open LDAP_P(( BackendDB *be, int mode ));
-extern int bdb2_tool_entry_close LDAP_P(( BackendDB *be ));
-extern ID bdb2_tool_entry_first LDAP_P(( BackendDB *be ));
-extern ID bdb2_tool_entry_next LDAP_P(( BackendDB *be ));
-extern Entry* bdb2_tool_entry_get LDAP_P(( BackendDB *be, ID id ));
-extern ID bdb2_tool_entry_put LDAP_P(( BackendDB *be, Entry *e ));
-extern int bdb2_tool_index_attr LDAP_P(( BackendDB *be, char* type ));
-extern int bdb2_tool_index_change LDAP_P(( BackendDB *be, char* type,
- struct berval **bv, ID id, int op ));
-extern int bdb2_tool_sync LDAP_P(( BackendDB *be ));
-
-LDAP_END_DECL
-
-#endif /* _BDB2_EXTERNAL_H */
-
+++ /dev/null
-/* filterindex.c - generate the list of candidate entries from a filter */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/socket.h>
-#include <ac/string.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-
-static ID_BLOCK *ava_candidates( BackendDB *be, Ava *ava, int type );
-static ID_BLOCK *presence_candidates( BackendDB *be, char *type );
-static ID_BLOCK *approx_candidates( BackendDB *be, Ava *ava );
-static ID_BLOCK *list_candidates( BackendDB *be, Filter *flist, int ftype );
-static ID_BLOCK *substring_candidates( BackendDB *be, Filter *f );
-static ID_BLOCK *substring_comp_candidates( BackendDB *be, char *type, char *val, int prepost );
-
-ID_BLOCK *
-bdb2i_filter_candidates(
- BackendDB *be,
- Filter *f
-)
-{
- ID_BLOCK *result, *tmp1, *tmp2;
-
- Debug( LDAP_DEBUG_TRACE, "=> bdb2i_filter_candidates\n", 0, 0, 0 );
-
- result = NULL;
- switch ( f->f_choice ) {
- case SLAPD_FILTER_DN_ONE:
- Debug( LDAP_DEBUG_FILTER, "\tDN ONE\n", 0, 0, 0 );
- result = bdb2i_dn2idl( be, f->f_dn, DN_SUBTREE_PREFIX );
- break;
-
- case SLAPD_FILTER_DN_SUBTREE:
- Debug( LDAP_DEBUG_FILTER, "\tDN SUBTREE\n", 0, 0, 0 );
- result = bdb2i_dn2idl( be, f->f_dn, DN_SUBTREE_PREFIX );
- break;
-
- case LDAP_FILTER_EQUALITY:
- Debug( LDAP_DEBUG_FILTER, "\tEQUALITY\n", 0, 0, 0 );
- result = ava_candidates( be, &f->f_ava, LDAP_FILTER_EQUALITY );
- break;
-
- case LDAP_FILTER_SUBSTRINGS:
- Debug( LDAP_DEBUG_FILTER, "\tSUBSTRINGS\n", 0, 0, 0 );
- result = substring_candidates( be, f );
- break;
-
- case LDAP_FILTER_GE:
- Debug( LDAP_DEBUG_FILTER, "\tGE\n", 0, 0, 0 );
- result = ava_candidates( be, &f->f_ava, LDAP_FILTER_GE );
- break;
-
- case LDAP_FILTER_LE:
- Debug( LDAP_DEBUG_FILTER, "\tLE\n", 0, 0, 0 );
- result = ava_candidates( be, &f->f_ava, LDAP_FILTER_LE );
- break;
-
- case LDAP_FILTER_PRESENT:
- Debug( LDAP_DEBUG_FILTER, "\tPRESENT\n", 0, 0, 0 );
- result = presence_candidates( be, f->f_type );
- break;
-
- case LDAP_FILTER_APPROX:
- Debug( LDAP_DEBUG_FILTER, "\tAPPROX\n", 0, 0, 0 );
- result = approx_candidates( be, &f->f_ava );
- break;
-
- case LDAP_FILTER_AND:
- Debug( LDAP_DEBUG_FILTER, "\tAND\n", 0, 0, 0 );
- result = list_candidates( be, f->f_and, LDAP_FILTER_AND );
- break;
-
- case LDAP_FILTER_OR:
- Debug( LDAP_DEBUG_FILTER, "\tOR\n", 0, 0, 0 );
- result = list_candidates( be, f->f_or, LDAP_FILTER_OR );
- break;
-
- case LDAP_FILTER_NOT:
- Debug( LDAP_DEBUG_FILTER, "\tNOT\n", 0, 0, 0 );
- tmp1 = bdb2i_idl_allids( be );
- tmp2 = bdb2i_filter_candidates( be, f->f_not );
- result = bdb2i_idl_notin( be, tmp1, tmp2 );
- bdb2i_idl_free( tmp2 );
- bdb2i_idl_free( tmp1 );
- break;
- }
-
- Debug( LDAP_DEBUG_TRACE, "<= bdb2i_filter_candidates %ld\n",
- result ? ID_BLOCK_NIDS(result) : 0, 0, 0 );
- return( result );
-}
-
-static ID_BLOCK *
-ava_candidates(
- BackendDB *be,
- Ava *ava,
- int type
-)
-{
- ID_BLOCK *idl;
-
- Debug( LDAP_DEBUG_TRACE, "=> ava_candidates 0x%x\n", type, 0, 0 );
-
- switch ( type ) {
- case LDAP_FILTER_EQUALITY:
- idl = bdb2i_index_read( be, ava->ava_type, INDEX_EQUALITY,
- ava->ava_value.bv_val );
- break;
-
- case LDAP_FILTER_GE:
- idl = bdb2i_idl_allids( be );
- break;
-
- case LDAP_FILTER_LE:
- idl = bdb2i_idl_allids( be );
- break;
- }
-
- Debug( LDAP_DEBUG_TRACE, "<= ava_candidates %ld\n",
- idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
- return( idl );
-}
-
-static ID_BLOCK *
-presence_candidates(
- BackendDB *be,
- char *type
-)
-{
- ID_BLOCK *idl;
-
- Debug( LDAP_DEBUG_TRACE, "=> presence_candidates\n", 0, 0, 0 );
-
- idl = bdb2i_index_read( be, type, INDEX_PRESENCE, "*" );
-
- Debug( LDAP_DEBUG_TRACE, "<= presence_candidates %ld\n",
- idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
- return( idl );
-}
-
-static ID_BLOCK *
-approx_candidates(
- BackendDB *be,
- Ava *ava
-)
-{
- char *w, *c;
- ID_BLOCK *idl, *tmp;
-
- Debug( LDAP_DEBUG_TRACE, "=> approx_candidates\n", 0, 0, 0 );
-
- idl = NULL;
- for ( w = first_word( ava->ava_value.bv_val ); w != NULL;
- w = next_word( w ) ) {
- c = phonetic( w );
- if ( (tmp = bdb2i_index_read( be, ava->ava_type, INDEX_APPROX, c ))
- == NULL ) {
- free( c );
- bdb2i_idl_free( idl );
- Debug( LDAP_DEBUG_TRACE, "<= approx_candidates NULL\n",
- 0, 0, 0 );
- return( NULL );
- }
- free( c );
-
- if ( idl == NULL ) {
- idl = tmp;
- } else {
- idl = bdb2i_idl_intersection( be, idl, tmp );
- }
- }
-
- Debug( LDAP_DEBUG_TRACE, "<= approx_candidates %ld\n",
- idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
- return( idl );
-}
-
-static ID_BLOCK *
-list_candidates(
- BackendDB *be,
- Filter *flist,
- int ftype
-)
-{
- ID_BLOCK *idl, *tmp, *tmp2;
- Filter *f;
-
- Debug( LDAP_DEBUG_TRACE, "=> list_candidates 0x%x\n", ftype, 0, 0 );
-
- idl = NULL;
- for ( f = flist; f != NULL; f = f->f_next ) {
- if ( (tmp = bdb2i_filter_candidates( be, f )) == NULL &&
- ftype == LDAP_FILTER_AND ) {
- Debug( LDAP_DEBUG_TRACE,
- "<= list_candidates NULL\n", 0, 0, 0 );
- bdb2i_idl_free( idl );
- return( NULL );
- }
-
- tmp2 = idl;
- if ( idl == NULL ) {
- idl = tmp;
- } else if ( ftype == LDAP_FILTER_AND ) {
- idl = bdb2i_idl_intersection( be, idl, tmp );
- bdb2i_idl_free( tmp );
- bdb2i_idl_free( tmp2 );
- } else {
- idl = bdb2i_idl_union( be, idl, tmp );
- bdb2i_idl_free( tmp );
- bdb2i_idl_free( tmp2 );
- }
- }
-
- Debug( LDAP_DEBUG_TRACE, "<= list_candidates %ld\n",
- idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
- return( idl );
-}
-
-static ID_BLOCK *
-substring_candidates(
- BackendDB *be,
- Filter *f
-)
-{
- int i;
- ID_BLOCK *idl, *tmp, *tmp2;
-
- Debug( LDAP_DEBUG_TRACE, "=> substring_candidates\n", 0, 0, 0 );
-
- idl = NULL;
-
- /* initial */
- if ( f->f_sub_initial != NULL ) {
- if ( (int) strlen( f->f_sub_initial ) < SUBLEN - 1 ) {
- idl = bdb2i_idl_allids( be );
- } else if ( (idl = substring_comp_candidates( be, f->f_sub_type,
- f->f_sub_initial, '^' )) == NULL ) {
- return( NULL );
- }
- }
-
- /* final */
- if ( f->f_sub_final != NULL ) {
- if ( (int) strlen( f->f_sub_final ) < SUBLEN - 1 ) {
- tmp = bdb2i_idl_allids( be );
- } else if ( (tmp = substring_comp_candidates( be, f->f_sub_type,
- f->f_sub_final, '$' )) == NULL ) {
- bdb2i_idl_free( idl );
- return( NULL );
- }
-
- if ( idl == NULL ) {
- idl = tmp;
- } else {
- tmp2 = idl;
- idl = bdb2i_idl_intersection( be, idl, tmp );
- bdb2i_idl_free( tmp );
- bdb2i_idl_free( tmp2 );
- }
- }
-
- for ( i = 0; f->f_sub_any != NULL && f->f_sub_any[i] != NULL; i++ ) {
- if ( (int) strlen( f->f_sub_any[i] ) < SUBLEN ) {
- tmp = bdb2i_idl_allids( be );
- } else if ( (tmp = substring_comp_candidates( be, f->f_sub_type,
- f->f_sub_any[i], 0 )) == NULL ) {
- bdb2i_idl_free( idl );
- return( NULL );
- }
-
- if ( idl == NULL ) {
- idl = tmp;
- } else {
- tmp2 = idl;
- idl = bdb2i_idl_intersection( be, idl, tmp );
- bdb2i_idl_free( tmp );
- bdb2i_idl_free( tmp2 );
- }
- }
-
- Debug( LDAP_DEBUG_TRACE, "<= substring_candidates %ld\n",
- idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
- return( idl );
-}
-
-static ID_BLOCK *
-substring_comp_candidates(
- BackendDB *be,
- char *type,
- char *val,
- int prepost
-)
-{
- int i, len;
- ID_BLOCK *idl, *tmp, *tmp2;
- char *p;
- char buf[SUBLEN + 1];
-
- Debug( LDAP_DEBUG_TRACE, "=> substring_comp_candidates\n", 0, 0, 0 );
-
- len = strlen( val );
- idl = NULL;
-
- /* prepend ^ for initial substring */
- if ( prepost == '^' ) {
- buf[0] = '^';
- for ( i = 0; i < SUBLEN - 1; i++ ) {
- buf[i + 1] = val[i];
- }
- buf[SUBLEN] = '\0';
-
- if ( (idl = bdb2i_index_read( be, type, INDEX_SUB, buf )) == NULL ) {
- return( NULL );
- }
- } else if ( prepost == '$' ) {
- p = val + len - SUBLEN + 1;
- for ( i = 0; i < SUBLEN - 1; i++ ) {
- buf[i] = p[i];
- }
- buf[SUBLEN - 1] = '$';
- buf[SUBLEN] = '\0';
-
- if ( (idl = bdb2i_index_read( be, type, INDEX_SUB, buf )) == NULL ) {
- return( NULL );
- }
- }
-
- for ( p = val; p < (val + len - SUBLEN + 1); p++ ) {
- for ( i = 0; i < SUBLEN; i++ ) {
- buf[i] = p[i];
- }
- buf[SUBLEN] = '\0';
-
- if ( (tmp = bdb2i_index_read( be, type, INDEX_SUB, buf )) == NULL ) {
- bdb2i_idl_free( idl );
- return( NULL );
- }
-
- if ( idl == NULL ) {
- idl = tmp;
- } else {
- tmp2 = idl;
- idl = bdb2i_idl_intersection( be, idl, tmp );
- bdb2i_idl_free( tmp );
- bdb2i_idl_free( tmp2 );
- }
-
- /* break if no candidates */
- if( idl == NULL ) {
- break;
- }
-
- /* if we're down to two (or less) matches, stop searching */
- if( ID_BLOCK_NIDS(idl) < 3 ) {
- Debug( LDAP_DEBUG_TRACE, "substring_comp_candidates: "
- "down to a %ld matches, stopped search\n",
- (long) ID_BLOCK_NIDS(idl), 0, 0 );
- break;
- }
- }
-
- Debug( LDAP_DEBUG_TRACE, "<= substring_comp_candidates %ld\n",
- idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
- return( idl );
-}
+++ /dev/null
-/* group.c - bdb2 backend acl group routine */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/socket.h>
-#include <ac/string.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-#include "proto-back-bdb2.h"
-
-
-/* return 0 IFF op_dn is a value in member attribute
- * of entry with gr_dn AND that entry has an objectClass
- * value of groupOfNames
- */
-static int
-bdb2i_back_group_internal(
- BackendDB *be,
- Entry *target,
- const char *gr_ndn,
- const char *op_ndn,
- const char *objectclassValue,
- const char *groupattrName
-)
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- Entry *e;
- int rc = 1;
- Attribute *attr;
- struct berval bv;
-
- Debug( LDAP_DEBUG_ARGS,
- "=> bdb2i_back_group: gr dn: \"%s\"\n",
- gr_ndn, 0, 0 );
- Debug( LDAP_DEBUG_ARGS,
- "=> bdb2i_back_group: op dn: \"%s\"\n",
- op_ndn, 0, 0 );
- Debug( LDAP_DEBUG_ARGS,
- "=> bdb2i_back_group: objectClass: \"%s\" attrName: \"%s\"\n",
- objectclassValue, groupattrName, 0 );
-
- Debug( LDAP_DEBUG_ARGS,
- "=> bdb2i_back_group: tr dn: \"%s\"\n",
- target->e_ndn, 0, 0 );
-
- if (strcmp(target->e_ndn, gr_ndn) == 0) {
- /* we already have a LOCKED copy of the entry */
- e = target;
- Debug( LDAP_DEBUG_ARGS,
- "=> bdb2i_back_group: target is group: \"%s\"\n",
- gr_ndn, 0, 0 );
-
- } else {
- /* can we find group entry with reader lock */
- if ((e = bdb2i_dn2entry_r(be, gr_ndn, NULL )) == NULL) {
- Debug( LDAP_DEBUG_ACL,
- "=> bdb2i_back_group: cannot find group: \"%s\"\n",
- gr_ndn, 0, 0 );
- return( 1 );
- }
-
- Debug( LDAP_DEBUG_ACL,
- "=> bdb2i_back_group: found group: \"%s\"\n",
- gr_ndn, 0, 0 );
- }
-
- /* find it's objectClass and member attribute values
- * make sure this is a group entry
- * finally test if we can find op_dn in the member attribute value list
- */
-
- rc = 1;
-
- if ((attr = attr_find(e->e_attrs, "objectclass")) == NULL) {
- Debug( LDAP_DEBUG_ACL,
- "<= bdb2i_back_group: failed to find objectClass\n", 0, 0, 0 );
- goto return_results;
- }
-
- bv.bv_val = "ALIAS";
- bv.bv_len = sizeof("ALIAS")-1;
-
- if (value_find(attr->a_vals, &bv, attr->a_syntax, 1) != 0) {
- Debug( LDAP_DEBUG_ACL,
- "<= bdb2i_back_group: group is an alias\n", 0, 0, 0 );
- goto return_results;
- }
-
- bv.bv_val = "REFERRAL";
- bv.bv_len = sizeof("REFERRAL")-1;
-
- if (value_find(attr->a_vals, &bv, attr->a_syntax, 1) != 0) {
- Debug( LDAP_DEBUG_ACL,
- "<= bdb2i_back_group: group is a referral\n", 0, 0, 0 );
- goto return_results;
- }
-
- bv.bv_val = (char *) objectclassValue;
- bv.bv_len = strlen( bv.bv_val );
-
- if (value_find(attr->a_vals, &bv, attr->a_syntax, 1) != 0) {
- Debug( LDAP_DEBUG_ACL,
- "<= bdb2i_back_group: failed to find %s in objectClass\n",
- objectclassValue, 0, 0 );
- goto return_results;
- }
-
- if ((attr = attr_find(e->e_attrs, groupattrName)) == NULL) {
- Debug( LDAP_DEBUG_ACL,
- "<= bdb2i_back_group: failed to find %s\n",
- groupattrName, 0, 0 );
- goto return_results;
- }
-
- Debug( LDAP_DEBUG_ACL,
- "<= bdb2i_back_group: found objectClass %s and %s\n",
- objectclassValue, groupattrName, 0 );
-
-
- bv.bv_val = (char *) op_ndn;
- bv.bv_len = strlen( op_ndn );
-
- if (value_find( attr->a_vals, &bv, attr->a_syntax, 1) != 0 ) {
- Debug( LDAP_DEBUG_ACL,
- "<= bdb2i_back_group: \"%s\" not in \"%s\": %s\n",
- op_ndn, gr_ndn, groupattrName );
- goto return_results;
- }
-
- Debug( LDAP_DEBUG_ACL,
- "<= bdb2i_back_group: \"%s\" is in \"%s\": %s\n",
- op_ndn, gr_ndn, groupattrName );
- rc = 0;
-
-return_results:
- if( target != e ) {
- /* free entry and reader lock */
- bdb2i_cache_return_entry_r( &li->li_cache, e );
- }
-
- Debug( LDAP_DEBUG_ARGS, "bdb2i_back_group: rc: %d\n", rc, 0, 0 );
- return(rc);
-}
-
-
-int
-bdb2_back_group(
- BackendDB *be,
- Entry *target,
- const char *gr_ndn,
- const char *op_ndn,
- const char *objectclassValue,
- const char *groupattrName
-)
-{
- DB_LOCK lock;
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- struct timeval time1;
- int ret;
-
- bdb2i_start_timing( be->bd_info, &time1 );
-
- if ( bdb2i_enter_backend_r( &lock ) != 0 ) {
-
- return( 1 );
-
- }
-
- ret = bdb2i_back_group_internal( be, target, gr_ndn, op_ndn,
- objectclassValue, groupattrName );
-
- (void) bdb2i_leave_backend_r( lock );
- bdb2i_stop_timing( be->bd_info, time1, "GRP", NULL, NULL );
-
- return( ret );
-}
-
-
+++ /dev/null
-/* id2children.c - routines to deal with the id2children index */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-#include <ac/string.h>
-
-#include <ac/socket.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-
-int
-bdb2i_has_children(
- BackendDB *be,
- Entry *p
-)
-{
- struct dbcache *db;
- Datum key;
- int rc = 0;
- ID_BLOCK *idl;
-
- ldbm_datum_init( key );
-
- Debug( LDAP_DEBUG_TRACE, "=> bdb2i_has_children( %ld )\n", p->e_id , 0, 0 );
-
- if ( (db = bdb2i_cache_open( be, "dn2id", BDB2_SUFFIX,
- LDBM_WRCREAT )) == NULL ) {
- Debug( LDAP_DEBUG_ANY,
- "<= bdb2i_has_children: could not open \"dn2id" BDB2_SUFFIX "\"\n",
- 0, 0, 0 );
- return( 0 );
- }
-
- key.dsize = strlen( p->e_ndn ) + 2;
- key.dptr = ch_malloc( key.dsize );
- sprintf( key.dptr, "%c%s", DN_ONE_PREFIX, p->e_ndn );
-
- idl = bdb2i_idl_fetch( be, db, key );
-
- free( key.dptr );
-
- bdb2i_cache_close( be, db );
-
- if( idl != NULL ) {
- bdb2i_idl_free( idl );
- rc = 1;
- }
-
- Debug( LDAP_DEBUG_TRACE, "<= bdb2i_has_children( %ld ): %s\n",
- p->e_id, rc ? "yes" : "no", 0 );
- return( rc );
-}
+++ /dev/null
-/* id2entry.c - routines to deal with the id2entry index */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/socket.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-
-/*
- * This routine adds (or updates) an entry on disk.
- * The cache should already be updated.
- */
-
-int
-bdb2i_id2entry_add( BackendDB *be, Entry *e )
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- struct dbcache *db;
- Datum key, data;
- int len, rc, flags;
-
- ldbm_datum_init( key );
- ldbm_datum_init( data );
-
- Debug( LDAP_DEBUG_TRACE, "=> bdb2i_id2entry_add( %ld, \"%s\" )\n", e->e_id,
- e->e_dn, 0 );
-
- if ( (db = bdb2i_cache_open( be, "id2entry", BDB2_SUFFIX, LDBM_WRCREAT ))
- == NULL ) {
- Debug( LDAP_DEBUG_ANY, "Could not open/create id2entry%s\n",
- BDB2_SUFFIX, 0, 0 );
- return( -1 );
- }
-
- key.dptr = (char *) &e->e_id;
- key.dsize = sizeof(ID);
-
- ldap_pvt_thread_mutex_lock( &entry2str_mutex );
- data.dptr = entry2str( e, &len );
- data.dsize = len + 1;
-
- /* store it */
- flags = LDBM_REPLACE;
- rc = bdb2i_cache_store( db, key, data, flags );
-
- ldap_pvt_thread_mutex_unlock( &entry2str_mutex );
-
- bdb2i_cache_close( be, db );
-
- Debug( LDAP_DEBUG_TRACE, "<= bdb2i_id2entry_add %d\n", rc, 0, 0 );
-
- return( rc );
-}
-
-int
-bdb2i_id2entry_delete( BackendDB *be, Entry *e )
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- struct dbcache *db;
- Datum key;
- int rc;
-
- Debug(LDAP_DEBUG_TRACE, "=> bdb2i_id2entry_delete( %ld, \"%s\" )\n", e->e_id,
- e->e_dn, 0 );
-
-#ifdef notdef
-#ifdef LDAP_DEBUG
- /* check for writer lock */
- assert(ldap_pvt_thread_rdwr_writers(&e->e_rdwr) == 1);
-#endif
-#endif
-
- ldbm_datum_init( key );
-
- if ( (db = bdb2i_cache_open( be, "id2entry", BDB2_SUFFIX, LDBM_WRCREAT ))
- == NULL ) {
- Debug( LDAP_DEBUG_ANY, "Could not open/create id2entry%s\n",
- BDB2_SUFFIX, 0, 0 );
- return( -1 );
- }
-
- if ( bdb2i_cache_delete_entry( &li->li_cache, e ) != 0 ) {
- Debug(LDAP_DEBUG_ANY, "could not delete %ld (%s) from cache\n",
- e->e_id, e->e_dn, 0 );
- }
-
- key.dptr = (char *) &e->e_id;
- key.dsize = sizeof(ID);
-
- rc = bdb2i_cache_delete( db, key );
-
- bdb2i_cache_close( be, db );
-
- Debug( LDAP_DEBUG_TRACE, "<= bdb2i_id2entry_delete %d\n", rc, 0, 0 );
- return( rc );
-}
-
-/* returns entry with reader/writer lock */
-Entry *
-bdb2i_id2entry_rw( BackendDB *be, ID id, int rw )
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- struct dbcache *db;
- Datum key, data;
- Entry *e;
-
- ldbm_datum_init( key );
- ldbm_datum_init( data );
-
- Debug( LDAP_DEBUG_TRACE, "=> bdb2i_id2entry_%s( %ld )\n",
- rw ? "w" : "r", id, 0 );
-
- if ( (e = bdb2i_cache_find_entry_id( &li->li_cache, id, rw )) != NULL ) {
- Debug( LDAP_DEBUG_TRACE, "<= bdb2i_id2entry_%s( %ld ) 0x%lx (cache)\n",
- rw ? "w" : "r", id, (unsigned long)e );
- return( e );
- }
-
- if ( (db = bdb2i_cache_open( be, "id2entry", BDB2_SUFFIX, LDBM_WRCREAT ))
- == NULL ) {
- Debug( LDAP_DEBUG_ANY, "Could not open id2entry%s\n",
- BDB2_SUFFIX, 0, 0 );
- return( NULL );
- }
-
- key.dptr = (char *) &id;
- key.dsize = sizeof(ID);
-
- data = bdb2i_cache_fetch( db, key );
-
- if ( data.dptr == NULL ) {
- Debug( LDAP_DEBUG_TRACE, "<= bdb2i_id2entry_%s( %ld ) not found\n",
- rw ? "w" : "r", id, 0 );
- bdb2i_cache_close( be, db );
- return( NULL );
- }
-
- e = str2entry( data.dptr );
-
- ldbm_datum_free( db->dbc_db, data );
- bdb2i_cache_close( be, db );
-
- if ( e == NULL ) {
- Debug( LDAP_DEBUG_TRACE, "<= bdb2i_id2entry_%s( %ld ) (failed)\n",
- rw ? "w" : "r", id, 0 );
- return( NULL );
- }
-
- e->e_id = id;
-
- if ( bdb2i_cache_add_entry_rw( &li->li_cache, e, rw ) != 0 ) {
- entry_free( e );
-
- /* see if it got added underneath us */
- if((e = bdb2i_cache_find_entry_id( &li->li_cache, id, rw )) != NULL ) {
- Debug( LDAP_DEBUG_TRACE,
- "<= bdb2i_id2entry_%s( %ld ) 0x%lx (cache)\n",
- rw ? "w" : "r", id, (unsigned long)e );
- return( e );
- }
-
- Debug( LDAP_DEBUG_TRACE,
- "<= bdb2i_id2entry_%s( %ld ) (cache add failed)\n",
- rw ? "w" : "r", id, 0 );
- return( NULL );
- }
-
- Debug( LDAP_DEBUG_TRACE, "<= bdb2i_id2entry_%s( %ld ) 0x%lx (disk)\n",
- rw ? "w" : "r", id, (unsigned long) e );
-
- return( e );
-}
-
-
+++ /dev/null
-/* idl.c - ldap id list handling routines */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/string.h>
-#include <ac/socket.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-
-static ID_BLOCK* idl_dup( ID_BLOCK *idl );
-
-/* Allocate an ID_BLOCK with room for nids ids */
-ID_BLOCK *
-bdb2i_idl_alloc( unsigned int nids )
-{
- ID_BLOCK *new;
-
- /* nmax + nids + space for the ids */
- new = (ID_BLOCK *) ch_calloc( (ID_BLOCK_IDS_OFFSET + nids), sizeof(ID) );
- ID_BLOCK_NMAX(new) = nids;
- ID_BLOCK_NIDS(new) = 0;
-
- return( new );
-}
-
-
-/* Allocate an empty ALLIDS ID_BLOCK */
-ID_BLOCK *
-bdb2i_idl_allids( BackendDB *be )
-{
- ID_BLOCK *idl;
-
- idl = bdb2i_idl_alloc( 0 );
- ID_BLOCK_NMAX(idl) = ID_BLOCK_ALLIDS_VALUE;
- ID_BLOCK_NIDS(idl) = bdb2i_next_id_get( be );
-
- return( idl );
-}
-
-
-/* Free an ID_BLOCK */
-void
-bdb2i_idl_free( ID_BLOCK *idl )
-{
- if ( idl == NULL ) {
- Debug( LDAP_DEBUG_TRACE,
- "bdb2i_idl_free: called with NULL pointer\n",
- 0, 0, 0 );
- return;
- }
-
- free( (char *) idl );
-}
-
-
-/* Fetch an single ID_BLOCK from the cache */
-static ID_BLOCK *
-idl_fetch_one(
- BackendDB *be,
- struct dbcache *db,
- Datum key
-)
-{
- Datum data;
- ID_BLOCK *idl;
-
- ldbm_datum_init( data );
-
- /* Debug( LDAP_DEBUG_TRACE, "=> idl_fetch_one\n", 0, 0, 0 ); */
-
- data = bdb2i_cache_fetch( db, key );
-
- if( data.dptr == NULL ) {
- return NULL;
- }
-
- idl = idl_dup( (ID_BLOCK *) data.dptr);
- ldbm_datum_free( db->dbc_db, data );
-
- return( idl );
-}
-
-
-/* Fetch a set of ID_BLOCKs from the cache
- * if not INDIRECT
- * if block return is an ALLIDS block,
- * return an new ALLIDS block
- * otherwise
- * return block
- * construct super block from all blocks referenced by INDIRECT block
- * return super block
- */
-ID_BLOCK *
-bdb2i_idl_fetch(
- BackendDB *be,
- struct dbcache *db,
- Datum key
-)
-{
- Datum data;
- ID_BLOCK *idl;
- ID_BLOCK **tmp;
- char *kstr;
- int i, nids;
-
- idl = idl_fetch_one( be, db, key );
-
- if ( idl == NULL ) {
- return NULL;
- }
-
- if ( ID_BLOCK_ALLIDS(idl) ) {
- /* all ids block */
- /* make sure we have the current value of highest id */
- bdb2i_idl_free( idl );
- idl = bdb2i_idl_allids( be );
-
- return( idl );
- }
-
- if ( ! ID_BLOCK_INDIRECT( idl ) ) {
- /* regular block */
- return( idl );
- }
-
- /*
- * this is an indirect block which points to other blocks.
- * we need to read in all the blocks it points to and construct
- * a big id list containing all the ids, which we will return.
- */
-
- /* count the number of blocks & allocate space for pointers to them */
- for ( i = 0; !ID_BLOCK_NOID(idl, i); i++ )
- ; /* NULL */
- tmp = (ID_BLOCK **) ch_malloc( (i + 1) * sizeof(ID_BLOCK *) );
-
- /* read in all the blocks */
- kstr = (char *) ch_malloc( key.dsize + CONT_SIZE );
- nids = 0;
- for ( i = 0; !ID_BLOCK_NOID(idl, i); i++ ) {
- ldbm_datum_init( data );
-
- sprintf( kstr, "%c%ld%s", CONT_PREFIX,
- ID_BLOCK_ID(idl, i), key.dptr );
- data.dptr = kstr;
- data.dsize = strlen( kstr ) + 1;
-
- if ( (tmp[i] = idl_fetch_one( be, db, data )) == NULL ) {
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_idl_fetch of (%s) returns NULL\n", data.dptr, 0, 0 );
- continue;
- }
-
- nids += ID_BLOCK_NIDS(tmp[i]);
- }
- tmp[i] = NULL;
- free( kstr );
- bdb2i_idl_free( idl );
-
- /* allocate space for the big block */
- idl = bdb2i_idl_alloc( nids );
- ID_BLOCK_NIDS(idl) = nids;
- nids = 0;
-
- /* copy in all the ids from the component blocks */
- for ( i = 0; tmp[i] != NULL; i++ ) {
- if ( tmp[i] == NULL ) {
- continue;
- }
-
- SAFEMEMCPY(
- (char *) &ID_BLOCK_ID(idl, nids),
- (char *) &ID_BLOCK_ID(tmp[i], 0),
- ID_BLOCK_NIDS(tmp[i]) * sizeof(ID) );
- nids += ID_BLOCK_NIDS(tmp[i]);
-
- bdb2i_idl_free( tmp[i] );
- }
- free( (char *) tmp );
-
- Debug( LDAP_DEBUG_TRACE, "<= bdb2i_idl_fetch %ld ids (%ld max)\n",
- ID_BLOCK_NIDS(idl), ID_BLOCK_NMAX(idl), 0 );
- return( idl );
-}
-
-
-/* store a single block */
-static int
-idl_store(
- BackendDB *be,
- struct dbcache *db,
- Datum key,
- ID_BLOCK *idl
-)
-{
- int rc, flags;
- Datum data;
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
-
- ldbm_datum_init( data );
-
- /* Debug( LDAP_DEBUG_TRACE, "=> idl_store\n", 0, 0, 0 ); */
-
- data.dptr = (char *) idl;
- data.dsize = (ID_BLOCK_IDS_OFFSET + ID_BLOCK_NMAX(idl)) * sizeof(ID);
-
-#ifdef LDBM_DEBUG
- Statslog( LDAP_DEBUG_STATS, "<= idl_store(): rc=%d\n",
- rc, 0, 0, 0, 0 );
-#endif
-
- flags = LDBM_REPLACE;
- rc = bdb2i_cache_store( db, key, data, flags );
-
- /* Debug( LDAP_DEBUG_TRACE, "<= idl_store %d\n", rc, 0, 0 ); */
- return( rc );
-}
-
-
-/* split the block at id
- * locate ID greater than or equal to id.
- */
-static void
-idl_split_block(
- ID_BLOCK *b,
- ID id,
- ID_BLOCK **right,
- ID_BLOCK **left
-)
-{
- unsigned int nr, nl;
-
- /* find where to split the block *//* XXX linear search XXX */
- for ( nr = 0; nr < ID_BLOCK_NIDS(b) && id > ID_BLOCK_ID(b, nr); nr++ )
- ; /* NULL */
-
- nl = ID_BLOCK_NIDS(b) - nr;
-
- *right = bdb2i_idl_alloc( nr == 0 ? 1 : nr );
- *left = bdb2i_idl_alloc( nl + (nr == 0 ? 0 : 1));
-
- /*
- * everything before the id being inserted in the first block
- * unless there is nothing, in which case the id being inserted
- * goes there.
- */
- if ( nr == 0 ) {
- ID_BLOCK_NIDS(*right) = 1;
- ID_BLOCK_ID(*right, 0) = id;
- } else {
- SAFEMEMCPY(
- (char *) &ID_BLOCK_ID(*right, 0),
- (char *) &ID_BLOCK_ID(b, 0),
- nr * sizeof(ID) );
- ID_BLOCK_NIDS(*right) = nr;
- ID_BLOCK_ID(*left, 0) = id;
- }
-
- /* the id being inserted & everything after in the second block */
- SAFEMEMCPY(
- (char *) &ID_BLOCK_ID(*left, (nr == 0 ? 0 : 1)),
- (char *) &ID_BLOCK_ID(b, nr),
- nl * sizeof(ID) );
- ID_BLOCK_NIDS(*left) = nl + (nr == 0 ? 0 : 1);
-}
-
-
-/*
- * idl_change_first - called when an indirect block's first key has
- * changed, meaning it needs to be stored under a new key, and the
- * header block pointing to it needs updating.
- */
-static int
-idl_change_first(
- BackendDB *be,
- struct dbcache *db,
- Datum hkey, /* header block key */
- ID_BLOCK *h, /* header block */
- int pos, /* pos in h to update */
- Datum bkey, /* data block key */
- ID_BLOCK *b /* data block */
-)
-{
- int rc;
-
- /* Debug( LDAP_DEBUG_TRACE, "=> idl_change_first\n", 0, 0, 0 ); */
-
- /* delete old key block */
- if ( (rc = bdb2i_cache_delete( db, bkey )) != 0 ) {
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_db_delete of (%s) returns %d\n", bkey.dptr, rc,
- 0 );
- return( rc );
- }
-
- /* write block with new key */
- sprintf( bkey.dptr, "%c%ld%s", CONT_PREFIX,
- ID_BLOCK_ID(b, 0), hkey.dptr );
- bkey.dsize = strlen( bkey.dptr ) + 1;
- if ( (rc = idl_store( be, db, bkey, b )) != 0 ) {
- Debug( LDAP_DEBUG_ANY,
- "idl_store of (%s) returns %d\n", bkey.dptr, rc, 0 );
- return( rc );
- }
-
- /* update + write indirect header block */
- ID_BLOCK_ID(h, pos) = ID_BLOCK_ID(b, 0);
- if ( (rc = idl_store( be, db, hkey, h )) != 0 ) {
- Debug( LDAP_DEBUG_ANY,
- "idl_store of (%s) returns %d\n", hkey.dptr, rc, 0 );
- return( rc );
- }
-
- return( 0 );
-}
-
-
-int
-bdb2i_idl_insert_key(
- BackendDB *be,
- struct dbcache *db,
- Datum key,
- ID id
-)
-{
- int i, j, first, rc;
- ID_BLOCK *idl, *tmp, *tmp2, *tmp3;
- char *kstr;
- Datum k2;
-
- ldbm_datum_init( k2 );
-
- if ( (idl = idl_fetch_one( be, db, key )) == NULL ) {
-#ifdef LDBM_DEBUG
- Statslog( LDAP_DEBUG_STATS, "=> bdb2i_idl_insert_key(): no key yet\n",
- 0, 0, 0, 0, 0 );
-#endif
-
- idl = bdb2i_idl_alloc( 1 );
- ID_BLOCK_ID(idl, ID_BLOCK_NIDS(idl)++) = id;
- rc = idl_store( be, db, key, idl );
-
- bdb2i_idl_free( idl );
- return( rc );
- }
-
- if ( ID_BLOCK_ALLIDS( idl ) ) {
- /* ALLIDS */
- bdb2i_idl_free( idl );
- return 0;
- }
-
- if ( ! ID_BLOCK_INDIRECT( idl ) ) {
- /* regular block */
- switch ( bdb2i_idl_insert( &idl, id, db->dbc_maxids ) ) {
- case 0: /* id inserted - store the updated block */
- case 1:
- rc = idl_store( be, db, key, idl );
- break;
-
- case 2: /* id already there - nothing to do */
- rc = 0;
- break;
-
- case 3: /* id not inserted - block must be split */
- /* check threshold for marking this an all-id block */
- if ( db->dbc_maxindirect < 2 ) {
- bdb2i_idl_free( idl );
- idl = bdb2i_idl_allids( be );
- rc = idl_store( be, db, key, idl );
- break;
- }
-
- idl_split_block( idl, id, &tmp, &tmp2 );
- bdb2i_idl_free( idl );
-
- /* create the header indirect block */
- idl = bdb2i_idl_alloc( 3 );
- ID_BLOCK_NMAX(idl) = 3;
- ID_BLOCK_NIDS(idl) = ID_BLOCK_INDIRECT_VALUE;
- ID_BLOCK_ID(idl, 0) = ID_BLOCK_ID(tmp, 0);
- ID_BLOCK_ID(idl, 1) = ID_BLOCK_ID(tmp2, 0);
- ID_BLOCK_ID(idl, 2) = NOID;
-
- /* store it */
- rc = idl_store( be, db, key, idl );
-
- /* store the first id block */
- kstr = (char *) ch_malloc( key.dsize + CONT_SIZE );
- sprintf( kstr, "%c%ld%s", CONT_PREFIX,
- ID_BLOCK_ID(tmp, 0), key.dptr );
- k2.dptr = kstr;
- k2.dsize = strlen( kstr ) + 1;
- rc = idl_store( be, db, k2, tmp );
-
- /* store the second id block */
- sprintf( kstr, "%c%ld%s", CONT_PREFIX,
- ID_BLOCK_ID(tmp2, 0), key.dptr );
- k2.dptr = kstr;
- k2.dsize = strlen( kstr ) + 1;
- rc = idl_store( be, db, k2, tmp2 );
-
- free( kstr );
- bdb2i_idl_free( tmp );
- bdb2i_idl_free( tmp2 );
- break;
- }
-
- bdb2i_idl_free( idl );
- return( rc );
- }
-
- /*
- * this is an indirect block which points to other blocks.
- * we need to read in the block into which the id should be
- * inserted, then insert the id and store the block. we might
- * have to split the block if it is full, which means we also
- * need to write a new "header" block.
- */
-
- /* select the block to try inserting into *//* XXX linear search XXX */
- for ( i = 0; !ID_BLOCK_NOID(idl, i) && id > ID_BLOCK_ID(idl, i); i++ )
- ; /* NULL */
- if ( i != 0 ) {
- i--;
- first = 0;
- } else {
- first = 1;
- }
-
- /* get the block */
- kstr = (char *) ch_malloc( key.dsize + CONT_SIZE );
- sprintf( kstr, "%c%ld%s", CONT_PREFIX,
- ID_BLOCK_ID(idl, i), key.dptr );
- k2.dptr = kstr;
- k2.dsize = strlen( kstr ) + 1;
- if ( (tmp = idl_fetch_one( be, db, k2 )) == NULL ) {
- Debug( LDAP_DEBUG_ANY, "nonexistent continuation block (%s)\n",
- k2.dptr, 0, 0 );
- free( kstr );
- bdb2i_idl_free( idl );
- return( -1 );
- }
-
- /* insert the id */
- switch ( bdb2i_idl_insert( &tmp, id, db->dbc_maxids ) ) {
- case 0: /* id inserted ok */
- if ( (rc = idl_store( be, db, k2, tmp )) != 0 ) {
- Debug( LDAP_DEBUG_ANY,
- "idl_store of (%s) returns %d\n", k2.dptr, rc, 0 );
- }
- break;
-
- case 1: /* id inserted - first id in block has changed */
- /*
- * key for this block has changed, so we have to
- * write the block under the new key, delete the
- * old key block + update and write the indirect
- * header block.
- */
-
- rc = idl_change_first( be, db, key, idl, i, k2, tmp );
- break;
-
- case 2: /* id not inserted - already there, do nothing */
- rc = 0;
- break;
-
- case 3: /* id not inserted - block is full */
- /*
- * first, see if it will fit in the next block,
- * without splitting, unless we're trying to insert
- * into the beginning of the first block.
- */
-
- /* is there a next block? */
- if ( !first && !ID_BLOCK_NOID(idl, i + 1) ) {
- /* read it in */
- sprintf( kstr, "%c%ld%s", CONT_PREFIX,
- ID_BLOCK_ID(idl, i + 1), key.dptr );
- k2.dptr = kstr;
- k2.dsize = strlen( kstr ) + 1;
- if ( (tmp2 = idl_fetch_one( be, db, k2 )) == NULL ) {
- Debug( LDAP_DEBUG_ANY,
- "idl_fetch_one (%s) returns NULL\n",
- k2.dptr, 0, 0 );
- /* split the original block */
- goto split;
- }
-
- switch ( (rc = bdb2i_idl_insert( &tmp2, id,
- db->dbc_maxids )) ) {
- case 1: /* id inserted first in block */
- rc = idl_change_first( be, db, key, idl,
- i + 1, k2, tmp2 );
- /* FALL */
-
- case 2: /* id already there - how? */
- case 0: /* id inserted */
- if ( rc == 2 ) {
- Debug( LDAP_DEBUG_ANY,
- "id %ld already in next block\n",
- id, 0, 0 );
- }
- free( kstr );
- bdb2i_idl_free( tmp );
- bdb2i_idl_free( tmp2 );
- bdb2i_idl_free( idl );
- return( 0 );
-
- case 3: /* split the original block */
- break;
- }
-
- bdb2i_idl_free( tmp2 );
- }
-
-split:
- /*
- * must split the block, write both new blocks + update
- * and write the indirect header block.
- */
-
- rc = 0; /* optimistic */
-
-
- /* count how many indirect blocks *//* XXX linear count XXX */
- for ( j = 0; !ID_BLOCK_NOID(idl, j); j++ )
- ; /* NULL */
-
- /* check it against all-id thresholed */
- if ( j + 1 > db->dbc_maxindirect ) {
- /*
- * we've passed the all-id threshold, meaning
- * that this set of blocks should be replaced
- * by a single "all-id" block. our job: delete
- * all the indirect blocks, and replace the header
- * block by an all-id block.
- */
-
- /* delete all indirect blocks */
- for ( j = 0; !ID_BLOCK_NOID(idl, j); j++ ) {
- sprintf( kstr, "%c%ld%s", CONT_PREFIX,
- ID_BLOCK_ID(idl, j), key.dptr );
- k2.dptr = kstr;
- k2.dsize = strlen( kstr ) + 1;
-
- rc = bdb2i_cache_delete( db, k2 );
- }
-
- /* store allid block in place of header block */
- bdb2i_idl_free( idl );
- idl = bdb2i_idl_allids( be );
- rc = idl_store( be, db, key, idl );
-
- free( kstr );
- bdb2i_idl_free( idl );
- bdb2i_idl_free( tmp );
- return( rc );
- }
-
- idl_split_block( tmp, id, &tmp2, &tmp3 );
- bdb2i_idl_free( tmp );
-
- /* create a new updated indirect header block */
- tmp = bdb2i_idl_alloc( ID_BLOCK_NMAX(idl) + 1 );
- ID_BLOCK_NIDS(tmp) = ID_BLOCK_INDIRECT_VALUE;
- /* everything up to the split block */
- SAFEMEMCPY(
- (char *) &ID_BLOCK_ID(tmp, 0),
- (char *) &ID_BLOCK_ID(idl, 0),
- i * sizeof(ID) );
- /* the two new blocks */
- ID_BLOCK_ID(tmp, i) = ID_BLOCK_ID(tmp2, 0);
- ID_BLOCK_ID(tmp, i + 1) = ID_BLOCK_ID(tmp3, 0);
- /* everything after the split block */
- SAFEMEMCPY(
- (char *) &ID_BLOCK_ID(tmp, i + 2),
- (char *) &ID_BLOCK_ID(idl, i + 1),
- (ID_BLOCK_NMAX(idl) - i - 1) * sizeof(ID) );
-
- /* store the header block */
- rc = idl_store( be, db, key, tmp );
-
- /* store the first id block */
- sprintf( kstr, "%c%ld%s", CONT_PREFIX,
- ID_BLOCK_ID(tmp2, 0), key.dptr );
- k2.dptr = kstr;
- k2.dsize = strlen( kstr ) + 1;
- rc = idl_store( be, db, k2, tmp2 );
-
- /* store the second id block */
- sprintf( kstr, "%c%ld%s", CONT_PREFIX,
- ID_BLOCK_ID(tmp3, 0), key.dptr );
- k2.dptr = kstr;
- k2.dsize = strlen( kstr ) + 1;
- rc = idl_store( be, db, k2, tmp3 );
-
- bdb2i_idl_free( tmp2 );
- bdb2i_idl_free( tmp3 );
- break;
- }
-
- free( kstr );
- bdb2i_idl_free( tmp );
- bdb2i_idl_free( idl );
- return( rc );
-}
-
-
-/*
- * bdb2i_idl_insert - insert an id into an id list.
- *
- * returns
- * 0 id inserted
- * 1 id inserted, first id in block has changed
- * 2 id not inserted, already there
- * 3 id not inserted, block must be split
- */
-int
-bdb2i_idl_insert( ID_BLOCK **idl, ID id, unsigned int maxids )
-{
- unsigned int i;
-
- if ( ID_BLOCK_ALLIDS( *idl ) ) {
- return( 2 ); /* already there */
- }
-
- /* is it already there? *//* XXX linear search XXX */
- for ( i = 0; i < ID_BLOCK_NIDS(*idl) && id > ID_BLOCK_ID(*idl, i); i++ ) {
- ; /* NULL */
- }
- if ( i < ID_BLOCK_NIDS(*idl) && ID_BLOCK_ID(*idl, i) == id ) {
- return( 2 ); /* already there */
- }
-
- /* do we need to make room for it? */
- if ( ID_BLOCK_NIDS(*idl) == ID_BLOCK_NMAX(*idl) ) {
- /* make room or indicate block needs splitting */
- if ( ID_BLOCK_NMAX(*idl) >= maxids ) {
- return( 3 ); /* block needs splitting */
- }
-
- ID_BLOCK_NMAX(*idl) *= 2;
- if ( ID_BLOCK_NMAX(*idl) > maxids ) {
- ID_BLOCK_NMAX(*idl) = maxids;
- }
- *idl = (ID_BLOCK *) ch_realloc( (char *) *idl,
- (ID_BLOCK_NMAX(*idl) + ID_BLOCK_IDS_OFFSET) * sizeof(ID) );
- }
-
- /* make a slot for the new id */
- SAFEMEMCPY( &ID_BLOCK_ID(*idl, i+1), &ID_BLOCK_ID(*idl, i),
- (ID_BLOCK_NIDS(*idl) - i) * sizeof(ID) );
-
- ID_BLOCK_ID(*idl, i) = id;
- ID_BLOCK_NIDS(*idl)++;
- (void) memset(
- (char *) &ID_BLOCK_ID((*idl), ID_BLOCK_NIDS(*idl)),
- '\0',
- (ID_BLOCK_NMAX(*idl) - ID_BLOCK_NIDS(*idl)) * sizeof(ID) );
-
- return( i == 0 ? 1 : 0 ); /* inserted - first id changed or not */
-}
-
-
-int
-bdb2i_idl_delete_key (
- BackendDB *be,
- struct dbcache *db,
- Datum key,
- ID id
-)
-{
- Datum data;
- ID_BLOCK *idl, *tmp;
- unsigned i;
- int j, nids;
- char *kstr;
-
- if ( (idl = idl_fetch_one( be, db, key ) ) == NULL )
- {
- /* It wasn't found. Hmm... */
- return -1;
- }
-
- if ( ID_BLOCK_ALLIDS( idl ) ) {
- bdb2i_idl_free( idl );
- return 0;
- }
-
- if ( ! ID_BLOCK_INDIRECT( idl ) ) {
- for ( i=0; i < ID_BLOCK_NIDS(idl); i++ ) {
- if ( ID_BLOCK_ID(idl, i) == id ) {
- if( --ID_BLOCK_NIDS(idl) == 0 ) {
- bdb2i_cache_delete( db, key );
-
- } else {
- SAFEMEMCPY (
- &ID_BLOCK_ID(idl, i),
- &ID_BLOCK_ID(idl, i+1),
- (ID_BLOCK_NIDS(idl)-i) * sizeof(ID) );
-
- ID_BLOCK_ID(idl, ID_BLOCK_NIDS(idl)) = NOID;
-
- idl_store( be, db, key, idl );
- }
-
- bdb2i_idl_free( idl );
- return 0;
- }
- /* We didn't find the ID. Hmmm... */
- }
- bdb2i_idl_free( idl );
- return -1;
- }
-
- /* We have to go through an indirect block and find the ID
- in the list of IDL's
- */
- for ( nids = 0; !ID_BLOCK_NOID(idl, nids); nids++ )
- ; /* NULL */
- kstr = (char *) ch_malloc( key.dsize + CONT_SIZE );
- for ( j = 0; !ID_BLOCK_NOID(idl, j); j++ )
- {
- ldbm_datum_init( data );
- sprintf( kstr, "%c%ld%s", CONT_PREFIX, ID_BLOCK_ID(idl, j), key.dptr );
- data.dptr = kstr;
- data.dsize = strlen( kstr ) + 1;
-
- if ( (tmp = idl_fetch_one( be, db, data )) == NULL ) {
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_idl_fetch of (%s) returns NULL\n", data.dptr, 0, 0 );
- continue;
- }
- /*
- Now try to find the ID in tmp
- */
- for ( i=0; i < ID_BLOCK_NIDS(tmp); i++ )
- {
- if ( ID_BLOCK_ID(tmp, i) == id )
- {
- SAFEMEMCPY(
- &ID_BLOCK_ID(tmp, i),
- &ID_BLOCK_ID(tmp, i+1),
- (ID_BLOCK_NIDS(tmp)-(i+1)) * sizeof(ID));
- ID_BLOCK_ID(tmp, ID_BLOCK_NIDS(tmp)-1 ) = NOID;
- ID_BLOCK_NIDS(tmp)--;
-
- if ( ID_BLOCK_NIDS(tmp) ) {
- idl_store ( be, db, data, tmp );
-
- } else {
- bdb2i_cache_delete( db, data );
- SAFEMEMCPY(
- &ID_BLOCK_ID(idl, j),
- &ID_BLOCK_ID(idl, j+1),
- (nids-(j+1)) * sizeof(ID));
- ID_BLOCK_ID(idl, nids-1) = NOID;
- nids--;
- if ( ! nids )
- bdb2i_cache_delete( db, key );
- else
- idl_store( be, db, key, idl );
- }
- bdb2i_idl_free( tmp );
- free( kstr );
- bdb2i_idl_free( idl );
- return 0;
- }
- }
- bdb2i_idl_free( tmp );
- }
- free( kstr );
- bdb2i_idl_free( idl );
- return -1;
-}
-
-
-/* return a duplicate of a single ID_BLOCK */
-static ID_BLOCK *
-idl_dup( ID_BLOCK *idl )
-{
- ID_BLOCK *new;
-
- if ( idl == NULL ) {
- return( NULL );
- }
-
- new = bdb2i_idl_alloc( ID_BLOCK_NMAX(idl) );
- SAFEMEMCPY(
- (char *) new,
- (char *) idl,
- (ID_BLOCK_NMAX(idl) + ID_BLOCK_IDS_OFFSET) * sizeof(ID) );
-
- return( new );
-}
-
-
-/* return the smaller ID_BLOCK */
-static ID_BLOCK *
-idl_min( ID_BLOCK *a, ID_BLOCK *b )
-{
- return( ID_BLOCK_NIDS(a) > ID_BLOCK_NIDS(b) ? b : a );
-}
-
-
-/*
- * bdb2i_idl_intersection - return a intersection b
- */
-ID_BLOCK *
-bdb2i_idl_intersection(
- BackendDB *be,
- ID_BLOCK *a,
- ID_BLOCK *b
-)
-{
- unsigned int ai, bi, ni;
- ID_BLOCK *n;
-
- if ( a == NULL || b == NULL ) {
- return( NULL );
- }
- if ( ID_BLOCK_ALLIDS( a ) ) {
- return( idl_dup( b ) );
- }
- if ( ID_BLOCK_ALLIDS( b ) ) {
- return( idl_dup( a ) );
- }
-
- n = idl_dup( idl_min( a, b ) );
-
- for ( ni = 0, ai = 0, bi = 0; ai < ID_BLOCK_NIDS(a); ai++ ) {
- for ( ;
- bi < ID_BLOCK_NIDS(b) && ID_BLOCK_ID(b, bi) < ID_BLOCK_ID(a, ai);
- bi++ )
- {
- ; /* NULL */
- }
-
- if ( bi == ID_BLOCK_NIDS(b) ) {
- break;
- }
-
- if ( ID_BLOCK_ID(b, bi) == ID_BLOCK_ID(a, ai) ) {
- ID_BLOCK_ID(n, ni++) = ID_BLOCK_ID(a, ai);
- }
- }
-
- if ( ni == 0 ) {
- bdb2i_idl_free( n );
- return( NULL );
- }
- ID_BLOCK_NIDS(n) = ni;
-
- return( n );
-}
-
-
-/*
- * bdb2i_idl_union - return a union b
- */
-ID_BLOCK *
-bdb2i_idl_union(
- BackendDB *be,
- ID_BLOCK *a,
- ID_BLOCK *b
-)
-{
- unsigned int ai, bi, ni;
- ID_BLOCK *n;
-
- if ( a == NULL ) {
- return( idl_dup( b ) );
- }
- if ( b == NULL ) {
- return( idl_dup( a ) );
- }
- if ( ID_BLOCK_ALLIDS( a ) || ID_BLOCK_ALLIDS( b ) ) {
- return( bdb2i_idl_allids( be ) );
- }
-
- if ( ID_BLOCK_NIDS(b) < ID_BLOCK_NIDS(a) ) {
- n = a;
- a = b;
- b = n;
- }
-
- n = bdb2i_idl_alloc( ID_BLOCK_NIDS(a) + ID_BLOCK_NIDS(b) );
-
- for ( ni = 0, ai = 0, bi = 0;
- ai < ID_BLOCK_NIDS(a) && bi < ID_BLOCK_NIDS(b);
- )
- {
- if ( ID_BLOCK_ID(a, ai) < ID_BLOCK_ID(b, bi) ) {
- ID_BLOCK_ID(n, ni++) = ID_BLOCK_ID(a, ai++);
-
- } else if ( ID_BLOCK_ID(b, bi) < ID_BLOCK_ID(a, ai) ) {
- ID_BLOCK_ID(n, ni++) = ID_BLOCK_ID(b, bi++);
-
- } else {
- ID_BLOCK_ID(n, ni++) = ID_BLOCK_ID(a, ai);
- ai++, bi++;
- }
- }
-
- for ( ; ai < ID_BLOCK_NIDS(a); ai++ ) {
- ID_BLOCK_ID(n, ni++) = ID_BLOCK_ID(a, ai);
- }
- for ( ; bi < ID_BLOCK_NIDS(b); bi++ ) {
- ID_BLOCK_ID(n, ni++) = ID_BLOCK_ID(b, bi);
- }
- ID_BLOCK_NIDS(n) = ni;
-
- return( n );
-}
-
-
-/*
- * bdb2i_idl_notin - return a intersection ~b (or a minus b)
- */
-ID_BLOCK *
-bdb2i_idl_notin(
- BackendDB *be,
- ID_BLOCK *a,
- ID_BLOCK *b
-)
-{
- unsigned int ni, ai, bi;
- ID_BLOCK *n;
-
- if ( a == NULL ) {
- return( NULL );
- }
- if ( b == NULL || ID_BLOCK_ALLIDS( b )) {
- return( idl_dup( a ) );
- }
-
- if ( ID_BLOCK_ALLIDS( a ) ) {
- n = bdb2i_idl_alloc( SLAPD_LDBM_MIN_MAXIDS );
- ni = 0;
-
- for ( ai = 1, bi = 0;
- ai < ID_BLOCK_NIDS(a) && ni < ID_BLOCK_NMAX(n) && bi < ID_BLOCK_NMAX(b);
- ai++ )
- {
- if ( ID_BLOCK_ID(b, bi) == ai ) {
- bi++;
- } else {
- ID_BLOCK_ID(n, ni++) = ai;
- }
- }
-
- for ( ; ai < ID_BLOCK_NIDS(a) && ni < ID_BLOCK_NMAX(n); ai++ ) {
- ID_BLOCK_ID(n, ni++) = ai;
- }
-
- if ( ni == ID_BLOCK_NMAX(n) ) {
- bdb2i_idl_free( n );
- return( bdb2i_idl_allids( be ) );
- } else {
- ID_BLOCK_NIDS(n) = ni;
- return( n );
- }
- }
-
- n = idl_dup( a );
-
- ni = 0;
- for ( ai = 0, bi = 0; ai < ID_BLOCK_NIDS(a); ai++ ) {
- for ( ;
- bi < ID_BLOCK_NIDS(b) && ID_BLOCK_ID(b, bi) < ID_BLOCK_ID(a, ai);
- bi++ )
- {
- ; /* NULL */
- }
-
- if ( bi == ID_BLOCK_NIDS(b) ) {
- break;
- }
-
- if ( ID_BLOCK_ID(b, bi) != ID_BLOCK_ID(a, ai) ) {
- ID_BLOCK_ID(n, ni++) = ID_BLOCK_ID(a, ai);
- }
- }
-
- for ( ; ai < ID_BLOCK_NIDS(a); ai++ ) {
- ID_BLOCK_ID(n, ni++) = ID_BLOCK_ID(a, ai);
- }
- ID_BLOCK_NIDS(n) = ni;
-
- return( n );
-}
-
-
-/* return the first ID in the block
- * if ALLIDS block
- * NIDS > 1 return 1
- * otherwise return NOID
- * otherwise return first ID
- *
- * cursor is set to 1
- */
-ID
-bdb2i_idl_firstid( ID_BLOCK *idl, ID *cursor )
-{
- *cursor = 1;
-
- if ( idl == NULL || ID_BLOCK_NIDS(idl) == 0 ) {
- return( NOID );
- }
-
- if ( ID_BLOCK_ALLIDS( idl ) ) {
- return( ID_BLOCK_NIDS(idl) > 1 ? 1 : NOID );
- }
-
- return( ID_BLOCK_ID(idl, 0) );
-}
-
-
-/* return next ID after id
- * if ALLIDS block, cursor is id
- * increment id
- * if id < NIDS return id
- * otherwise NOID.
- * otherwise cursor is index into block
- * if index < nids
- * return id at index then increment
- */
-ID
-bdb2i_idl_nextid( ID_BLOCK *idl, ID *cursor )
-{
- if ( ID_BLOCK_ALLIDS( idl ) ) {
- if( ++(*cursor) < ID_BLOCK_NIDS(idl) ) {
- return *cursor;
- } else {
- return NOID;
- }
- }
-
- if ( *cursor < ID_BLOCK_NIDS(idl) ) {
- return ID_BLOCK_ID(idl, (*cursor)++);
- }
- return NOID;
-}
+++ /dev/null
-/* index.c - routines for dealing with attribute indexes */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/string.h>
-#include <ac/socket.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-
-static int add_value(BackendDB *be, struct dbcache *db, char *type, int indextype, char *val, ID id);
-static int index2prefix(int indextype);
-
-int
-bdb2i_index_add_entry(
- BackendDB *be,
- Entry *e
-)
-{
- Attribute *ap;
- struct berval bv;
- struct berval *bvals[2];
-
- Debug( LDAP_DEBUG_TRACE, "=> index_add( %ld, \"%s\" )\n", e->e_id,
- e->e_dn, 0 );
-
- /*
- * dn index entry - make it look like an attribute so it works
- * with bdb2i_index_add_values() call
- */
-
- bv.bv_val = ch_strdup( e->e_ndn );
- bv.bv_len = strlen( bv.bv_val );
- bvals[0] = &bv;
- bvals[1] = NULL;
-
- /* add the dn to the indexes */
- {
- char *dn = ch_strdup( "dn" );
- bdb2i_index_add_values( be, dn, bvals, e->e_id );
- free( dn );
- }
-
- free( bv.bv_val );
-
- /* add each attribute to the indexes */
- for ( ap = e->e_attrs; ap != NULL; ap = ap->a_next ) {
- bdb2i_index_add_values( be, ap->a_type, ap->a_vals, e->e_id );
- }
-
- Debug( LDAP_DEBUG_TRACE, "<= index_add( %ld, \"%s\" ) 0\n", e->e_id,
- e->e_ndn, 0 );
- return( 0 );
-}
-
-int
-bdb2i_index_add_mods(
- BackendDB *be,
- LDAPModList *ml,
- ID id
-)
-{
- int rc;
-
- for ( ; ml != NULL; ml = ml->ml_next ) {
- LDAPMod *mod = &ml->ml_mod;
-
- switch ( mod->mod_op & ~LDAP_MOD_BVALUES ) {
- case LDAP_MOD_ADD:
- case LDAP_MOD_REPLACE:
- rc = bdb2i_index_add_values( be, mod->mod_type,
- mod->mod_bvalues, id );
- break;
- case LDAP_MOD_SOFTADD:
- case LDAP_MOD_DELETE:
- rc = 0;
- break;
- }
-
- if ( rc != 0 ) {
- return( rc );
- }
- }
-
- return( 0 );
-}
-
-ID_BLOCK *
-bdb2i_index_read(
- BackendDB *be,
- char *type,
- int indextype,
- char *val
-)
-{
- struct dbcache *db;
- Datum key;
- ID_BLOCK *idl;
- int indexmask, syntax;
- char prefix;
- char *realval, *tmpval;
- char buf[BUFSIZ];
-
- char *at_cn;
-
- ldbm_datum_init( key );
-
- prefix = index2prefix( indextype );
- Debug( LDAP_DEBUG_TRACE, "=> bdb2i_index_read( \"%c%s\" -> \"%s\" )\n",
- prefix, type, val );
-
- bdb2i_attr_masks( be->be_private, type, &indexmask, &syntax );
- if ( ! (indextype & indexmask) ) {
- idl = bdb2i_idl_allids( be );
- Debug( LDAP_DEBUG_TRACE,
- "<= bdb2i_index_read %ld candidates (allids - not indexed)\n",
- idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
- return( idl );
- }
-
- attr_normalize( type );
- at_cn = at_canonical_name(type);
-
- if ( at_cn == NULL ) {
- Debug( LDAP_DEBUG_ANY,
- "<= bdb2i_index_read no canonical name for type \"%s\"\n",
- type != NULL ? type : "(NULL)", 0, 0 );
- return( NULL );
- }
-
- if ( (db = bdb2i_cache_open( be, at_cn, BDB2_SUFFIX, LDBM_WRCREAT ))
- == NULL ) {
- Debug( LDAP_DEBUG_ANY,
- "<= bdb2i_index_read NULL (could not open %s%s)\n", at_cn,
- BDB2_SUFFIX, 0 );
- return( NULL );
- }
-
- realval = val;
- tmpval = NULL;
- if ( prefix != UNKNOWN_PREFIX ) {
- unsigned int len = strlen( val );
-
- if ( (len + 2) < sizeof(buf) ) {
- realval = buf;
- } else {
- /* value + prefix + null */
- tmpval = (char *) ch_malloc( len + 2 );
- realval = tmpval;
- }
-
- realval[0] = prefix;
- strcpy( &realval[1], val );
- }
-
- key.dptr = realval;
- key.dsize = strlen( realval ) + 1;
-
- idl = bdb2i_idl_fetch( be, db, key );
- if ( tmpval != NULL ) {
- free( tmpval );
- }
-
- bdb2i_cache_close( be, db );
-
- Debug( LDAP_DEBUG_TRACE, "<= bdb2i_index_read %ld candidates\n",
- idl ? ID_BLOCK_NIDS(idl) : 0, 0, 0 );
- return( idl );
-}
-
-static int
-add_value(
- BackendDB *be,
- struct dbcache *db,
- char *type,
- int indextype,
- char *val,
- ID id
-)
-{
- int rc;
- Datum key;
- char *tmpval = NULL;
- char *realval = val;
- char buf[BUFSIZ];
-
- char prefix = index2prefix( indextype );
-
- ldbm_datum_init( key );
-
- Debug( LDAP_DEBUG_TRACE, "=> add_value( \"%c%s\" )\n", prefix, val, 0 );
-
- if ( prefix != UNKNOWN_PREFIX ) {
- unsigned int len = strlen( val );
-
- if ( (len + 2) < sizeof(buf) ) {
- realval = buf;
- } else {
- /* value + prefix + null */
- tmpval = (char *) ch_malloc( len + 2 );
- realval = tmpval;
- }
- realval[0] = prefix;
- strcpy( &realval[1], val );
- }
-
- key.dptr = realval;
- key.dsize = strlen( realval ) + 1;
-
- rc = bdb2i_idl_insert_key( be, db, key, id );
-
- if ( tmpval != NULL ) {
- free( tmpval );
- }
-
- ldap_pvt_thread_yield();
-
- /* Debug( LDAP_DEBUG_TRACE, "<= add_value %d\n", rc, 0, 0 ); */
- return( rc );
-}
-
-int
-bdb2i_index_add_values(
- BackendDB *be,
- char *type,
- struct berval **vals,
- ID id
-)
-{
- char *val, *p, *code, *w;
- unsigned i, j, len;
- int indexmask, syntax;
- char buf[SUBLEN + 1];
- char vbuf[BUFSIZ];
- char *bigbuf;
- struct dbcache *db;
-
- char *at_cn;
-
- if( vals == NULL ) {
- Debug( LDAP_DEBUG_TRACE,
- "=> bdb2i_index_add_values( \"%s\", NULL, %ld )\n",
- type, id, 0 );
- return 0;
- }
-
- Debug( LDAP_DEBUG_TRACE, "=> bdb2i_index_add_values( \"%s\", %ld )\n",
- type, id, 0 );
- attr_normalize( type );
- bdb2i_attr_masks( be->be_private, type, &indexmask, &syntax );
- if ( indexmask == 0 ) {
- return( 0 );
- }
-
- at_cn = at_canonical_name(type);
-
- if ( at_cn == NULL ) {
- Debug( LDAP_DEBUG_ANY,
- "<= bdb2i_index_add_values no canonical name for type \"%s\"\n",
- type != NULL ? type : "(NULL)", 0, 0 );
- return( -1 );
- }
-
- if ( (db = bdb2i_cache_open( be, at_cn, BDB2_SUFFIX, LDBM_WRCREAT ))
- == NULL ) {
- Debug( LDAP_DEBUG_ANY,
- "<= bdb2i_index_add_values -1 (could not open/create %s%s)\n",
- at_cn, BDB2_SUFFIX, 0 );
- return( -1 );
- }
-
- for ( i = 0; vals[i] != NULL; i++ ) {
- /*
- * presence index entry
- */
- if ( indexmask & INDEX_PRESENCE ) {
- add_value( be, db, at_cn, INDEX_PRESENCE, "*", id );
- }
-
- Debug( LDAP_DEBUG_TRACE, "*** bdb2i_index_add_values syntax 0x%x syntax bin 0x%x\n",
- syntax, SYNTAX_BIN, 0 );
- if ( syntax & SYNTAX_BIN ) {
- bdb2i_cache_close( be, db );
- return( 0 );
- }
-
- bigbuf = NULL;
- len = vals[i]->bv_len;
-
- /* value + null */
- if ( len + 2 > sizeof(vbuf) ) {
- bigbuf = (char *) ch_malloc( len + 1 );
- val = bigbuf;
- } else {
- val = vbuf;
- }
- (void) memcpy( val, vals[i]->bv_val, len );
- val[len] = '\0';
-
- value_normalize( val, syntax );
-
- /* value_normalize could change the length of val */
- len = strlen( val );
-
- /*
- * equality index entry
- */
- if ( indexmask & INDEX_EQUALITY ) {
- add_value( be, db, at_cn, INDEX_EQUALITY, val, id );
- }
-
- /*
- * approximate index entry
- */
- if ( indexmask & INDEX_APPROX ) {
- for ( w = first_word( val ); w != NULL;
- w = next_word( w ) ) {
- if ( (code = phonetic( w )) != NULL ) {
- add_value( be, db, at_cn, INDEX_APPROX,
- code, id );
- free( code );
- }
- }
- }
-
- /*
- * substrings index entry
- */
- if ( indexmask & INDEX_SUB ) {
- /* leading and trailing */
- if ( len > SUBLEN - 2 ) {
- buf[0] = '^';
- for ( j = 0; j < SUBLEN - 1; j++ ) {
- buf[j + 1] = val[j];
- }
- buf[SUBLEN] = '\0';
-
- add_value( be, db, at_cn, INDEX_SUB, buf, id );
-
- p = val + len - SUBLEN + 1;
- for ( j = 0; j < SUBLEN - 1; j++ ) {
- buf[j] = p[j];
- }
- buf[SUBLEN - 1] = '$';
- buf[SUBLEN] = '\0';
-
- add_value( be, db, at_cn, INDEX_SUB, buf, id );
- }
-
- /* any */
- for ( p = val; p < (val + len - SUBLEN + 1); p++ ) {
- for ( j = 0; j < SUBLEN; j++ ) {
- buf[j] = p[j];
- }
- buf[SUBLEN] = '\0';
-
- add_value( be, db, at_cn, INDEX_SUB, buf, id );
- }
- }
-
- if ( bigbuf != NULL ) {
- free( bigbuf );
- }
- }
- bdb2i_cache_close( be, db );
-
- return( 0 );
-}
-
-static int
-index2prefix( int indextype )
-{
- int prefix;
-
- switch ( indextype ) {
- case INDEX_EQUALITY:
- prefix = EQ_PREFIX;
- break;
- case INDEX_APPROX:
- prefix = APPROX_PREFIX;
- break;
- case INDEX_SUB:
- prefix = SUB_PREFIX;
- break;
- default:
- prefix = UNKNOWN_PREFIX;
- break;
- }
-
- return( prefix );
-}
+++ /dev/null
-/* init.c - initialize bdb2 backend */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/string.h>
-#include <ac/socket.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-
-#ifdef SLAPD_BDB2_DYNAMIC
-
-int back_bdb2_LTX_init_module(int argc, char *argv[]) {
- BackendInfo bi;
-
- memset( &bi, 0, sizeof(bi) );
- bi.bi_type = "bdb2";
- bi.bi_init = bdb2_back_initialize;
-
- backend_add(&bi);
- return 0;
-}
-
-#endif /* SLAPD_BDB2_DYNAMIC */
-
-static int
-bdb2i_back_init_private(
- BackendInfo *bi
-)
-{
- struct ldbtype *bt;
-
- /* allocate backend-type-specific stuff */
- bt = (struct ldbtype *) ch_calloc( 1, sizeof(struct ldbtype) );
-
- bt->lty_dbhome = DEFAULT_DB_HOME;
- bt->lty_mpsize = DEFAULT_DBCACHE_SIZE;
-
- if ( slapMode & SLAP_TIMED_MODE )
- bt->lty_betiming = 1;
-
- bi->bi_private = bt;
-
- return 0;
-}
-
-
-int
-bdb2_back_initialize(
- BackendInfo *bi
-)
-{
- int ret;
-
- static char *controls[] = {
- LDAP_CONTROL_MANAGEDSAIT,
- /* LDAP_CONTROL_X_CHANGE_PASSWD, */
- NULL
- };
-
- bi->bi_controls = controls;
-
- bi->bi_open = bdb2_back_open;
- bi->bi_config = bdb2_back_config;
- bi->bi_close = bdb2_back_close;
- bi->bi_destroy = bdb2_back_destroy;
-
- bi->bi_db_init = bdb2_back_db_init;
- bi->bi_db_config = bdb2_back_db_config;
- bi->bi_db_open = bdb2_back_db_open;
- bi->bi_db_close = bdb2_back_db_close;
- bi->bi_db_destroy = bdb2_back_db_destroy;
-
- bi->bi_op_bind = bdb2_back_bind;
- bi->bi_op_unbind = bdb2_back_unbind;
- bi->bi_op_search = bdb2_back_search;
- bi->bi_op_compare = bdb2_back_compare;
- bi->bi_op_modify = bdb2_back_modify;
- bi->bi_op_modrdn = bdb2_back_modrdn;
- bi->bi_op_add = bdb2_back_add;
- bi->bi_op_delete = bdb2_back_delete;
- bi->bi_op_abandon = bdb2_back_abandon;
-
- bi->bi_extended = 0;
-
- bi->bi_entry_release_rw = bdb2_back_entry_release_rw;
- bi->bi_acl_group = bdb2_back_group;
-
- /*
- * hooks for slap tools
- */
- bi->bi_tool_entry_open = bdb2_tool_entry_open;
- bi->bi_tool_entry_close = bdb2_tool_entry_close;
- bi->bi_tool_entry_first = bdb2_tool_entry_first;
- bi->bi_tool_entry_next = bdb2_tool_entry_next;
- bi->bi_tool_entry_get = bdb2_tool_entry_get;
- bi->bi_tool_entry_put = bdb2_tool_entry_put;
- bi->bi_tool_index_attr = bdb2_tool_index_attr;
- bi->bi_tool_index_change = bdb2_tool_index_change;
- bi->bi_tool_sync = bdb2_tool_sync;
-
-#ifdef HAVE_CYRUS_SASL
- bi->bi_sasl_authorize = 0;
- bi->bi_sasl_getsecret = 0;
- bi->bi_sasl_putsecret = 0;
-#endif /* HAVE_CYRUS_SASL */
-
- bi->bi_connection_init = 0;
- bi->bi_connection_destroy = 0;
-
- ret = bdb2i_back_init_private( bi );
-
- Debug( LDAP_DEBUG_TRACE, "bdb2_back_initialize: done (%d).\n", ret, 0, 0 );
-
- return( ret );
-}
-
-int
-bdb2_back_destroy(
- BackendInfo *bi
-)
-{
- return 0;
-}
-
-int
-bdb2_back_open(
- BackendInfo *bi
-)
-{
- static int initialized = 0;
- int rc;
-
- if ( initialized++ ) {
-
- Debug( LDAP_DEBUG_TRACE,
- "bdb2_back_open: backend already initialized.\n", 0, 0, 0 );
- return 0;
-
- }
-
- /* initialize the underlying database system */
- rc = bdb2i_back_startup( bi );
-
- return rc;
-}
-
-int
-bdb2_back_close(
- BackendInfo *bi
-)
-{
- int rc;
-
- /* close the underlying database system */
- rc = bdb2i_back_shutdown( bi );
-
- return rc;
-}
-
-/* BDB2 changed */
-static int
-bdb2i_back_db_init_internal(
- BackendDB *be
-)
-{
- struct ldbminfo *li;
- char *argv[ 4 ];
-
- /* allocate backend-database-specific stuff */
- li = (struct ldbminfo *) ch_calloc( 1, sizeof(struct ldbminfo) );
-
- /* arrange to read nextid later (on first request for it) */
- li->li_nextid = NOID;
-#if SLAPD_NEXTID_CHUNK > 1
- li->li_nextid_wrote = NOID;
-#endif
-
- /* default cache size */
- li->li_cache.c_maxsize = DEFAULT_CACHE_SIZE;
-
- /* default database cache size */
- li->li_dbcachesize = DEFAULT_DBCACHE_SIZE;
-
- /* default file creation mode */
- li->li_mode = DEFAULT_MODE;
-
- /* default database directory */
- li->li_directory = DEFAULT_DB_DIRECTORY;
-
- argv[ 0 ] = "objectclass";
- argv[ 1 ] = "eq";
- argv[ 2 ] = NULL;
- bdb2i_attr_index_config( li, "ldbm objectclass initialization",
- 0, 2, argv, 1 );
-
- /* initialize the cache mutex */
- ldap_pvt_thread_mutex_init( &li->li_cache.c_mutex );
-
- /* initialize the TP file head */
- if ( bdb2i_txn_head_init( &li->li_txn_head ) != 0 )
- return 1;
-
- be->be_private = li;
-
- return 0;
-}
-
-
-int
-bdb2_back_db_init(
- BackendDB *be
-)
-{
- struct timeval time1;
- int ret;
-
- bdb2i_start_timing( be->bd_info, &time1 );
-
- ret = bdb2i_back_db_init_internal( be );
- bdb2i_stop_timing( be->bd_info, time1, "DB-INIT", NULL, NULL );
-
- return( ret );
-}
-
-
-int
-bdb2_back_db_open(
- BackendDB *be
-)
-{
- int rc;
-
- rc = bdb2_back_db_startup( be );
-
- return( rc );
-}
-
-int
-bdb2_back_db_destroy(
- BackendDB *be
-)
-{
- /* should free/destroy every in be_private */
- free( be->be_private );
- be->be_private = NULL;
- return 0;
-}
-
-
+++ /dev/null
-/* modify.c - bdb2 backend modify routine */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/string.h>
-#include <ac/socket.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-#include "proto-back-bdb2.h"
-
-int
-bdb2i_back_modify_internal(
- BackendDB *be,
- Connection *conn,
- Operation *op,
- char *dn,
- LDAPModList *modlist,
- Entry *e
-)
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- LDAPModList *ml;
- int err;
-
- Debug(LDAP_DEBUG_ARGS, "bdb2i_back_modify:\n", 0, 0, 0);
-
- if ( !acl_check_modlist( be, conn, op, e, modlist )) {
- send_ldap_result( conn, op, LDAP_INSUFFICIENT_ACCESS,
- NULL, NULL, NULL, NULL );
- goto error_return;
- }
-
- for ( ml = modlist; ml != NULL; ml = ml->ml_next ) {
- LDAPMod *mod = &ml->ml_mod;
-
- switch ( mod->mod_op & ~LDAP_MOD_BVALUES ) {
- case LDAP_MOD_ADD:
- err = bdb2i_add_values( e, mod, op->o_ndn );
- break;
-
- case LDAP_MOD_DELETE:
- err = bdb2i_delete_values( e, mod, op->o_ndn );
- break;
-
- case LDAP_MOD_REPLACE:
- err = bdb2i_replace_values( e, mod, op->o_ndn );
- break;
-
- case LDAP_MOD_SOFTADD:
- /* Avoid problems in index_add_mods()
- * We need to add index if necessary.
- */
- mod->mod_op = LDAP_MOD_ADD;
- if ( (err = bdb2i_add_values( e, mod, op->o_ndn ))
- == LDAP_TYPE_OR_VALUE_EXISTS ) {
-
- err = LDAP_SUCCESS;
- mod->mod_op = LDAP_MOD_SOFTADD;
-
- }
- break;
- }
-
- if ( err != LDAP_SUCCESS ) {
- /* unlock entry, delete from cache */
- send_ldap_result( conn, op, err,
- NULL, NULL, NULL, NULL );
- goto error_return;
- }
- }
-
- /* check that the entry still obeys the schema */
- if ( schema_check_entry( e ) != 0 ) {
- Debug( LDAP_DEBUG_ANY, "entry failed schema check\n", 0, 0, 0 );
- send_ldap_result( conn, op, LDAP_OBJECT_CLASS_VIOLATION,
- NULL, NULL, NULL, NULL );
- goto error_return;
- }
-
- /* check for abandon */
- ldap_pvt_thread_mutex_lock( &op->o_abandonmutex );
- if ( op->o_abandon ) {
- ldap_pvt_thread_mutex_unlock( &op->o_abandonmutex );
- goto error_return;
- }
- ldap_pvt_thread_mutex_unlock( &op->o_abandonmutex );
-
- /* modify indexes */
- if ( bdb2i_index_add_mods( be, modlist, e->e_id ) != 0 ) {
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
- goto error_return;
- }
-
- /* check for abandon */
- ldap_pvt_thread_mutex_lock( &op->o_abandonmutex );
- if ( op->o_abandon ) {
- ldap_pvt_thread_mutex_unlock( &op->o_abandonmutex );
- goto error_return;
- }
- ldap_pvt_thread_mutex_unlock( &op->o_abandonmutex );
-
- /* change the entry itself */
- if ( bdb2i_id2entry_add( be, e ) != 0 ) {
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
- goto error_return;
- }
-
- send_ldap_result( conn, op, LDAP_SUCCESS,
- NULL, NULL, NULL, NULL );
- return( 0 );
-
-error_return:;
- return( -1 );
-}
-
-
-int
-bdb2_back_modify(
- BackendDB *be,
- Connection *conn,
- Operation *op,
- char *dn,
- char *ndn,
- LDAPModList *modlist
-)
-{
- DB_LOCK lock;
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- struct timeval time1;
- int ret, manageDSAit;
- Entry *matched;
- Entry *e;
-
- bdb2i_start_timing( be->bd_info, &time1 );
-
- if ( bdb2i_enter_backend_w( &lock ) != 0 ) {
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
- return( -1 );
- }
-
- /* check, if a new default attribute index will be created,
- in which case we have to open the index file BEFORE TP */
- switch ( slapMode & SLAP_MODE ) {
- case SLAP_SERVER_MODE:
- case SLAP_TOOL_MODE:
- bdb2i_check_default_attr_index_mod( li, modlist );
- break;
- }
-
- if ( (e = bdb2i_dn2entry_w( be, ndn, &matched )) == NULL ) {
- char *matched_dn = NULL;
- struct berval **refs = NULL;
-
- if ( matched != NULL ) {
- matched_dn = ch_strdup( matched->e_dn );
- refs = is_entry_referral( matched )
- ? get_entry_referrals( be, conn, op, matched )
- : NULL;
- bdb2i_cache_return_entry_r( &li->li_cache, matched );
- } else {
- refs = default_referral;
- }
-
- send_ldap_result( conn, op, LDAP_REFERRAL,
- matched_dn, NULL, refs, NULL );
-
- if( matched != NULL ) {
- ber_bvecfree( refs );
- free( matched_dn );
- }
-
- ret = -1;
- goto done;
- }
-
- if (!manageDSAit && is_entry_referral( e ) ) {
- /* entry is a referral, don't allow add */
- struct berval **refs = get_entry_referrals( be,
- conn, op, e );
-
- Debug( LDAP_DEBUG_TRACE, "entry is referral\n", 0,
- 0, 0 );
-
- send_ldap_result( conn, op, LDAP_REFERRAL,
- e->e_dn, NULL, refs, NULL );
-
- bdb2i_cache_return_entry_w( &li->li_cache, e );
-
- ber_bvecfree( refs );
-
- ret = -1;
- goto done;
- }
-
- ret = bdb2i_back_modify_internal( be, conn, op, ndn, modlist, e );
- bdb2i_cache_return_entry_w( &li->li_cache, e );
-
-done:
- (void) bdb2i_leave_backend_w( lock );
- bdb2i_stop_timing( be->bd_info, time1, "MOD", conn, op );
-
- return( ret );
-}
-
-
-int
-bdb2i_add_values(
- Entry *e,
- LDAPMod *mod,
- char *dn
-)
-{
- int i;
- Attribute *a;
-
- /* check if the values we're adding already exist */
- if ( (a = attr_find( e->e_attrs, mod->mod_type )) != NULL ) {
- for ( i = 0; mod->mod_bvalues[i] != NULL; i++ ) {
- if ( value_find( a->a_vals, mod->mod_bvalues[i],
- a->a_syntax, 3 ) == 0 ) {
- return( LDAP_TYPE_OR_VALUE_EXISTS );
- }
- }
- }
-
- /* no - add them */
- if( attr_merge( e, mod->mod_type, mod->mod_bvalues ) != 0 ) {
- return( LDAP_CONSTRAINT_VIOLATION );
- }
-
- return( LDAP_SUCCESS );
-}
-
-int
-bdb2i_delete_values(
- Entry *e,
- LDAPMod *mod,
- char *dn
-)
-{
- int i, j, k, found;
- Attribute *a;
-
- /* delete the entire attribute */
- if ( mod->mod_bvalues == NULL ) {
- Debug( LDAP_DEBUG_ARGS, "removing entire attribute %s\n",
- mod->mod_type, 0, 0 );
- return( attr_delete( &e->e_attrs, mod->mod_type ) ?
- LDAP_NO_SUCH_ATTRIBUTE : LDAP_SUCCESS );
- }
-
- /* delete specific values - find the attribute first */
- if ( (a = attr_find( e->e_attrs, mod->mod_type )) == NULL ) {
- Debug( LDAP_DEBUG_ARGS, "could not find attribute %s\n",
- mod->mod_type, 0, 0 );
- return( LDAP_NO_SUCH_ATTRIBUTE );
- }
-
- /* find each value to delete */
- for ( i = 0; mod->mod_bvalues[i] != NULL; i++ ) {
- found = 0;
- for ( j = 0; a->a_vals[j] != NULL; j++ ) {
- if ( value_cmp( mod->mod_bvalues[i], a->a_vals[j],
- a->a_syntax, 3 ) != 0 ) {
- continue;
- }
- found = 1;
-
- /* found a matching value - delete it */
- ber_bvfree( a->a_vals[j] );
- for ( k = j + 1; a->a_vals[k] != NULL; k++ ) {
- a->a_vals[k - 1] = a->a_vals[k];
- }
- a->a_vals[k - 1] = NULL;
-
- /* delete the entire attribute, if no values remain */
- if ( a->a_vals[0] == NULL) {
- Debug( LDAP_DEBUG_ARGS,
- "removing entire attribute %s\n",
- mod->mod_type, 0, 0 );
- if ( attr_delete( &e->e_attrs, mod->mod_type ) ) {
- return LDAP_NO_SUCH_ATTRIBUTE;
- }
- }
-
- break;
- }
-
- /* looked through them all w/o finding it */
- if ( ! found ) {
- Debug( LDAP_DEBUG_ARGS,
- "could not find value for attr %s\n",
- mod->mod_type, 0, 0 );
- return( LDAP_NO_SUCH_ATTRIBUTE );
- }
- }
-
- return( LDAP_SUCCESS );
-}
-
-int
-bdb2i_replace_values(
- Entry *e,
- LDAPMod *mod,
- char *dn
-)
-{
- (void) attr_delete( &e->e_attrs, mod->mod_type );
-
- if ( mod->mod_bvalues != NULL &&
- attr_merge( e, mod->mod_type, mod->mod_bvalues ) != 0 )
- {
- return( LDAP_CONSTRAINT_VIOLATION );
- }
-
- return( LDAP_SUCCESS );
-}
+++ /dev/null
-/* modrdn.c - bdb2 backend modrdn routine */
-/* $OpenLDAP$ */
-
-/*
- * LDAP v3 newSuperior support.
- *
- * Copyright 1999, Juan C. Gomez, All rights reserved.
- * This software is not subject to any license of Silicon Graphics
- * Inc. or Purdue University.
- *
- * Redistribution and use in source and binary forms are permitted
- * without restriction or fee of any kind as long as this notice
- * is preserved.
- *
- */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/string.h>
-#include <ac/socket.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-#include "proto-back-bdb2.h"
-
-static int
-bdb2i_back_modrdn_internal(
- BackendDB *be,
- Connection *conn,
- Operation *op,
- char *dn,
- char *newrdn,
- int deleteoldrdn,
- char *newSuperior
-)
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- Entry *matched = NULL;
- char *p_dn = NULL, *p_ndn = NULL;
- char *new_dn = NULL, *new_ndn = NULL;
- char sep[2];
- Entry *e, *p = NULL;
- int rc = -1, manageDSAit;
- /* Added to support LDAP v2 correctly (deleteoldrdn thing) */
- char *new_rdn_val = NULL; /* Val of new rdn */
- char *new_rdn_type = NULL; /* Type of new rdn */
- char *old_rdn = NULL; /* Old rdn's attr type & val */
- char *old_rdn_type = NULL; /* Type of old rdn attr. */
- char *old_rdn_val = NULL; /* Old rdn attribute value */
- struct berval add_bv; /* Stores new rdn att */
- struct berval *add_bvals[2]; /* Stores new rdn att */
- struct berval del_bv; /* Stores old rdn att */
- struct berval *del_bvals[2]; /* Stores old rdn att */
- LDAPModList mod[2]; /* Used to delete old rdn */
- /* Added to support newSuperior */
- Entry *np = NULL; /* newSuperior Entry */
- char *np_dn = NULL; /* newSuperior dn */
- char *np_ndn = NULL; /* newSuperior ndn */
- char *new_parent_dn = NULL; /* np_dn, p_dn, or NULL */
-
- Debug( LDAP_DEBUG_TRACE, "==>ldbm_back_modrdn(newSuperior=%s)\n",
- (newSuperior ? newSuperior : "NULL"),
- 0, 0 );
-
- /* get entry with writer lock */
- if ( (e = bdb2i_dn2entry_w( be, dn, &matched )) == NULL ) {
- char *matched_dn = NULL;
- struct berval **refs = NULL;
-
- if ( matched != NULL ) {
- matched_dn = ch_strdup( matched->e_dn );
- refs = is_entry_referral( matched )
- ? get_entry_referrals( be, conn, op, matched )
- : NULL;
- bdb2i_cache_return_entry_r( &li->li_cache, matched );
- } else {
- refs = default_referral;
- }
-
- send_ldap_result( conn, op, LDAP_REFERRAL,
- matched_dn, NULL, refs, NULL );
-
- if( matched != NULL ) {
- ber_bvecfree( refs );
- free( matched_dn );
- }
-
- return( -1 );
- }
-
- if (!manageDSAit && is_entry_referral( e ) ) {
- /* entry is a referral, don't allow add */
- struct berval **refs = get_entry_referrals( be,
- conn, op, e );
-
- Debug( LDAP_DEBUG_TRACE, "entry is referral\n", 0,
- 0, 0 );
-
- send_ldap_result( conn, op, LDAP_REFERRAL,
- e->e_dn, NULL, refs, NULL );
-
- ber_bvecfree( refs );
-
- goto return_results;
- }
-
-#ifdef SLAPD_CHILD_MODIFICATION_WITH_ENTRY_ACL
- /* check parent for "children" acl */
- if ( ! access_allowed( be, conn, op, e,
- "entry", NULL, ACL_WRITE ) )
- {
- Debug( LDAP_DEBUG_TRACE, "no access to entry\n", 0,
- 0, 0 );
- send_ldap_result( conn, op, LDAP_INSUFFICIENT_ACCESS,
- NULL, NULL, NULL, NULL );
- goto return_results;
- }
-#endif
-
- if ( (p_ndn = dn_parent( be, e->e_ndn )) != NULL ) {
- /* parent + rdn + separator(s) + null */
- if( (p = bdb2i_dn2entry_w( be, p_ndn, &matched )) == NULL) {
- Debug( LDAP_DEBUG_TRACE, "parent does not exist\n",
- 0, 0, 0);
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
- goto return_results;
- }
-
- /* check parent for "children" acl */
- if ( ! access_allowed( be, conn, op, p,
- "children", NULL, ACL_WRITE ) )
- {
- Debug( LDAP_DEBUG_TRACE, "no access to parent\n", 0,
- 0, 0 );
- send_ldap_result( conn, op, LDAP_INSUFFICIENT_ACCESS,
- NULL, NULL, NULL, NULL );
- goto return_results;
- }
-
- p_dn = dn_parent( be, e->e_dn );
-
- Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: parent dn=%s\n",
- p_dn, 0, 0 );
-
-
- } else {
- /* no parent, modrdn entry directly under root */
- if( ! be_isroot( be, op->o_ndn ) ) {
- Debug( LDAP_DEBUG_TRACE, "no parent & not root\n",
- 0, 0, 0);
- send_ldap_result( conn, op, LDAP_INSUFFICIENT_ACCESS,
- NULL, NULL, NULL, NULL );
- goto return_results;
- }
-
- Debug( LDAP_DEBUG_TRACE,
- "ldbm_back_modrdn: no parent!, working on root\n",
- 0, 0, 0 );
-
- }
-
- new_parent_dn = p_dn; /* New Parent unless newSuperior given */
-
- if ( (np_dn = newSuperior) != NULL) {
-
-
- Debug( LDAP_DEBUG_TRACE,
- "ldbm_back_modrdn: new parent requested...\n",
- 0, 0, 0 );
-
- np_ndn = ch_strdup( np_dn );
- (void) dn_normalize( np_ndn );
-
- /* newSuperior == oldParent?, if so ==> ERROR */
-
- /* newSuperior == entry being moved?, if so ==> ERROR */
-
- /* Get Entry with dn=newSuperior. Does newSuperior exist? */
-
- if( (np = bdb2i_dn2entry_w( be, np_ndn, &matched )) == NULL) {
-
- Debug( LDAP_DEBUG_TRACE,
- "ldbm_back_modrdn: newSup(ndn=%s) not here!\n",
- np_ndn, 0, 0);
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
- goto return_results;
- }
-
- Debug( LDAP_DEBUG_TRACE,
- "ldbm_back_modrdn: wr to new parent OK np=%p, id=%d\n",
- np, np->e_id, 0 );
-
- /* check newSuperior for "children" acl */
- if ( !access_allowed( be, conn, op, np, "children", NULL,
- ACL_WRITE ) )
- {
- Debug( LDAP_DEBUG_TRACE,
- "ldbm_back_modrdn: no wr to newSup children\n",
- 0, 0, 0 );
- send_ldap_result( conn, op, LDAP_INSUFFICIENT_ACCESS,
- NULL, NULL, NULL, NULL );
- goto return_results;
- }
-
- Debug( LDAP_DEBUG_TRACE,
- "ldbm_back_modrdn: wr to new parent's children OK\n",
- 0, 0 , 0 );
-
-
- new_parent_dn = np_dn;
-
- }
-
- /* Build target dn and make sure target entry doesn't exist already. */
-
- build_new_dn( &new_dn, e->e_dn, new_parent_dn, newrdn );
-
-
- new_ndn = ch_strdup( new_dn );
- (void) dn_normalize( new_ndn );
-
- Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: new ndn=%s\n",
- new_ndn, 0, 0 );
-
- /* check for abandon */
- ldap_pvt_thread_mutex_lock( &op->o_abandonmutex );
- if ( op->o_abandon ) {
- ldap_pvt_thread_mutex_unlock( &op->o_abandonmutex );
- goto return_results;
- }
- ldap_pvt_thread_mutex_unlock( &op->o_abandonmutex );
-
- if ( (bdb2i_dn2id ( be, new_ndn ) ) != NOID ) {
- send_ldap_result( conn, op, LDAP_ALREADY_EXISTS,
- NULL, NULL, NULL, NULL );
- goto return_results;
- }
-
- /* Get attribute type and attribute value of our new rdn, we will
- * need to add that to our new entry
- */
-
- if ( (new_rdn_type = rdn_attr_type( newrdn )) == NULL ) {
-
- Debug( LDAP_DEBUG_TRACE,
- "ldbm_back_modrdn: can't figure out type of newrdn\n",
- 0, 0, 0 );
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
- goto return_results;
-
- }
-
- if ( (new_rdn_val = rdn_attr_value( newrdn )) == NULL ) {
-
- Debug( LDAP_DEBUG_TRACE,
- "ldbm_back_modrdn: can't figure out val of newrdn\n",
- 0, 0, 0 );
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
- goto return_results;
-
- }
-
- Debug( LDAP_DEBUG_TRACE,
- "ldbm_back_modrdn: new_rdn_val=%s, new_rdn_type=%s\n",
- new_rdn_val, new_rdn_type, 0 );
-
- /* Retrieve the old rdn from the entry's dn */
-
- if ( (old_rdn = dn_rdn( be, dn )) == NULL ) {
-
- Debug( LDAP_DEBUG_TRACE,
- "ldbm_back_modrdn: can't figure out old_rdn from dn\n",
- 0, 0, 0 );
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
- goto return_results;
-
- }
-
- if ( (old_rdn_type = rdn_attr_type( old_rdn )) == NULL ) {
-
- Debug( LDAP_DEBUG_TRACE,
- "ldbm_back_modrdn: can't figure out the old_rdn type\n",
- 0, 0, 0 );
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
- goto return_results;
-
- }
-
- if ( strcasecmp( old_rdn_type, new_rdn_type ) != 0 ) {
-
- /* Not a big deal but we may say something */
- Debug( LDAP_DEBUG_TRACE,
- "ldbm_back_modrdn: old_rdn_type=%s, new_rdn_type=%s!\n",
- old_rdn_type, new_rdn_type, 0 );
-
- }
-
- Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: DN_X500\n",
- 0, 0, 0 );
-
- /* Add new attribute value to the entry.
- */
-
- add_bvals[0] = &add_bv; /* Array of bervals */
- add_bvals[1] = NULL;
-
- add_bv.bv_val = new_rdn_val;
- add_bv.bv_len = strlen(new_rdn_val);
-
- mod[0].ml_type = new_rdn_type;
- mod[0].ml_bvalues = add_bvals;
- mod[0].ml_op = LDAP_MOD_SOFTADD;
- mod[0].ml_next = NULL;
-
- Debug( LDAP_DEBUG_TRACE,
- "ldbm_back_modrdn: adding new rdn attr val =%s\n",
- new_rdn_val, 0, 0 );
-
- /* Remove old rdn value if required */
-
- if (deleteoldrdn) {
-
- del_bvals[0] = &del_bv; /* Array of bervals */
- del_bvals[1] = NULL;
- /* Get value of old rdn */
-
- if ((old_rdn_val = rdn_attr_value( old_rdn ))
- == NULL) {
-
- Debug( LDAP_DEBUG_TRACE,
- "ldbm_back_modrdn: can't figure out old_rdn_val from old_rdn\n",
- 0, 0, 0 );
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
- goto return_results;
-
-
- }
-
- /* Remove old value of rdn as an attribute. */
-
- del_bv.bv_val = old_rdn_val;
- del_bv.bv_len = strlen(old_rdn_val);
-
- mod[0].ml_next = &mod[1];
- mod[1].ml_type = old_rdn_type;
- mod[1].ml_bvalues = del_bvals;
- mod[1].ml_op = LDAP_MOD_DELETE;
- mod[1].ml_next = NULL;
-
-
- Debug( LDAP_DEBUG_TRACE,
- "ldbm_back_modrdn: removing old_rdn_val=%s\n",
- old_rdn_val, 0, 0 );
-
- }/* if (deleteoldrdn) */
-
- /* check for abandon */
- ldap_pvt_thread_mutex_lock( &op->o_abandonmutex );
- if ( op->o_abandon ) {
- ldap_pvt_thread_mutex_unlock( &op->o_abandonmutex );
- goto return_results;
- }
- ldap_pvt_thread_mutex_unlock( &op->o_abandonmutex );
-
- /* delete old one */
- if ( bdb2i_dn2id_delete( be, e->e_ndn, e->e_id ) != 0 ) {
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
- goto return_results;
- }
-
- (void) bdb2i_cache_delete_entry( &li->li_cache, e );
-
- free( e->e_dn );
- free( e->e_ndn );
- e->e_dn = new_dn;
- e->e_ndn = new_ndn;
- new_dn = NULL;
- new_ndn = NULL;
-
- /* add new one */
- if ( bdb2i_dn2id_add( be, e->e_ndn, e->e_id ) != 0 ) {
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
- goto return_results;
- }
-
- /* modify memory copy of entry */
- if ( bdb2i_back_modify_internal( be, conn, op, dn, &mod[0], e )
- != 0 ) {
-
- goto return_results;
-
- }
-
- (void) bdb2i_cache_update_entry( &li->li_cache, e );
-
- /* NOTE: after this you must not free new_dn or new_ndn!
- * They are used by cache.
- */
-
- /* id2entry index */
- if ( bdb2i_id2entry_add( be, e ) != 0 ) {
- entry_free( e );
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
- goto return_results;
- }
-
- send_ldap_result( conn, op, LDAP_SUCCESS,
- NULL, NULL, NULL, NULL );
- rc = 0;
-
-return_results:
- if( new_dn != NULL ) free( new_dn );
- if( new_ndn != NULL ) free( new_ndn );
-
- /* NOTE:
- * new_dn and new_ndn are not deallocated because they are used by
- * the cache entry.
- */
- if( p_dn != NULL ) free( p_dn );
- if( p_ndn != NULL ) free( p_ndn );
-
- /* LDAP v2 supporting correct attribute handling. */
- if( new_rdn_type != NULL ) free(new_rdn_type);
- if( new_rdn_val != NULL ) free(new_rdn_val);
- if( old_rdn != NULL ) free(old_rdn);
- if( old_rdn_type != NULL ) free(old_rdn_type);
- if( old_rdn_val != NULL ) free(old_rdn_val);
-
- /* LDAP v3 Support */
- if ( np_dn != NULL ) free( np_dn );
- if ( np_ndn != NULL ) free( np_ndn );
-
- if( p != NULL ) {
- /* free parent and writer lock */
- bdb2i_cache_return_entry_w( &li->li_cache, p );
-
- }
-
- /* free entry and writer lock */
- bdb2i_cache_return_entry_w( &li->li_cache, e );
- return( rc );
-}
-
-
-int
-bdb2_back_modrdn(
- BackendDB *be,
- Connection *conn,
- Operation *op,
- char *dn,
- char *ndn,
- char *newrdn,
- int deleteoldrdn,
- char *newSuperior
-)
-{
- DB_LOCK lock;
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- struct timeval time1;
- int ret;
-
- bdb2i_start_timing( be->bd_info, &time1 );
-
- if ( bdb2i_enter_backend_w( &lock ) != 0 ) {
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
- return( -1 );
-
- }
-
- ret = bdb2i_back_modrdn_internal( be, conn, op, ndn,
- newrdn, deleteoldrdn,
- newSuperior );
-
- (void) bdb2i_leave_backend_w( lock );
- bdb2i_stop_timing( be->bd_info, time1, "MODRDN", conn, op );
-
- return( ret );
-}
-
-
+++ /dev/null
-/* id.c - keep track of the next id to be given out */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/socket.h>
-
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-
-#include "slap.h"
-#include "back-bdb2.h"
-
-/* reading and writing NEXTID is handled in txn.c */
-#define next_id_read(be) bdb2i_get_nextid( (be) )
-#define next_id_write(be,id) bdb2i_put_nextid( (be), (id) )
-
-
-int
-bdb2i_next_id_save( BackendDB *be )
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- ID id = bdb2i_next_id_get( be );
- int rc;
-
- rc = next_id_write( be, id );
-
- return rc;
-}
-
-ID
-bdb2i_next_id( BackendDB *be )
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- ID id;
-
- /* first time in here since startup - try to read the nexid */
- if ( li->li_nextid == NOID ) {
- li->li_nextid = next_id_read( be );
-
- if ( li->li_nextid == NOID ) {
- li->li_nextid = 1;
- }
- }
-
- id = li->li_nextid++;
-
- (void) next_id_write( be, li->li_nextid );
-
- return( id );
-}
-
-ID
-bdb2i_next_id_get( BackendDB *be )
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- ID id;
-
- /* first time in here since startup - try to read the nexid */
- if ( li->li_nextid == NOID ) {
- li->li_nextid = next_id_read( be );
-
- if ( li->li_nextid == NOID ) {
- li->li_nextid = 1;
- }
- }
-
- id = li->li_nextid;
-
- return( id );
-}
+++ /dev/null
-/* porter.c - port functions of the bdb2 backend */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-#include <ac/errno.h>
-
-#include <ac/string.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-
-#define PORTER_OBJ "bdb2_backend"
-
-
-int
-bdb2i_enter_backend_rw( DB_LOCK *lock, int writer )
-{
- u_int32_t locker;
- db_lockmode_t lock_type;
- DBT lock_dbt;
- int ret = 0;
-
- switch ( slapMode & SLAP_MODE ) {
-
- case SLAP_SERVER_MODE:
- case SLAP_TOOL_MODE:
- if ( ( ret = lock_id( bdb2i_dbEnv.lk_info, &locker )) != 0 ) {
-
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_enter_backend(): unable to get locker id -- %s\n",
- strerror( ret ), 0, 0 );
- return( ret );
-
- }
-
- lock_type = writer ? DB_LOCK_WRITE : DB_LOCK_READ;
- lock_dbt.data = PORTER_OBJ;
- lock_dbt.size = strlen( PORTER_OBJ );
-
- switch ( ( ret = lock_get( bdb2i_dbEnv.lk_info, locker, 0,
- &lock_dbt, lock_type, lock ))) {
-
- case 0:
- Debug( LDAP_DEBUG_TRACE,
- "bdb2i_enter_backend() -- %s lock granted\n",
- writer ? "write" : "read", 0, 0 );
- break;
-
- case DB_LOCK_NOTGRANTED:
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_enter_backend() -- %s lock NOT granted\n",
- writer ? "write" : "read", 0, 0 );
- break;
-
- case DB_LOCK_DEADLOCK:
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_enter_backend() -- %s lock returned DEADLOCK\n",
- writer ? "write" : "read", 0, 0 );
- break;
-
- default:
- ret = errno;
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_enter_backend() -- %s lock returned ERROR: %s\n",
- writer ? "write" : "read", strerror( ret ), 0 );
- break;
-
- }
- break;
- }
-
- /* if we are a writer and we have the backend lock,
- start transaction control */
- if ( writer && ( ret == 0 )) {
-
- ret = bdb2i_start_transction( bdb2i_dbEnv.tx_info );
-
- }
-
- return( ret );
-}
-
-
-int
-bdb2i_leave_backend_rw( DB_LOCK lock, int writer )
-{
- /* since one or more error can occure,
- we must have several return codes that are or'ed at the end */
- int ret_transaction = 0;
- int ret_lock = 0;
-
- /* if we are a writer, finish the transaction */
- if ( writer ) {
-
- ret_transaction = bdb2i_finish_transaction();
-
- }
-
- /* check whether checkpointing is needed */
- ret_transaction |= bdb2i_set_txn_checkpoint( bdb2i_dbEnv.tx_info, 0 );
-
- /* now release the lock */
- switch ( slapMode & SLAP_MODE ) {
-
- case SLAP_SERVER_MODE:
- case SLAP_TOOL_MODE:
- switch( ( ret_lock = lock_put( bdb2i_dbEnv.lk_info, lock ))) {
-
- case 0:
- Debug( LDAP_DEBUG_TRACE,
- "bdb2i_leave_backend() -- %s lock released\n",
- writer ? "write" : "read", 0, 0 );
- break;
-
- case DB_LOCK_NOTHELD:
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_leave_backend() -- %s lock NOT held\n",
- writer ? "write" : "read", 0, 0 );
- break;
-
- case DB_LOCK_DEADLOCK:
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_leave_backend() -- %s lock returned DEADLOCK\n",
- writer ? "write" : "read", 0, 0 );
- break;
-
- default:
- ret_lock = errno;
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_leave_backend() -- %s lock returned ERROR: %s\n",
- writer ? "write" : "read", strerror( ret_lock ), 0 );
- break;
-
- }
- break;
- }
-
- return( ret_transaction | ret_lock );
-}
-
-
+++ /dev/null
-/* $OpenLDAP$ */
-#ifndef _PROTO_BACK_BDB2
-#define _PROTO_BACK_BDB2
-
-#include <ldap_cdefs.h>
-
-#include <ac/time.h> /* Needed in add.c compare.c struct timeval */
-
-#include "external.h"
-
-LDAP_BEGIN_DECL
-
-/*
- * add.c
- */
-int bdb2i_release_add_lock LDAP_P(());
-
-/*
- * alias.c
- */
-
-Entry * bdb2i_deref_r LDAP_P((
- Backend *be,
- Entry *e,
- char *dn,
- int *err,
- Entry **matched,
- char **text ));
-
-#define deref_entry_r( be, e, err, matched, text ) \
- bdb2i_deref_r( be, e, NULL, err, matched, text )
-#define deref_dn_r( be, dn, err, matched, text ) \
- bdb2i_deref_r( be, NULL, dn, err, matched, text )
-
-/*
- * attr.c
- */
-
-void bdb2i_attr_masks LDAP_P(( struct ldbminfo *li, char *type, int *indexmask,
- int *syntaxmask ));
-void bdb2i_attr_index_config LDAP_P(( struct ldbminfo *li,
- const char *fname,
- int lineno, int argc, char **argv, int init ));
-
-/*
- * cache.c
- */
-
-int bdb2i_cache_add_entry_rw LDAP_P(( struct cache *cache, Entry *e, int rw ));
-int bdb2i_cache_update_entry LDAP_P(( struct cache *cache, Entry *e ));
-void bdb2i_cache_return_entry_rw LDAP_P(( struct cache *cache, Entry *e,
- int rw ));
-#define bdb2i_cache_return_entry_r(c, e) bdb2i_cache_return_entry_rw((c), (e), 0)
-#define bdb2i_cache_return_entry_w(c, e) bdb2i_cache_return_entry_rw((c), (e), 1)
-
-ID bdb2i_cache_find_entry_dn2id LDAP_P(( BackendDB *be, struct cache *cache,
- const char *dn ));
-Entry * bdb2i_cache_find_entry_id LDAP_P(( struct cache *cache, ID id, int rw ));
-int bdb2i_cache_delete_entry LDAP_P(( struct cache *cache, Entry *e ));
-
-/*
- * dbcache.c
- */
-
-struct dbcache * bdb2i_cache_open LDAP_P(( BackendDB *be, char *name, char *suffix,
- int flags ));
-void bdb2i_cache_close LDAP_P(( BackendDB *be, struct dbcache *db ));
-void bdb2i_cache_really_close LDAP_P(( BackendDB *be, struct dbcache *db ));
-void bdb2i_cache_flush_all LDAP_P(( BackendDB *be ));
-Datum bdb2i_cache_fetch LDAP_P(( struct dbcache *db, Datum key ));
-int bdb2i_cache_store LDAP_P(( struct dbcache *db, Datum key, Datum data, int flags ));
-int bdb2i_cache_delete LDAP_P(( struct dbcache *db, Datum key ));
-
-/*
- * dn2id.c
- */
-
-int bdb2i_dn2id_add LDAP_P(( BackendDB *be, const char *dn, ID id ));
-ID bdb2i_dn2id LDAP_P(( BackendDB *be, const char *dn ));
-int bdb2i_dn2id_delete LDAP_P(( BackendDB *be, const char *dn, ID id ));
-
-ID_BLOCK *
-bdb2i_dn2idl LDAP_P((
- BackendDB *be,
- const char *dn,
- int prefix ));
-
-Entry * bdb2i_dn2entry_rw LDAP_P((
- BackendDB *be,
- const char *dn,
- Entry **matched,
- int rw ));
-
-#define bdb2i_dn2entry_r(be, dn, m) bdb2i_dn2entry_rw((be), (dn), (m), 0)
-#define bdb2i_dn2entry_w(be, dn, m) bdb2i_dn2entry_rw((be), (dn), (m), 1)
-
-/*
- * entry.c
- */
-int bdb2_back_entry_release_rw LDAP_P(( BackendDB *be, Entry *e, int rw ));
-
-/*
- * filterindex.c
- */
-
-ID_BLOCK * bdb2i_filter_candidates LDAP_P(( BackendDB *be, Filter *f ));
-
-/*
- * id2children.c
- */
-
-int bdb2i_has_children LDAP_P(( BackendDB *be, Entry *p ));
-
-/*
- * id2entry.c
- */
-
-int bdb2i_id2entry_add LDAP_P(( BackendDB *be, Entry *e ));
-int bdb2i_id2entry_delete LDAP_P(( BackendDB *be, Entry *e ));
-
-Entry * bdb2i_id2entry_rw LDAP_P(( BackendDB *be, ID id, int rw ));
-#define bdb2i_id2entry_r(be, id) bdb2i_id2entry_rw((be), (id), 0)
-#define bdb2i_id2entry_w(be, id) bdb2i_id2entry_rw((be), (id), 1)
-
-/*
- * idl.c
- */
-
-ID_BLOCK * bdb2i_idl_alloc LDAP_P(( unsigned int nids ));
-ID_BLOCK * bdb2i_idl_allids LDAP_P(( BackendDB *be ));
-void bdb2i_idl_free LDAP_P(( ID_BLOCK *idl ));
-ID_BLOCK * bdb2i_idl_fetch LDAP_P(( BackendDB *be, struct dbcache *db, Datum key ));
-int bdb2i_idl_insert_key LDAP_P(( BackendDB *be, struct dbcache *db, Datum key, ID id ));
-int bdb2i_idl_insert LDAP_P(( ID_BLOCK **idl, ID id, unsigned int maxids ));
-int bdb2i_idl_delete_key LDAP_P(( BackendDB *be, struct dbcache *db, Datum key, ID id ));
-ID_BLOCK * bdb2i_idl_intersection LDAP_P(( BackendDB *be, ID_BLOCK *a, ID_BLOCK *b ));
-ID_BLOCK * bdb2i_idl_union LDAP_P(( BackendDB *be, ID_BLOCK *a, ID_BLOCK *b ));
-ID_BLOCK * bdb2i_idl_notin LDAP_P(( BackendDB *be, ID_BLOCK *a, ID_BLOCK *b ));
-ID bdb2i_idl_firstid LDAP_P(( ID_BLOCK *idl, ID *cursor ));
-ID bdb2i_idl_nextid LDAP_P(( ID_BLOCK *idl, ID *cursor ));
-
-/*
- * index.c
- */
-
-int bdb2i_index_add_entry LDAP_P(( BackendDB *be, Entry *e ));
-int bdb2i_index_add_mods LDAP_P(( BackendDB *be, Modifications *ml, ID id ));
-ID_BLOCK * bdb2i_index_read LDAP_P(( BackendDB *be, char *type, int indextype, char *val ));
-int bdb2i_index_add_values LDAP_P(( BackendDB *be, char *type, struct berval **vals, ID id ));
-
-/*
- * kerberos.c
- */
-
-#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
-/* bdb2i_krbv4_ldap_auth LDAP_P(( BackendDB *be, struct berval *cred, AUTH_DAT *ad )); */
-#endif
-
-/*
- * modify.c
- * These prototypes are placed here because they are used by modify and
- * modify rdn which are implemented in different files.
- *
- * We need bdb2i_back_modify_internal here because of LDAP modrdn & modify use
- * it. If we do not add this, there would be a bunch of code replication
- * here and there and of course the likelihood of bugs increases.
- * Juan C. Gomez (gomez@engr.sgi.com) 05/18/99
- *
- */
-
-int bdb2i_add_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
-int bdb2i_delete_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
-int bdb2i_replace_values LDAP_P(( Entry *e, LDAPMod *mod, char *dn ));
-int bdb2i_back_modify_internal LDAP_P((Backend *be, Connection *conn, Operation *op,
- char *dn, Modifications *mods, Entry *e));
-/*
- * nextid.c
- */
-
-ID bdb2i_next_id LDAP_P(( BackendDB *be ));
-void bdb2i_next_id_return LDAP_P(( BackendDB *be, ID id ));
-ID bdb2i_next_id_get LDAP_P(( BackendDB *be ));
-int bdb2i_next_id_save LDAP_P(( BackendDB *be ));
-
-/*
- * startup.c
- */
-
-int bdb2i_back_startup LDAP_P(( BackendInfo *bi ));
-int bdb2i_back_shutdown LDAP_P(( BackendInfo *bi ));
-int bdb2i_back_db_startup LDAP_P(( BackendDB *be ));
-int bdb2i_back_db_shutdown LDAP_P(( BackendDB *be ));
-
-/*
- * timing.c
- */
-
-void bdb2i_uncond_start_timing LDAP_P(( struct timeval *time1 ));
-#define bdb2i_start_timing(bi,time1) if ( with_timing( bi )) bdb2i_uncond_start_timing( (time1) )
-void bdb2i_uncond_stop_timing LDAP_P(( struct timeval time1,
- char *func, Connection *conn, Operation *op, int level ));
-#define bdb2i_stop_timing(bi,time1,func,conn,op) if ( with_timing( bi )) bdb2i_uncond_stop_timing( (time1), (func), (conn), (op), LDAP_DEBUG_ANY )
-
-/*
- * porter.c
- */
-
-int bdb2i_enter_backend_rw LDAP_P(( DB_LOCK *lock, int writer ));
-#define bdb2i_enter_backend_r(lock) bdb2i_enter_backend_rw((lock), 0 )
-#define bdb2i_enter_backend_w(lock) bdb2i_enter_backend_rw((lock), 1 )
-int bdb2i_leave_backend_rw LDAP_P(( DB_LOCK lock, int writer ));
-#define bdb2i_leave_backend_r(lock) bdb2i_leave_backend_rw((lock), 0 )
-#define bdb2i_leave_backend_w(lock) bdb2i_leave_backend_rw((lock), 1 )
-
-/*
- * txn.c
- */
-
-int bdb2i_txn_head_init LDAP_P(( BDB2_TXN_HEAD *head ));
-void bdb2i_txn_attr_config LDAP_P((
- struct ldbminfo *li,
- char *attr,
- int open ));
-int bdb2i_txn_open_files LDAP_P(( BackendDB *be ));
-void bdb2i_txn_close_files LDAP_P(( BackendDB *be ));
-BDB2_TXN_FILES *bdb2i_get_db_file_cache LDAP_P((
- struct ldbminfo *li,
- char *name ));
-int bdb2i_check_additional_attr_index LDAP_P(( struct ldbminfo *li ));
-void bdb2i_check_default_attr_index_add LDAP_P((
- struct ldbminfo *li,
- Entry *e ));
-void bdb2i_check_default_attr_index_mod LDAP_P((
- struct ldbminfo *li,
- Modifications *modlist ));
-ID bdb2i_get_nextid LDAP_P(( BackendDB *be ));
-int bdb2i_put_nextid LDAP_P(( BackendDB *be, ID id ));
-LDBM bdb2i_db_open LDAP_P(( char *name, int type, int rw, int mode,
- int dbcachesize ));
-int bdb2i_db_store LDAP_P(( LDBM ldbm, Datum key, Datum data, int flags ));
-int bdb2i_db_delete LDAP_P(( LDBM ldbm, Datum key ));
-Datum bdb2i_db_fetch LDAP_P(( LDBM ldbm, Datum key ));
-Datum bdb2i_db_firstkey LDAP_P(( LDBM ldbm, DBC **dbch ));
-Datum bdb2i_db_nextkey LDAP_P(( LDBM ldbm, Datum key, DBC *dbcp ));
-int bdb2i_start_transction LDAP_P(( DB_TXNMGR *txmgr ));
-int bdb2i_finish_transaction LDAP_P(( ));
-int bdb2i_set_txn_checkpoint LDAP_P(( DB_TXNMGR *txmgr, int forced ));
-
-
-LDAP_END_DECL
-#endif
+++ /dev/null
-/* search.c - bdb2 backend search function */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/string.h>
-#include <ac/socket.h>
-#include <ac/time.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-#include "proto-back-bdb2.h"
-
-static ID_BLOCK *base_candidate(
- Backend *be, Entry *e );
-
-static ID_BLOCK *search_candidates(
- Backend *be, Entry *e, Filter *filter,
- int scope, int deref, int manageDSAit );
-
-static int
-bdb2i_back_search_internal(
- BackendDB *be,
- Connection *conn,
- Operation *op,
- char *base,
- int scope,
- int deref,
- int slimit,
- int tlimit,
- Filter *filter,
- char *filterstr,
- char **attrs,
- int attrsonly
-)
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- int rc, err;
- char *text;
- time_t stoptime;
- ID_BLOCK *candidates;
- ID id, cursor;
- Entry *e;
- struct berval **v2refs = NULL;
- Entry *matched = NULL;
- char *realbase = NULL;
- int nentries = 0;
- int manageDSAit = get_manageDSAit( op );
-
- Debug(LDAP_DEBUG_TRACE, "=> bdb2_back_search\n", 0, 0, 0);
-
- /* get entry with reader lock */
- if ( deref & LDAP_DEREF_FINDING ) {
- e = deref_dn_r( be, base, &err, &matched, &text );
-
- } else {
- e = bdb2i_dn2entry_r( be, base, &matched );
- err = e != NULL ? LDAP_SUCCESS : LDAP_REFERRAL;
- text = NULL;
- }
-
- if ( e == NULL ) {
- char *matched_dn = NULL;
- struct berval **refs = NULL;
-
- if ( matched != NULL ) {
- matched_dn = ch_strdup( matched->e_dn );
-
- refs = is_entry_referral( matched )
- ? get_entry_referrals( be, conn, op, matched )
- : NULL;
-
- bdb2i_cache_return_entry_r( &li->li_cache, matched );
- } else {
- refs = default_referral;
- }
-
- send_ldap_result( conn, op, err,
- matched_dn, text, refs, NULL );
-
- if( matched != NULL ) {
- ber_bvecfree( refs );
- free( matched_dn );
- }
-
- return 1;
- }
-
- if (!manageDSAit && is_entry_referral( e ) ) {
- /* entry is a referral, don't allow add */
- char *matched_dn = ch_strdup( e->e_dn );
- struct berval **refs = get_entry_referrals( be,
- conn, op, e );
-
- bdb2i_cache_return_entry_r( &li->li_cache, e );
-
- Debug( LDAP_DEBUG_TRACE, "entry is referral\n", 0,
- 0, 0 );
-
- send_ldap_result( conn, op, LDAP_REFERRAL,
- matched_dn, NULL, refs, NULL );
-
- ber_bvecfree( refs );
- free( matched_dn );
-
- return 1;
- }
-
- if ( tlimit == 0 && be_isroot( be, op->o_ndn ) ) {
- tlimit = -1; /* allow root to set no limit */
- } else {
- tlimit = (tlimit > be->be_timelimit || tlimit < 1) ?
- be->be_timelimit : tlimit;
- stoptime = op->o_time + tlimit;
- }
-
- if ( slimit == 0 && be_isroot( be, op->o_ndn ) ) {
- slimit = -1; /* allow root to set no limit */
- } else {
- slimit = (slimit > be->be_sizelimit || slimit < 1) ?
- be->be_sizelimit : slimit;
- }
-
- if ( scope == LDAP_SCOPE_BASE) {
- candidates = base_candidate( be, e );
-
- } else {
- candidates = search_candidates( be, e, filter,
- scope, deref, manageDSAit );
- }
-
- /* need normalized dn below */
- realbase = ch_strdup( e->e_ndn );
- bdb2i_cache_return_entry_r( &li->li_cache, e );
-
- if ( candidates == NULL ) {
- /* no candidates */
- Debug( LDAP_DEBUG_TRACE, "no candidates\n", 0,
- 0, 0 );
-
- send_search_result( conn, op,
- LDAP_SUCCESS,
- NULL, NULL, NULL, NULL, 0 );
-
- rc = 1;
- goto done;
- }
-
- for ( id = bdb2i_idl_firstid( candidates, &cursor ); id != NOID;
- id = bdb2i_idl_nextid( candidates, &cursor ) )
- {
- int scopeok = 0;
-
- /* check for abandon */
- ldap_pvt_thread_mutex_lock( &op->o_abandonmutex );
-
- if ( op->o_abandon ) {
- ldap_pvt_thread_mutex_unlock( &op->o_abandonmutex );
- rc = 0;
- goto done;
- }
-
- ldap_pvt_thread_mutex_unlock( &op->o_abandonmutex );
-
- /* check time limit */
- if ( tlimit != -1 && slap_get_time() > stoptime ) {
- send_search_result( conn, op, LDAP_TIMELIMIT_EXCEEDED,
- NULL, NULL, v2refs, NULL, nentries );
- rc = 0;
- goto done;
- }
-
- /* get the entry with reader lock */
- e = bdb2i_id2entry_r( be, id );
-
- if ( e == NULL ) {
- Debug( LDAP_DEBUG_ARGS, "search: candidate %ld not found\n",
- id, 0, 0 );
-
- goto loop_continue;
- }
-
- if ( deref & LDAP_DEREF_SEARCHING && is_entry_alias( e ) ) {
- Entry *matched;
- int err;
- char *text;
-
- e = deref_entry_r( be, e, &err, &matched, &text );
-
- if( e == NULL ) {
- e = matched;
- goto loop_continue;
- }
-
- if( e->e_id == id ) {
- /* circular loop */
- goto loop_continue;
- }
-
- /* need to skip alias which deref into scope */
- if( scope & LDAP_SCOPE_ONELEVEL ) {
- char *pdn = dn_parent( NULL, e->e_ndn );
- if ( pdn != NULL ) {
- if( strcmp( pdn, realbase ) ) {
- free( pdn );
- goto loop_continue;
- }
- free(pdn);
- }
-
- } else if ( dn_issuffix( e->e_ndn, realbase ) ) {
- /* alias is within scope */
- Debug( LDAP_DEBUG_ARGS, "search: \"%s\" in subtree\n",
- e->e_dn, 0, 0 );
- goto loop_continue;
- }
-
- scopeok = 1;
- }
-
- /*
- * if it's a referral, add it to the list of referrals. only do
- * this for non-base searches, and don't check the filter
- * explicitly here since it's only a candidate anyway.
- */
- if ( !manageDSAit && scope != LDAP_SCOPE_BASE &&
- is_entry_referral( e ) )
- {
- struct berval **refs = get_entry_referrals(
- be, conn, op, e );
-
- send_search_reference( be, conn, op,
- e, refs, scope, NULL, &v2refs );
-
- ber_bvecfree( refs );
-
- goto loop_continue;
- }
-
- /* if it matches the filter and scope, send it */
- if ( test_filter( be, conn, op, e, filter ) == LDAP_COMPARE_TRUE ) {
- char *dn;
-
- /* check scope */
- if ( !scopeok && scope == LDAP_SCOPE_ONELEVEL ) {
- if ( (dn = dn_parent( be, e->e_ndn )) != NULL ) {
- (void) dn_normalize( dn );
- scopeok = (dn == realbase)
- ? 1
- : (strcmp( dn, realbase ) ? 0 : 1 );
- free( dn );
-
- } else {
- scopeok = (realbase == NULL || *realbase == '\0');
- }
-
- } else if ( !scopeok && scope == LDAP_SCOPE_SUBTREE ) {
- dn = ch_strdup( e->e_ndn );
- scopeok = dn_issuffix( dn, realbase );
- free( dn );
-
- } else {
- scopeok = 1;
- }
-
- if ( scopeok ) {
- /* check size limit */
- if ( --slimit == -1 ) {
- bdb2i_cache_return_entry_r( &li->li_cache, e );
- send_search_result( conn, op,
- LDAP_SIZELIMIT_EXCEEDED, NULL, NULL,
- v2refs, NULL, nentries );
- rc = 0;
- goto done;
- }
-
- if (e) {
- switch ( send_search_entry( be, conn, op, e,
- attrs, attrsonly, NULL ) ) {
- case 0: /* entry sent ok */
- nentries++;
- break;
- case 1: /* entry not sent */
- break;
- case -1: /* connection closed */
- bdb2i_cache_return_entry_r( &li->li_cache, e );
- rc = 0;
- goto done;
- }
- }
- } else {
- Debug( LDAP_DEBUG_TRACE, "candidate %ld scope not okay\n",
- id, 0, 0 );
- }
- } else {
- Debug( LDAP_DEBUG_TRACE, "candidate %ld does match filter\n",
- id, 0, 0 );
- }
-
-loop_continue:
- if( e != NULL ) {
- /* free reader lock */
- bdb2i_cache_return_entry_r( &li->li_cache, e );
- }
-
- ldap_pvt_thread_yield();
- }
- send_search_result( conn, op,
- v2refs == NULL ? LDAP_SUCCESS : LDAP_REFERRAL,
- NULL, NULL, v2refs, NULL, nentries );
-
- rc = 0;
-
-done:
- bdb2i_idl_free( candidates );
-
- ber_bvecfree( v2refs );
- if( realbase ) free( realbase );
-
- return rc;
-}
-
-
-int
-bdb2_back_search(
- BackendDB *be,
- Connection *conn,
- Operation *op,
- char *base,
- char *nbase,
- int scope,
- int deref,
- int slimit,
- int tlimit,
- Filter *filter,
- char *filterstr,
- char **attrs,
- int attrsonly
-)
-{
- DB_LOCK lock;
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- struct timeval time1;
- int ret;
-
- bdb2i_start_timing( be->bd_info, &time1 );
-
- if ( bdb2i_enter_backend_r( &lock ) != 0 ) {
- send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
- NULL, NULL, NULL, NULL );
- return( -1 );
-
- }
-
- ret = bdb2i_back_search_internal( be, conn, op, nbase, scope, deref,
- slimit, tlimit, filter, filterstr, attrs, attrsonly );
-
- (void) bdb2i_leave_backend_r( lock );
- bdb2i_stop_timing( be->bd_info, time1, "SRCH", conn, op );
-
- return( ret );
-}
-
-
-static ID_BLOCK *
-base_candidate(
- Backend *be,
- Entry *e
-)
-{
- ID_BLOCK *idl;
-
- Debug(LDAP_DEBUG_TRACE, "base_candidates: base: \"%s\"\n",
- e->e_dn, 0, 0);
-
- idl = bdb2i_idl_alloc( 1 );
- bdb2i_idl_insert( &idl, e->e_id, 1 );
-
- return( idl );
-}
-
-static ID_BLOCK *
-search_candidates(
- Backend *be,
- Entry *e,
- Filter *filter,
- int scope,
- int deref,
- int manageDSAit
-)
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- ID_BLOCK *candidates;
- Filter *f, *rf, *af, *lf;
-
- Debug(LDAP_DEBUG_TRACE, "search_candidates: base=\"%s\" s=%d d=%d\n",
- e->e_ndn, scope, deref );
-
- f = NULL;
-
- if( !manageDSAit ) {
- /* match referrals */
- rf = (Filter *) ch_malloc( sizeof(Filter) );
- rf->f_next = NULL;
- rf->f_choice = LDAP_FILTER_OR;
- rf->f_or = (Filter *) ch_malloc( sizeof(Filter) );
- rf->f_or->f_choice = LDAP_FILTER_EQUALITY;
- rf->f_or->f_avtype = ch_strdup( "objectclass" );
- rf->f_or->f_avvalue.bv_val = ch_strdup( "REFERRAL" );
- rf->f_or->f_avvalue.bv_len = sizeof("REFERRAL")-1;
- rf->f_or->f_next = filter;
- f = rf;
- } else {
- rf = NULL;
- f = filter;
- }
-
- if( deref & LDAP_DEREF_SEARCHING ) {
- /* match aliases */
- af = (Filter *) ch_malloc( sizeof(Filter) );
- af->f_next = NULL;
- af->f_choice = LDAP_FILTER_OR;
- af->f_or = (Filter *) ch_malloc( sizeof(Filter) );
- af->f_or->f_choice = LDAP_FILTER_EQUALITY;
- af->f_or->f_avtype = ch_strdup( "objectclass" );
- af->f_or->f_avvalue.bv_val = ch_strdup( "ALIAS" );
- af->f_or->f_avvalue.bv_len = sizeof("ALIAS")-1;
- af->f_or->f_next = f;
- f = af;
- } else {
- af = NULL;
- }
-
- if ( scope == LDAP_SCOPE_SUBTREE ) {
- lf = (Filter *) ch_malloc( sizeof(Filter) );
- lf->f_next = NULL;
- lf->f_choice = LDAP_FILTER_AND;
- lf->f_and = (Filter *) ch_malloc( sizeof(Filter) );
-
- lf->f_and->f_choice = SLAPD_FILTER_DN_SUBTREE;
- lf->f_and->f_dn = e->e_ndn;
-
- lf->f_and->f_next = f;
- f = lf;
-
- } else if ( scope == LDAP_SCOPE_ONELEVEL ) {
- lf = (Filter *) ch_malloc( sizeof(Filter) );
- lf->f_next = NULL;
- lf->f_choice = LDAP_FILTER_AND;
- lf->f_and = (Filter *) ch_malloc( sizeof(Filter) );
-
- lf->f_and->f_choice = SLAPD_FILTER_DN_ONE;
- lf->f_and->f_dn = e->e_ndn;
-
- lf->f_and->f_next = f;
- f = lf;
-
- } else {
- lf = NULL;
- }
-
- candidates = bdb2i_filter_candidates( be, f );
-
- /* free up filter additions we allocated above */
- if( lf != NULL ) {
- free( lf->f_and );
- free( lf );
- }
-
- if( af != NULL ) {
- af->f_or->f_next = NULL;
- filter_free( af );
- }
-
- if( rf != NULL ) {
- rf->f_or->f_next = NULL;
- filter_free( rf );
- }
-
- return( candidates );
-}
+++ /dev/null
-/* startup.c - startup/shutdown bdb2 backend */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/string.h>
-#include <ac/socket.h>
-#include <ac/unistd.h>
-
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#ifdef HAVE_DIRECT_H
-#include <direct.h>
-#endif
-
-#include "slap.h"
-#include "back-bdb2.h"
-
-#include "db.h"
-
-static void remove_old_locks( char *home );
-
-
-static void
-bdb2i_db_errcall( const char *prefix, char *message )
-{
- Debug( LDAP_DEBUG_ANY, "bdb2_db_errcall(): %s %s", prefix, message, 0 );
-}
-
-
-/* startup/shutdown per backend type */
-
-static int
-bdb2i_back_startup_internal(
- BackendInfo *bi
-)
-{
- struct ldbtype *lty = (struct ldbtype *) bi->bi_private;
- u_int32_t envFlags;
- int err = 0;
- char *home;
-
- /* set the flags for a full-feldged transaction schema */
- envFlags = ( DB_CREATE | DB_THREAD | DB_INIT_TXN | DB_INIT_LOG |
- DB_INIT_LOCK | DB_INIT_MPOOL );
-
- /* make sure, dbhome is an absolute path */
- if ( *lty->lty_dbhome != *LDAP_DIRSEP ) {
- char cwd[MAXPATHLEN];
-
- (void) getcwd( cwd, MAXPATHLEN );
- sprintf( cwd, "%s" LDAP_DIRSEP "%s",
- cwd, lty->lty_dbhome );
- free( lty->lty_dbhome );
- lty->lty_dbhome = ch_strdup( cwd );
-
- }
- home = lty->lty_dbhome;
-
- /* general initialization of the environment */
- memset( &bdb2i_dbEnv, 0, sizeof( DB_ENV ));
- bdb2i_dbEnv.db_errcall = bdb2i_db_errcall;
- bdb2i_dbEnv.db_errpfx = "==>";
-
- /* initialize the lock subsystem */
- bdb2i_dbEnv.lk_max = 0;
-
- /* remove old locking tables */
- remove_old_locks( home );
-
- /* initialize the mpool subsystem */
- bdb2i_dbEnv.mp_size = lty->lty_mpsize;
-
- /* now do the db_appinit */
- if ( ( err = db_appinit( home, NULL, &bdb2i_dbEnv, envFlags )) ) {
- char error[BUFSIZ];
-
- if ( err < 0 ) sprintf( error, "%ld\n", (long) err );
- else sprintf( error, "%s\n", strerror( err ));
-
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_back_startup(): FATAL error in db_appinit() : %s\n",
- error, 0, 0 );
- return( 1 );
-
- }
-
- return 0;
-}
-
-
-static int
-bdb2i_back_shutdown_internal(
- BackendInfo *bi
-)
-{
- struct ldbtype *lty = (struct ldbtype *) bi->bi_private;
- int err;
-
- /* remove old locking tables */
- bdb2i_dbEnv.db_errpfx = "bdb2i_back_shutdown(): lock_unlink:";
- if ( ( err = lock_unlink( NULL, 1, &bdb2i_dbEnv )) != 0 )
- Debug( LDAP_DEBUG_ANY, "bdb2i_back_shutdown(): lock_unlink: %s\n",
- strerror( err ), 0, 0);
-
- /* remove old memory pool */
- bdb2i_dbEnv.db_errpfx = "bdb2i_back_shutdown(): memp_unlink:";
- if ( ( err = memp_unlink( NULL, 1, &bdb2i_dbEnv )) != 0 )
- Debug( LDAP_DEBUG_ANY, "bdb2i_back_shutdown(): memp_unlink: %s\n",
- strerror( err ), 0, 0);
-
- (void) db_appexit( &bdb2i_dbEnv );
-
- return( 0 );
-}
-
-
-int
-bdb2i_back_startup(
- BackendInfo *bi
-)
-{
- struct timeval time1;
- int ret;
-
- bdb2i_start_timing( bi, &time1 );
-
- ret = bdb2i_back_startup_internal( bi );
- bdb2i_stop_timing( bi, time1, "BE-START", NULL, NULL );
-
- return( ret );
-}
-
-
-int
-bdb2i_back_shutdown(
- BackendInfo *bi
-)
-{
- struct timeval time1;
- int ret;
-
- bdb2i_start_timing( bi, &time1 );
-
- ret = bdb2i_back_shutdown_internal( bi );
- bdb2i_stop_timing( bi, time1, "BE-SHUTDOWN", NULL, NULL );
-
- return( ret );
-}
-
-
-/* startup/shutdown per backend database */
-
-static int
-bdb2i_back_db_startup_internal(
- BackendDB *be
-)
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
-
- /* if the data directory is not an absolute path, have it relative
- to the current working directory (which should not be configured !) */
- if ( *li->li_directory != *LDAP_DIRSEP ) {
- char cwd[MAXPATHLEN];
-
- (void) getcwd( cwd, MAXPATHLEN );
- sprintf( cwd, "%s" LDAP_DIRSEP "%s",
- cwd, li->li_directory );
-
- free( li->li_directory );
- li->li_directory = ch_strdup( cwd );
-
- }
-
- /* if there are more index files, add them to the DB file list */
- if ( bdb2i_check_additional_attr_index( li ) != 0 )
- return 1;
-
- /* now open all DB files */
- if ( bdb2i_txn_open_files( be ) != 0 )
- return 1;
-
- return 0;
-}
-
-
-static int
-bdb2i_back_db_shutdown_internal(
- BackendDB *be
-)
-{
- return 0;
-}
-
-
-int
-bdb2_back_db_startup(
- BackendDB *be
-)
-{
- struct timeval time1;
- int ret;
-
- bdb2i_start_timing( be->bd_info, &time1 );
-
- ret = bdb2i_back_db_startup_internal( be );
- bdb2i_stop_timing( be->bd_info, time1, "DB-START", NULL, NULL );
-
- return( ret );
-}
-
-
-int
-bdb2_back_db_shutdown(
- BackendDB *be
-)
-{
- struct timeval time1;
- int ret;
-
- bdb2i_start_timing( be->bd_info, &time1 );
-
- ret = bdb2i_back_db_shutdown_internal( be );
- bdb2i_stop_timing( be->bd_info, time1, "DB-SHUTDOWN", NULL, NULL );
-
- return( ret );
-}
-
-
-static void
-remove_old_locks( char *home )
-{
- DB_ENV dbEnv;
- int err;
-
- memset( &dbEnv, 0, sizeof( DB_ENV ));
- dbEnv.db_errcall = bdb2i_db_errcall;
- dbEnv.db_errpfx = "remove_old_locks(): db_appinit:";
- dbEnv.lk_max = 0;
-
- if ( ( err = db_appinit( home, NULL, &dbEnv, 0 )) != 0 )
- Debug( LDAP_DEBUG_ANY, "remove_old_locks(): db_appinit: %s\n",
- strerror( err ), 0, 0);
-
- dbEnv.db_errpfx = "remove_old_locks(): lock_unlink:";
- if ( ( err = lock_unlink( NULL, 1, &dbEnv )) != 0 )
- Debug( LDAP_DEBUG_ANY, "remove_old_locks(): lock_unlink: %s\n",
- strerror( err ), 0, 0);
-
- dbEnv.db_errpfx = "remove_old_locks(): db_appexit:";
- if ( ( err = db_appexit( &dbEnv )) != 0 )
- Debug( LDAP_DEBUG_ANY, "remove_old_locks(): db_appexit: %s\n",
- strerror( err ), 0, 0);
-
-}
-
-
+++ /dev/null
-/* timing.c - timing bdb2 backend */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/string.h>
-#include <ac/time.h>
-#include <ac/unistd.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-
-
-static char *
-bdb2i_elapsed( struct timeval firsttime, struct timeval secondtime )
-{
- long int elapsedmicrosec, elapsedsec;
- char elapsed_string[BUFSIZ];
-
- elapsedsec = secondtime.tv_sec - firsttime.tv_sec;
- elapsedmicrosec = secondtime.tv_usec - firsttime.tv_usec;
- if(elapsedmicrosec < 0) {
- elapsedmicrosec += 1000000;
- elapsedsec -= 1;
- }
-
- sprintf( elapsed_string, "%ld.%.6ld", elapsedsec, elapsedmicrosec );
- return( ch_strdup( elapsed_string ));
-}
-
-
-void
-bdb2i_uncond_start_timing(
- struct timeval *time1
-)
-{
- gettimeofday( time1, NULL );
-}
-
-
-void
-bdb2i_uncond_stop_timing(
- struct timeval time1,
- char *func,
- Connection *conn,
- Operation *op,
- int level
-)
-{
- struct timeval time2;
- char *elapsed_time;
- char buf[BUFSIZ];
-
- *buf = '\0';
-
- gettimeofday( &time2, NULL);
- elapsed_time = bdb2i_elapsed( time1, time2 );
-
- if ( conn != NULL ) sprintf( buf, "conn=%d ", conn->c_connid );
- if ( op != NULL ) sprintf( buf, "%sop=%d ", buf, op->o_opid );
-
- Debug( level, "%s%s elapsed=%s\n", buf, func, elapsed_time );
-
- free( elapsed_time );
-
-}
-
-
+++ /dev/null
-/* tools.c - tools for slap tools */
-/* $OpenLDAP$ */
-/*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
- */
-
-#include "portable.h"
-
-#include <stdio.h>
-
-#include <ac/string.h>
-#include <ac/socket.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-
-static LDBMCursor *cursorp = NULL;
-static DBCache *id2entry = NULL;
-
-int bdb2_tool_entry_open(
- BackendDB *be, int mode )
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- int flags;
-
- assert( slapMode & SLAP_TOOL_MODE );
- assert( id2entry == NULL );
-
- switch( mode ) {
- case 1:
- flags = LDBM_WRCREAT;
- break;
- case 2:
-#ifdef TRUNCATE_MODE
- flags = LDBM_NEWDB;
-#else
- flags = LDBM_WRCREAT;
-#endif
- break;
- default:
- flags = LDBM_READER;
- }
-
- if ( (id2entry = bdb2i_cache_open( be, "id2entry", BDB2_SUFFIX, flags ))
- == NULL ) {
- Debug( LDAP_DEBUG_ANY, "Could not open/create id2entry" BDB2_SUFFIX "\n",
- 0, 0, 0 );
- return( -1 );
- }
-
- return 0;
-}
-
-int bdb2_tool_entry_close(
- BackendDB *be )
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
-
- assert( slapMode & SLAP_TOOL_MODE );
- assert( id2entry != NULL );
-
- bdb2i_cache_close( be, id2entry );
- id2entry = NULL;
-
- return 0;
-}
-
-ID bdb2_tool_entry_first(
- BackendDB *be )
-{
- Datum key;
- ID id;
-
- assert( slapMode & SLAP_TOOL_MODE );
- assert( id2entry != NULL );
-
- key = ldbm_firstkey( id2entry->dbc_db, &cursorp );
-
- if( key.dptr == NULL ) {
- return NOID;
- }
-
- memcpy( &id, key.dptr, key.dsize );
-
- ldbm_datum_free( id2entry->dbc_db, key );
-
- return id;
-}
-
-ID bdb2_tool_entry_next(
- BackendDB *be )
-{
- Datum key;
- ID id;
-
- assert( slapMode & SLAP_TOOL_MODE );
- assert( id2entry != NULL );
-
- /* allow for NEXTID */
- ldbm_datum_init( key );
-
- key = ldbm_nextkey( id2entry->dbc_db, key, cursorp );
-
- if( key.dptr == NULL ) {
- return NOID;
- }
-
- memcpy( &id, key.dptr, key.dsize );
-
- ldbm_datum_free( id2entry->dbc_db, key );
-
- return id;
-}
-
-Entry* bdb2_tool_entry_get( BackendDB *be, ID id )
-{
- Entry *e;
- Datum key, data;
- assert( slapMode & SLAP_TOOL_MODE );
- assert( id2entry != NULL );
-
- ldbm_datum_init( key );
-
- key.dptr = (char *) &id;
- key.dsize = sizeof(ID);
-
- data = bdb2i_cache_fetch( id2entry, key );
-
- if ( data.dptr == NULL ) {
- return NULL;
- }
-
- e = str2entry( data.dptr );
- ldbm_datum_free( id2entry->dbc_db, data );
-
- return e;
-}
-
-ID bdb2_tool_entry_put(
- BackendDB *be,
- Entry *e )
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- Datum key, data;
- int rc, len;
-
- assert( slapMode & SLAP_TOOL_MODE );
- assert( id2entry != NULL );
-
- if( bdb2i_next_id_get( be ) == NOID ) {
- return NOID;
- }
-
- e->e_id = li->li_nextid++;
-
- Debug( LDAP_DEBUG_TRACE, "=> bdb2_tool_entry_put( %ld, \"%s\" )\n",
- e->e_id, e->e_dn, 0 );
-
- rc = bdb2i_index_add_entry( be, e );
-
- if( rc != 0 ) {
- return NOID;
- }
-
- rc = bdb2i_dn2id_add( be, e->e_ndn, e->e_id );
-
- if( rc != 0 ) {
- return NOID;
- }
-
- ldbm_datum_init( key );
- ldbm_datum_init( data );
-
- key.dptr = (char *) &e->e_id;
- key.dsize = sizeof(ID);
-
- data.dptr = entry2str( e, &len );
- data.dsize = len + 1;
-
- /* store it */
- rc = bdb2i_cache_store( id2entry, key, data, LDBM_REPLACE );
-
- if( rc != 0 ) {
- (void) bdb2i_dn2id_delete( be, e->e_ndn, e->e_id );
- return NOID;
- }
-
- return e->e_id;
-}
-
-int bdb2_tool_index_attr(
- BackendDB *be,
- char* type )
-{
- static DBCache *db = NULL;
- int indexmask, syntaxmask;
- char * at_cn;
-
- assert( slapMode & SLAP_TOOL_MODE );
-
- bdb2i_attr_masks( be->be_private, type, &indexmask, &syntaxmask );
-
- attr_normalize( type );
- at_cn = at_canonical_name( type );
-
- if ( (db = bdb2i_cache_open( be, at_cn, LDBM_SUFFIX, LDBM_NEWDB ))
- == NULL ) {
- Debug( LDAP_DEBUG_ANY,
- "<= index_read NULL (could not open %s%s)\n", at_cn,
- BDB2_SUFFIX, 0 );
- return 0;
- }
-
- bdb2i_cache_close( be, db );
-
- return indexmask != 0;
-}
-
-int bdb2_tool_index_change(
- BackendDB *be,
- char* type,
- struct berval **bv,
- ID id,
- int op )
-{
- assert( slapMode & SLAP_TOOL_MODE );
-
- bdb2i_index_add_values( be,
- type, bv, id );
-
- return 0;
-}
-
-int bdb2_tool_sync( BackendDB *be )
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
-
- assert( slapMode & SLAP_TOOL_MODE );
-
- if ( li->li_nextid != NOID ) {
- bdb2i_next_id_save( be );
- }
-
- return 0;
-}
+++ /dev/null
-/* txn.c - TP support functions of the bdb2 backend */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#include "txn.h"
-
-/* default DB files */
-char *bdb2i_fixed_filenames[] = {
- "id2entry",
- "dn2id",
- "objectclass",
- NULL
-};
-
-
-int
-bdb2i_txn_head_init( BDB2_TXN_HEAD *head )
-{
- int dbFile;
- BDB2_TXN_FILES **fileNodeH;
-
- /* for each fixed DB file allocate a file descriptor node and
- initialize the file's name */
- fileNodeH = &head->dbFiles;
-
- for ( dbFile = 0; bdb2i_fixed_filenames[dbFile] != NULL; dbFile++ ) {
- char fileName[MAXPATHLEN];
-
- *fileNodeH = (BDB2_TXN_FILES *) ch_calloc( 1, sizeof( BDB2_TXN_FILES ));
-
- if ( *fileNodeH == NULL ) {
- Debug( LDAP_DEBUG_ANY, "bdb2i_txn_head_init(): out of memory!\n",
- 0, 0, 0 );
- return( 1 );
- }
-
- sprintf( fileName, "%s" BDB2_SUFFIX, bdb2i_fixed_filenames[dbFile] );
- (*fileNodeH)->dbc_name = ch_strdup( fileName );
-
- fileNodeH = &(*fileNodeH)->next;
-
- }
-
- /* set defaults for checkpointing */
- head->txn_log = BDB2_TXN_CHKP_MAX_LOG;
- head->txn_time = BDB2_TXN_CHKP_MAX_TIME;
-
- /* initialize the txn_dirty_mutex */
- ldap_pvt_thread_mutex_init( &txn_dirty_mutex );
-
- return 0;
-}
-
-
-static void
-bdb2i_init_db_file_cache( struct ldbminfo *li, BDB2_TXN_FILES *fileinfo )
-{
- struct stat st;
- char buf[MAXPATHLEN];
-
- fileinfo->dbc_refcnt = 1;
-
- sprintf( buf, "%s" LDAP_DIRSEP "%s",
- li->li_directory, fileinfo->dbc_name );
-
- if ( stat( buf, &st ) == 0 ) {
- fileinfo->dbc_blksize = st.st_blksize;
- } else {
- fileinfo->dbc_blksize = DEFAULT_BLOCKSIZE;
- }
-
- fileinfo->dbc_maxids = ( fileinfo->dbc_blksize / sizeof( ID )) -
- ID_BLOCK_IDS_OFFSET;
- fileinfo->dbc_maxindirect = ( SLAPD_LDBM_MIN_MAXIDS /
- fileinfo->dbc_maxids ) + 1;
-
-}
-
-
-/* create a DB file cache entry for a specified index attribute
- (if not already done); the function is called during config
- file read for all index'ed attributes; if "default" index with
- a non-none selection is given, this is remembered for run-time
- extension of the list of index files; the function is also
- called before add or modify operations to check for putative
- new "default" index files; at that time, files are also opened
-*/
-void
-bdb2i_txn_attr_config(
- struct ldbminfo *li,
- char *attr,
- int open )
-{
- BDB2_TXN_HEAD *head = &li->li_txn_head;
-
- /* the "attribute" 'default' is special */
- if ( strcasecmp( attr, "default" )) {
-
- /* create a new index file node, if the index is not known already */
- BDB2_TXN_FILES **fileNodeH;
- char fileName[MAXPATHLEN];
-
- sprintf( fileName, "%s%s", attr, BDB2_SUFFIX );
-
- /* search for the end of the list or a node describing
- the current attribute */
- for ( fileNodeH = &head->dbFiles;
- ( *fileNodeH && strcasecmp( (*fileNodeH)->dbc_name, fileName ));
- fileNodeH = &(*fileNodeH)->next ) {
-
- }
-
- /* unless we have that attribute already... */
- if ( *fileNodeH == NULL ) {
- BDB2_TXN_FILES *p;
-
- Debug( LDAP_DEBUG_TRACE,
- "bdb2i_txn_attr_config(): adding node for \"%s\"\n",
- fileName, 0, 0 );
-
- /* if we're out of memory, we have to see, how to exit... */
- if ( ( *fileNodeH = p = (BDB2_TXN_FILES *)
- ch_calloc( 1, sizeof( BDB2_TXN_FILES )) ) == NULL ) {
-
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_txn_attr_config(): out of memory -- FATAL.\n",
- 0, 0, 0 );
-
- /* during configuration (no files are opened)
- we can just exit, otherwise we kill ourself and
- hope to shutdown cleanly... */
- if ( open ) {
- pthread_kill( pthread_self(), LDAP_SIGUSR1 );
- } else {
- exit( EXIT_FAILURE );
- }
- }
-
- p->dbc_name = ch_strdup( fileName );
-
- /* if requested for, we have to open the DB file */
- /* BUT NOT "objectclass", 'cause that's a default index ! */
- if ( open && strcasecmp( fileName, "objectclass" )) {
-
- /* re-use filename to get the complete path */
- sprintf( fileName, "%s" LDAP_DIRSEP "%s",
- li->li_directory, p->dbc_name );
-
- /* since we have an mpool, we should not define a cache size */
- p->dbc_db = bdb2i_db_open( fileName, DB_TYPE,
- LDBM_WRCREAT, li->li_mode, 0 );
-
- /* if the files could not be opened, something is wrong;
- complain */
- if ( p->dbc_db == NULL ) {
-
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_txn_open_files(): couldn't open file \"%s\" -- FATAL.\n",
- p->dbc_name, 0, 0 );
- pthread_kill( pthread_self(), LDAP_SIGUSR1 );
-
- }
-
- bdb2i_init_db_file_cache( li, p );
-
- Debug( LDAP_DEBUG_TRACE,
- "bdb2i_txn_attr_config(): NEW INDEX FILE \"%s\"\n",
- p->dbc_name, 0, 0 );
-
- }
- }
-
- } else { /* it is "attribute" 'default' */
-
- head->withDefIDX = BDB2_WITH_DEF_IDX;
-
- }
-}
-
-
-/* open the NEXTID file for read/write; if it does not exist,
- create it (access to the file must be preceeded by a rewind)
-*/
-static int
-bdb2i_open_nextid( BackendDB *be )
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- BDB2_TXN_HEAD *head = &li->li_txn_head;
- LDBM db = NULL;
- DB_INFO dbinfo;
- char fileName[MAXPATHLEN];
-
- sprintf( fileName, "%s" LDAP_DIRSEP "%s",
- li->li_directory, NEXTID_NAME );
-
- /* try to open the file for read and write */
- memset( &dbinfo, 0, sizeof( dbinfo ));
- dbinfo.db_pagesize = DEFAULT_DB_PAGE_SIZE;
- dbinfo.db_malloc = ldbm_malloc;
-
- (void) db_open( fileName, DB_RECNO, DB_CREATE | DB_THREAD,
- li->li_mode, &bdb2i_dbEnv, &dbinfo, &db );
-
- if ( db == NULL ) {
-
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_open_nextid: could not open \"%s\"\n",
- NEXTID_NAME, 0, 0 );
- return( -1 );
-
- }
-
- /* the file is open for read/write */
- head->nextidFile = db;
-
- return( 0 );
-}
-
-
-/* open all DB during startup of the backend (necessary due to TP)
- additional files may be opened during slapd life-time due to
- default indexes (must be configured in slapd.conf;
- see bdb2i_txn_attr_config)
- also, set the counter and timer for TP checkpointing
-*/
-int
-bdb2i_txn_open_files( BackendDB *be )
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- BDB2_TXN_HEAD *head = &li->li_txn_head;
- BDB2_TXN_FILES *dbFile;
- int rc;
-
- for ( dbFile = head->dbFiles; dbFile; dbFile = dbFile->next ) {
- char fileName[MAXPATHLEN];
-
- sprintf( fileName, "%s" LDAP_DIRSEP "%s",
- li->li_directory, dbFile->dbc_name );
-
- /* since we have an mpool, we should not define a cache size */
- dbFile->dbc_db = bdb2i_db_open( fileName, DB_TYPE,
- LDBM_WRCREAT, li->li_mode, 0 );
-
- /* if the files could not be opened, something is wrong; complain */
- if ( dbFile->dbc_db == NULL ) {
-
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_txn_open_files(): couldn't open file \"%s\" -- FATAL.\n",
- dbFile->dbc_name, 0, 0 );
- return( -1 );
-
- }
-
- /* initialize the file info */
- bdb2i_init_db_file_cache( li, dbFile );
-
- Debug( LDAP_DEBUG_TRACE, "bdb2i_txn_open_files(): OPEN INDEX \"%s\"\n",
- dbFile->dbc_name, 0, 0 );
-
- }
-
- rc = bdb2i_open_nextid( be );
-
- txn_max_pending_log = head->txn_log;
- txn_max_pending_time = head->txn_time;
-
- return rc;
-}
-
-
-/* close all DB files during shutdown of the backend */
-void
-bdb2i_txn_close_files( BackendDB *be )
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- BDB2_TXN_HEAD *head = &li->li_txn_head;
- BDB2_TXN_FILES *dbFile;
-
- for ( dbFile = head->dbFiles; dbFile; dbFile = dbFile->next ) {
-
- ldbm_close( dbFile->dbc_db );
-
- }
-
- if ( head->nextidFile )
- ldbm_close( head->nextidFile );
-
-}
-
-
-/* get the db_cache structure associated with a specified
- DB file (replaces the on-the-fly opening of files in cache_open()
-*/
-BDB2_TXN_FILES *
-bdb2i_get_db_file_cache( struct ldbminfo *li, char *name )
-{
- BDB2_TXN_HEAD *head = &li->li_txn_head;
- BDB2_TXN_FILES *dbFile;
- int dbFileNum;
-
- Debug( LDAP_DEBUG_TRACE, "bdb2i_get_db_file_cache(): looking for file %s\n",
- name, 0, 0 );
-
- for ( dbFile = head->dbFiles; dbFile; dbFile = dbFile->next ) {
-
- /* we've got it */
- if ( !strcasecmp( dbFile->dbc_name, name )) return( dbFile );
-
- }
-
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_get_db_file_cache(): UPS, could't find \"%s\" \n", name, 0, 0 );
-
- /* ups, we couldn't find the file */
- return( NULL );
-
-}
-
-
-/* check for new attribute indexes, that might have been created
- during former runs of slapd */
-/* this is called during startup of the slapd server */
-int
-bdb2i_check_additional_attr_index( struct ldbminfo *li )
-{
- DIR *datadir;
- struct dirent *file;
-
- if ( ( datadir = opendir( li->li_directory ) ) == NULL ) {
- int err = errno;
-
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_check_additional_attr_index(): ERROR while opening datadir: %s\n",
- strerror( err ), 0, 0 );
- return( 1 );
-
- }
-
- for ( file = readdir( datadir ); file; file = readdir( datadir )) {
- char filename[MAXPATHLEN];
- int namelen;
-
- strcpy( filename, file->d_name );
- namelen = strlen( filename );
-
- if ( namelen > strlen( BDB2_SUFFIX )) {
-
- if ( !strcasecmp( filename + namelen - strlen( BDB2_SUFFIX ),
- BDB2_SUFFIX )) {
-
- *(filename + namelen - strlen( BDB2_SUFFIX )) = '\0';
- bdb2i_txn_attr_config( li, filename, 0 );
-
- Debug( LDAP_DEBUG_TRACE, "INDEX FILE: %s\n", filename, 0, 0 );
-
- }
-
- }
-
- }
-
- closedir( datadir );
-
- return 0;
-}
-
-
-/* check for the addition of new attribute indexes during add */
-/* this is called after startup of the slapd server */
-/* DON'T WORRY ABOUT ACCESS RIGHTS, THAT MIGHT PREVENT US
- FROM ADDING ATTRIBUTES LATER ON */
-void
-bdb2i_check_default_attr_index_add( struct ldbminfo *li, Entry *e )
-{
- BDB2_TXN_HEAD *head = &li->li_txn_head;
-
- if ( head->withDefIDX == BDB2_WITH_DEF_IDX ) {
- Attribute *ap;
-
- for ( ap = e->e_attrs; ap != NULL; ap = ap->a_next ) {
- if ( strcasecmp( ap->a_type, "objectclass" ))
- bdb2i_txn_attr_config( li, ap->a_type, 1 );
- }
- }
-}
-
-
-/* check for the addition of new attribute indexes during modify */
-/* this is called after startup of the slapd server */
-/* DON'T WORRY ABOUT ACCESS RIGHTS, THAT MIGHT PREVENT US
- FROM ADDING ATTRIBUTES LATER ON */
-void
-bdb2i_check_default_attr_index_mod( struct ldbminfo *li, LDAPModList *modlist )
-{
- BDB2_TXN_HEAD *head = &li->li_txn_head;
-
- if ( head->withDefIDX == BDB2_WITH_DEF_IDX ) {
- LDAPModList *ml;
- char *default_attrs[] = { "modifytimestamp", "modifiersname", NULL };
- int attr;
-
- for ( ml = modlist; ml != NULL; ml = ml->ml_next ) {
- LDAPMod *mod = &ml->ml_mod;
-
- if (( mod->mod_op & ~LDAP_MOD_BVALUES ) == LDAP_MOD_ADD )
- if ( strcasecmp( mod->mod_type, "objectclass" ))
- bdb2i_txn_attr_config( li, mod->mod_type, 1 );
- }
-
- /* these attributes are default when modifying */
- for ( attr = 0; default_attrs[attr]; attr++ ) {
- bdb2i_txn_attr_config( li, default_attrs[attr], 1 );
- }
- }
-}
-
-
-/* get the next ID from the NEXTID file */
-ID
-bdb2i_get_nextid( BackendDB *be )
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- BDB2_TXN_HEAD *head = &li->li_txn_head;
- ID id;
- Datum key;
- Datum data;
- db_recno_t rec = NEXTID_RECNO;
-
- ldbm_datum_init( key );
- ldbm_datum_init( data );
-
- key.data = &rec;
- key.size = sizeof( rec );
-
- data = bdb2i_db_fetch( head->nextidFile, key );
- if ( data.data == NULL ) {
- Debug( LDAP_DEBUG_ANY,
- "next_id_read: could not get nextid from \"%s\"\n",
- NEXTID_NAME, 0, 0 );
- return NOID;
- }
-
- id = atol( data.data );
- ldbm_datum_free( head->nextidFile, data );
-
- if ( id < 1 ) {
- Debug( LDAP_DEBUG_ANY,
- "next_id_read %ld: return non-positive integer\n",
- id, 0, 0 );
- return NOID;
- }
-
- return( id );
-}
-
-
-int
-bdb2i_put_nextid( BackendDB *be, ID id )
-{
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- BDB2_TXN_HEAD *head = &li->li_txn_head;
- int rc, flags;
- Datum key;
- Datum data;
- db_recno_t rec = NEXTID_RECNO;
- char buf[20];
-
- sprintf( buf, "%ld\n", id );
-
- ldbm_datum_init( key );
- ldbm_datum_init( data );
-
- key.data = &rec;
- key.size = sizeof( rec );
-
- data.data = &buf;
- data.size = sizeof( buf );
-
- flags = LDBM_REPLACE;
- if (( rc = bdb2i_db_store( head->nextidFile, key, data, flags )) != 0 ) {
- Debug( LDAP_DEBUG_ANY, "next_id_write(%ld): store failed (%d)\n",
- id, rc, 0 );
- return( -1 );
- }
-
- return( rc );
-}
-
-
-/* BDB2 backend-private functions of libldbm */
-LDBM
-bdb2i_db_open(
- char *name,
- int type,
- int rw,
- int mode,
- int dbcachesize )
-{
- LDBM ret = NULL;
- DB_INFO dbinfo;
-
- memset( &dbinfo, 0, sizeof( dbinfo ));
- if ( bdb2i_dbEnv.mp_info == NULL )
- dbinfo.db_cachesize = dbcachesize;
- dbinfo.db_pagesize = DEFAULT_DB_PAGE_SIZE;
- dbinfo.db_malloc = ldbm_malloc;
-
- (void) db_open( name, type, rw, mode, &bdb2i_dbEnv, &dbinfo, &ret );
-
- return( ret );
-}
-
-
-int
-bdb2i_db_store( LDBM ldbm, Datum key, Datum data, int flags )
-{
- int rc;
-
- rc = (*ldbm->put)( ldbm, txnid, &key, &data, flags );
- rc = (-1 ) * rc;
-
- if ( txnid != NULL ) {
-
- /* if the store was OK, set the dirty flag,
- otherwise set the abort flag */
- if ( rc == 0 ) {
-
- txn_dirty = 1;
-
- } else {
-
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_db_store: transaction failed: aborted.\n",
- 0, 0, 0 );
- txn_do_abort = 1;
-
- }
- }
-
- return( rc );
-}
-
-
-int
-bdb2i_db_delete( LDBM ldbm, Datum key )
-{
- int rc;
-
- rc = (*ldbm->del)( ldbm, txnid, &key, 0 );
- rc = (-1 ) * rc;
-
- if ( txnid != NULL ) {
-
- /* if the delete was OK, set the dirty flag,
- otherwise set the abort flag */
- if ( rc == 0 ) {
-
- txn_dirty = 1;
-
- } else {
-
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_db_delete: transaction failed: aborted.\n",
- 0, 0, 0 );
- txn_do_abort = 1;
-
- }
- }
-
- return( rc );
-}
-
-
-Datum
-bdb2i_db_fetch( LDBM ldbm, Datum key )
-{
- Datum data;
- int rc;
-
- ldbm_datum_init( data );
- data.flags = DB_DBT_MALLOC;
-
- if ( (rc = (*ldbm->get)( ldbm, txnid, &key, &data, 0 )) != 0 ) {
- if (( txnid != NULL ) && ( rc != DB_NOTFOUND )) {
-
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_db_fetch: transaction failed: aborted.\n",
- 0, 0, 0 );
- txn_do_abort = 1;
-
- }
- if ( data.dptr ) free( data.dptr );
- data.dptr = NULL;
- data.dsize = 0;
- }
-
- return( data );
-}
-
-
-Datum
-bdb2i_db_firstkey( LDBM ldbm, DBC **dbch )
-{
- Datum key, data;
- int rc;
- DBC *dbci;
-
- ldbm_datum_init( key );
- ldbm_datum_init( data );
-
- key.flags = data.flags = DB_DBT_MALLOC;
-
-#if defined( DB_VERSION_MAJOR ) && defined( DB_VERSION_MINOR ) && \
- DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR < 6
-
- if ( (*ldbm->cursor)( ldbm, txnid, &dbci ))
-
-#else
-
- if ( (*ldbm->cursor)( ldbm, txnid, &dbci, 0 ))
-
-#endif
- {
- if ( txnid != NULL ) {
-
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_db_firstkey: transaction failed: aborted.\n",
- 0, 0, 0 );
- txn_do_abort = 1;
-
- }
- key.flags = 0;
- return( key );
- } else {
- *dbch = dbci;
- if ( (*dbci->c_get)( dbci, &key, &data, DB_NEXT ) == 0 ) {
- ldbm_datum_free( ldbm, data );
- } else {
- if ( txnid != NULL ) {
-
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_db_firstkey: transaction failed: aborted.\n",
- 0, 0, 0 );
- txn_do_abort = 1;
-
- }
- ldbm_datum_free( ldbm, key );
- key.flags = 0;
- key.dptr = NULL;
- key.dsize = 0;
- }
- }
-
- return( key );
-}
-
-
-Datum
-bdb2i_db_nextkey( LDBM ldbm, Datum key, DBC *dbcp )
-{
- Datum data;
- int rc;
-
- ldbm_datum_init( data );
- ldbm_datum_free( ldbm, key );
- key.flags = data.flags = DB_DBT_MALLOC;
-
- if ( (*dbcp->c_get)( dbcp, &key, &data, DB_NEXT ) == 0 ) {
- ldbm_datum_free( ldbm, data );
- } else {
- if ( txnid != NULL ) {
-
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_db_nextkey: transaction failed: aborted.\n",
- 0, 0, 0 );
- txn_do_abort = 1;
-
- }
- key.flags = 0;
- key.dptr = NULL;
- key.dsize = 0;
- }
-
- return( key );
-}
-
-
-/* Transaction control of write access */
-/* Since these functions are only used by one writer at a time,
- we do not have any concurrency (locking) problem */
-
-/* initialize a new transaction */
-int
-bdb2i_start_transction( DB_TXNMGR *txmgr )
-{
- int rc;
-
- txnid = NULL;
- txn_do_abort = 0;
-
- if (( rc = txn_begin( txmgr, NULL, &txnid )) != 0 ) {
- int err = errno;
- Debug( LDAP_DEBUG_ANY, "bdb2i_start_transction failed: %d: errno=%s\n",
- rc, strerror( err ), 0 );
-
- if ( txnid != NULL )
- (void) txn_abort( txnid );
- return( -1 );
- }
-
- Debug( LDAP_DEBUG_TRACE,
- "bdb2i_start_transaction: transaction started.\n",
- 0, 0, 0 );
-
- return( 0 );
-}
-
-
-/* finish the transaction */
-int
-bdb2i_finish_transaction()
-{
- int rc = 0;
-
- /* if transaction was NOT selected, just return */
- if ( txnid == NULL ) return( 0 );
-
- /* if nothing was wrong so far, we can try to commit the transaction */
- /* complain, if the commit fails */
- if (( txn_do_abort == 0 ) && ( txn_commit( txnid )) != 0 ) {
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_finish_transaction: transaction commit failed: aborted.\n",
- 0, 0, 0 );
- txn_do_abort = 1;
- }
-
- /* if anything went wrong, we have to abort the transaction */
- if ( txn_do_abort ) {
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_finish_transaction: transaction aborted.\n",
- 0, 0, 0 );
- (void) txn_abort( txnid );
- rc = -1;
- } else {
- Debug( LDAP_DEBUG_TRACE,
- "bdb2i_finish_transaction: transaction commited.\n",
- 0, 0, 0 );
- }
-
- /* XXX do NOT free the txnid memory !!! */
- txnid = NULL;
- txn_do_abort = 0;
-
- return( rc );
-}
-
-
-/* set a checkpoint
- either forced (during shutdown) or when logsize or time are exceeded
- (is called by reader and writer, so protect txn_dirty)
-*/
-int
-bdb2i_set_txn_checkpoint( DB_TXNMGR *txmgr, int forced )
-{
- int rc = 0;
-
- /* set dirty mutex */
- ldap_pvt_thread_mutex_lock( &txn_dirty_mutex );
-
- if ( txn_dirty ) {
- int rc;
- u_int32_t logsize;
- u_int32_t mins;
- time_t now;
-
- logsize = forced ? (u_int32_t) 0 : txn_max_pending_log;
- mins = forced ? (u_int32_t) 0 : txn_max_pending_time;
-
- now = slap_get_time();
-
- rc = txn_checkpoint( txmgr, logsize, mins );
-
- /* if checkpointing was successful, reset txn_dirty */
- if ( rc == 0 ) {
- DB_TXN_STAT *statp = NULL;
-
- /* check whether the checkpoint was actually written;
- if so, unset the txn_dirty flag */
- if (( rc = txn_stat( txmgr, &statp, ldbm_malloc )) == 0 ) {
-
- if ( statp && ( statp->st_time_ckp >= now )) {
-
- Debug( LDAP_DEBUG_TRACE,
- "bdb2i_set_txn_checkpoint succeded.\n",
- 0, 0, 0 );
- txn_dirty = 0;
-
- }
-
- if ( statp ) free( statp );
-
- } else {
- Debug( LDAP_DEBUG_ANY,
- "bdb2i_set_txn_checkpoint: txn_stat failed: %d\n",
- rc, 0, 0 );
- }
- } else {
- Debug( LDAP_DEBUG_ANY, "bdb2i_set_txn_checkpoint failed: %d\n",
- rc, 0, 0 );
- }
- }
-
- /* release dirty mutex */
- ldap_pvt_thread_mutex_unlock( &txn_dirty_mutex );
-
- return( rc );
-}
-
-
+++ /dev/null
-/* txn.h - Header for TP support functions of the bdb2 backend */
-/* $OpenLDAP$ */
-
-#ifndef _BDB2_TXN_H_
-#define _BDB2_TXN_H_
-
-#include "portable.h"
-
-#include <stdio.h>
-#include <sys/stat.h>
-
-#include <ac/dirent.h>
-#include <ac/errno.h>
-#include <ac/signal.h>
-#include <ac/socket.h>
-#include <ac/string.h>
-#include <ac/time.h>
-#include <ac/unistd.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-
-
-
-/* the DB environment for the backend */
-DB_ENV bdb2i_dbEnv;
-
-
-/* variables for transaction support */
-DB_TXN *txnid = NULL;
-int txn_do_abort = 0;
-
-u_int32_t txn_max_pending_log;
-u_int32_t txn_max_pending_time;
-int txn_dirty = 0;
-ldap_pvt_thread_mutex_t txn_dirty_mutex;
-
-/* defaults for checkpointing */
-#define BDB2_TXN_CHKP_MAX_LOG 2000 /* checkpoint every 2MB lock file
- (approx. 20 ADD TXNs) */
-#define BDB2_TXN_CHKP_MAX_TIME 5 /* checkpoint after 5 minutes */
-
-
-/* the name of the file and the record number of the NEXTID datum */
-#define NEXTID_NAME "NEXTID"
-#define NEXTID_RECNO (db_recno_t) 1
-
-
-
-#endif /* _BDB2_TXN_H_ */
-
+++ /dev/null
-/* unbind.c - handle an ldap unbind operation */
-/* $OpenLDAP$ */
-
-#include "portable.h"
-
-#include <stdio.h>
-#include <ac/socket.h>
-
-#include "slap.h"
-#include "back-bdb2.h"
-
-static int
-bdb2i_back_unbind_internal(
- BackendDB *be,
- Connection *conn,
- Operation *op
-)
-{
- return( 0 );
-}
-
-
-int
-bdb2_back_unbind(
- BackendDB *be,
- Connection *conn,
- Operation *op
-)
-{
- struct timeval time1;
- int ret;
-
- bdb2i_start_timing( be->bd_info, &time1 );
-
- ret = bdb2i_back_unbind_internal( be, conn, op );
- bdb2i_stop_timing( be->bd_info, time1, "UNBIND", conn, op );
-
- return( ret );
-}
* ID off the end of it.
*/
rc = idl_insert( &tmp, id, db->dbc_maxids );
- assert( rc == 0 );
#ifdef SLAPD_SCHEMA_NOT_COMPAT
k3.dptr = ch_malloc(k2.dsize);
#
#-----------------------------------------------------------------------------
BUILD_LDBM = @BUILD_LDBM@
-BUILD_BDB2 = @BUILD_BDB2@
BUILD_QUIPU = @BUILD_QUIPU@
LDAP_INCDIR= ../../../include
PROGRAMS=ldif slappasswd slapadd slapcat slapindex
LDBMPROGRAMS=centipede sizecount
-BDB2PROGRAMS=
QUIPUPROGRAMS=chlog2replog edb2ldif
# CPPFLAGS will include the defines for dynamic libs in Mingw32.
LDBMSRCS = centipede.c sizecount.c
-BDB2SRCS =
-
QUIPUSRCS = edb2ldif.c ldapsyntax.c chlog2replog.c
SLAPD_OBJS = ../config.o ../ch_malloc.o ../backend.o ../charray.o \
../module.o ../aclparse.o ../filterentry.o \
EDB2LDIFSRCS = edb2ldif.c ldapsyntax.c
EDB2LDIFOBJS = edb2ldif.o ldapsyntax.o
-UNIX_PRGS = build-ldbm build-bdb2 build-quipu
+UNIX_PRGS = build-ldbm build-quipu
all-local: build-progs $(@PLAT@_PRGS)
ldbm-tools-yes ldbm-tools-mod: $(LDBMPROGRAMS)
-build-bdb2: bdb2-tools-$(BUILD_BDB2)
-bdb2-tools-no:
- @echo "run configure with --enable-bdb2 to build BDB2 tools"
-
-bdb2-tools-yes bdb2-tools-mod: $(BDB2PROGRAMS)
-
build-quipu: quipu-tools-$(BUILD_QUIPU)
quipu-tools-no:
@echo "run configure with --enable-quipu to build QUIPU tools"
sizecount: sizecount.o ../phonetic.o ../ch_malloc.o $(SLAPD_LIBDEPEND)
$(LTLINK) -o $@ sizecount.o ../phonetic.o ../ch_malloc.o $(LIBS)
-#
-# BDBM Specific Tools
-#
-
#
# QUIPU Specific Tools
#
$(LTLINK) -o $@ chlog2replog.o ../lock.o ../ch_malloc.o $(LIBS)
clean-local: FORCE
- $(RM) $(PROGRAMS) $(LDBMPROGRAMS) $(BDB2PROGRAMS) $(QUIPUPROGRAMS) \
+ $(RM) $(PROGRAMS) $(LDBMPROGRAMS) $(QUIPUPROGRAMS) \
$(XPROGRAMS) $(XSRCS) *.o core .libs/* *.exe
depend-local: FORCE
- DEPEND_LDBM= ; DEPEND_BDB2= ; DEPEND_QUIPU= ; \
+ DEPEND_LDBM= ; DEPEND_QUIPU= ; \
if [ "$(BUILD_LDBM)" != "no" ]; then \
DEPEND_LDBM="$(LDBMSRCS)"; \
fi; \
- if [ "$(BUILD_BDB2)" != "no" ]; then \
- DEPEND_BDB2="$(BDBMSRCS)"; \
- fi; \
if [ "$(BUILD_QUIPU)" != "no" ]; then \
DEPEND_QUIPU="$(QUIPUINCLUDEFLAG) $(QUIPUSRCS)"; \
fi; \
- $(MKDEP) $(DEFS) $(DEFINES) $(SRCS) $$DEPEND_QUIPU \
- $$DEPEND_LDBM $$DEPEND_BDB2
+ $(MKDEP) $(DEFS) $(DEFINES) $(SRCS) $$DEPEND_QUIPU $$DEPEND_LDBM
-install-local: install-ldbm-$(BUILD_LDBM) install-bdb2-$(BUILD_BDB2) \
+install-local: install-ldbm-$(BUILD_LDBM) \
install-quipu-$(BUILD_QUIPU)
-install-ldbm-no install-bdb2-no install-quipu-no:
+install-ldbm-no install-quipu-no:
install-ldbm-yes install-ldbm-mod: FORCE
-$(MKDIR) $(DESTDIR)$(sbindir)
$$bin$(EXEEXT) $(DESTDIR)$(sbindir); \
done
-install-bdb2-yes install-bdb2-mod: FORCE
- @-$(MKDIR) $(DESTDIR)$(sbindir)
-
install-quipu-yes: FORCE
@-$(MKDIR) $(DESTDIR)$(sbindir)
for bin in edb2ldif chlog2replog; do \
##
## tests Makefile.in for OpenLDAP
SUBDIRS= progs
-
-BUILD_BDB2 = @BUILD_BDB2@
+BUILD_LDBM=@BUILD_LDBM@
test: tests
-tests: bdb2 ldbm
+tests: ldbm
-bdb2: test-bdb2
-test-bdb2: FORCE
+ldbm: test-ldbm
+test-ldbm: FORCE
@-$(LN_S) $(srcdir)/data data
@-$(LN_S) $(top_srcdir)/servers/slapd/schema schema
- @if test "$(BUILD_BDB2)" = "yes" ; then \
- echo "Initiating LDAP tests..." ; \
+ @if test "$(BUILD_LDBM)" = "yes" ; then \
+ echo "Initiating LDAP tests for LDBM..." ; \
$(MKDIR) test-db test-repl || true; \
- $(srcdir)/scripts/all $(srcdir) bdb2 ; \
+ $(srcdir)/scripts/all $(srcdir) ldbm ; \
else \
- echo "run configure with --enable-bdb2" ; \
+ echo "run configure with --enable-ldbm" ; \
fi
-ldbm: test-ldbm
-test-ldbm: FORCE
- @-$(LN_S) $(srcdir)/data data
- @-$(LN_S) $(top_srcdir)/servers/slapd/schema schema
- @echo "Initiating LDAP tests..."
- @-$(MKDIR) test-db test-repl || true
- @$(srcdir)/scripts/all $(srcdir) ldbm
-
passwd: test-passwd
test-passwd: FORCE
@-$(LN_S) $(srcdir)/data data
$(MKDIR) test-db test-repl ; \
$(srcdir)/scripts/startup_nis_ldap_server.sh $(srcdir) ldbm
-test-nis-schema-bdb2:
- @-$(LN_S) $(srcdir)/data data
- @-$(LN_S) $(top_srcdir)/servers/slapd/schema schema
- @echo "Initiating LDAP server with NIS schema & DB2 backend..."; \
- @if test "$(BUILD_BDB2)" = "yes" ; then \
- echo "Initiating LDAP tests..." ; \
- $(MKDIR) test-db test-repl ; \
- $(srcdir)/scripts/startup_nis_ldap_server.sh $(srcdir) bdb2 ; \
- else \
- echo "run configure with --enable-bdb2" ; \
- fi
-
clean-local: FORCE
-$(RM) test-db/[!C]* test-repl/[!C]* *leak *gmon *core