version = db_version( &major, &minor, &patch );
- if( major != DB_VERSION_MAJOR || minor < DB_VERSION_MINOR ) {
+ if( major != DB_VERSION_MAJOR ||
+ minor != DB_VERSION_MINOR ||
+ patch != DB_VERSION_PATCH )
+ {
printf("Berkeley DB version mismatch\n"
"\theader: %s\n\tlibrary: %s\n",
DB_VERSION_STRING, version);
#include <ac/errno.h>
#include <sys/stat.h>
+#if defined(TEST_ABANDON) || defined(TEST_CANCEL)
+#include <ac/signal.h>
+#endif
+
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
}
}
+#if defined(TEST_ABANDON) || defined(TEST_CANCEL)
+static int gotintr;
+
+RETSIGTYPE
+do_sig( int sig )
+{
+ gotintr = 1;
+}
+#endif
int
main( int argc, char **argv )
attrs = &argv[optind];
}
+#if defined(TEST_ABANDON) || defined(TEST_CANCEL)
+ SIGNAL( SIGINT, do_sig );
+#endif
+
if ( infile != NULL ) {
if ( infile[0] == '-' && infile[1] == '\0' ) {
fp = stdin;
ldap_msgfree( res );
}
+#if defined(TEST_ABANDON) || defined(TEST_CANCEL)
+ if ( gotintr ) {
+#ifdef TEST_CANCEL
+ rc = ldap_cancel_s( ld, msgid, NULL, NULL );
+ fprintf( stderr, "got interrupt, cancel got %d\n", rc );
+ return -1;
+#endif
+#ifdef TEST_ABANDON
+ rc = ldap_abandon( ld, msgid );
+ fprintf( stderr, "got interrupt, abandon got %d\n", rc );
+ return -1;
+#endif
+ }
+#endif
if ( rc == -1 ) {
ldap_perror( ld, "ldap_result" );
#! /bin/sh
# $OpenLDAP$
-# from OpenLDAP
+# from OpenLDAP: pkg/ldap/configure.in,v 1.568 2005/03/10 03:35:59 hyc Exp
# This work is part of OpenLDAP Software <http://www.openldap.org/>.
#
SLAPD Overlay Options:"
ac_help="$ac_help
--enable-overlays enable all available overlays no|yes|mod [no]"
-ac_help="$ac_help
- --enable-chain LDAP Chain Response no|yes|mod [no]"
ac_help="$ac_help
--enable-denyop Deny Operation overlay no|yes|mod [no]"
ac_help="$ac_help
ac_help="$ac_help
--enable-rwm Rewrite/Remap overlay no|yes|mod [no]"
ac_help="$ac_help
- --enable-syncprov Syncrepl Provider overlay no|yes|mod [yes]"
+ --enable-syncprov Syncrepl Provider overlay no|yes|mod [yes]"
+ac_help="$ac_help
+ --enable-translucent Translucent Proxy overlay no|yes|mod [no]"
ac_help="$ac_help
--enable-unique Attribute Uniqueness overlay no|yes|mod [no]"
ac_help="$ac_help
fi
# end --enable-sql
-Overlays="chain denyop dyngroup glue lastmod ppolicy proxycache rwm \
- refint syncprov unique"
+Overlays="denyop dyngroup glue lastmod ppolicy proxycache rwm \
+ refint syncprov translucent unique"
# Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
if test "${with_xxslapoverlays+set}" = set; then
ol_enable_overlays="no"
fi
# end --enable-overlays
-# OpenLDAP --enable-chain
- # Check whether --enable-chain or --disable-chain was given.
-if test "${enable_chain+set}" = set; then
- enableval="$enable_chain"
-
- ol_arg=invalid
- for ol_val in no yes mod ; 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-chain" 1>&2; exit 1; }
- fi
- ol_enable_chain="$ol_arg"
-
-else
- ol_enable_chain="no"
-fi
-# end --enable-chain
-
# OpenLDAP --enable-denyop
# Check whether --enable-denyop or --disable-denyop was given.
if test "${enable_denyop+set}" = set; then
fi
# end --enable-syncprov
+# OpenLDAP --enable-translucent
+ # Check whether --enable-translucent or --disable-translucent was given.
+if test "${enable_translucent+set}" = set; then
+ enableval="$enable_translucent"
+
+ ol_arg=invalid
+ for ol_val in no yes mod ; 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-translucent" 1>&2; exit 1; }
+ fi
+ ol_enable_translucent="$ol_arg"
+
+else
+ ol_enable_translucent="no"
+fi
+# end --enable-translucent
+
# OpenLDAP --enable-unique
# Check whether --enable-unique or --disable-unique was given.
if test "${enable_unique+set}" = set; then
fi
fi
-if test $ol_enable_chain != no -a $ol_enable_ldap = no ; then
- { echo "configure: error: --enable-chain requires --enable-ldap" 1>&2; exit 1; }
-fi
-
if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
{ echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
fi
BUILD_REFINT=no
BUILD_RWM=no
BUILD_SYNCPROV=no
+BUILD_TRANSLUCENT=no
BUILD_UNIQUE=no
SLAPD_DYNAMIC_OVERLAYS=
# 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:2881: checking for $ac_word" >&5
+echo "configure:2878: 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:2933: checking for $ac_word" >&5
+echo "configure:2930: 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:2975: checking for $ac_word" >&5
+echo "configure:2972: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:3025: checking for Cygwin environment" >&5
+echo "configure:3022: 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 3030 "configure"
+#line 3027 "configure"
#include "confdefs.h"
int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:3041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3038: \"$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:3057: checking for mingw32 environment" >&5
+echo "configure:3054: 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 3062 "configure"
+#line 3059 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:3069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3066: \"$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:3085: checking for EMX OS/2 environment" >&5
+echo "configure:3082: 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 3090 "configure"
+#line 3087 "configure"
#include "confdefs.h"
int main() {
return __EMX__;
; return 0; }
EOF
-if { (eval echo configure:3097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_emxos2=yes
else
EMXOS2=
test "$ac_cv_emxos2" = yes && EMXOS2=yes
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:3113: checking how to run the C preprocessor" >&5
+echo "configure:3110: 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 3128 "configure"
+#line 3125 "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:3134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3131: \"$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 3145 "configure"
+#line 3142 "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:3151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3148: \"$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 3162 "configure"
+#line 3159 "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:3168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3165: \"$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
:
# 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:3218: checking for $ac_word" >&5
+echo "configure:3215: 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:3248: checking for $ac_word" >&5
+echo "configure:3245: 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:3299: checking for $ac_word" >&5
+echo "configure:3296: 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:3331: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
+echo "configure:3328: 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 3342 "configure"
+#line 3339 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:3347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3344: \"$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:3373: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:3370: 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:3378: checking whether we are using GNU C" >&5
+echo "configure:3375: 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:3387: \"$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:3384: \"$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:3406: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:3403: 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 "$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:3449: checking for ld used by GCC" >&5
+echo "configure:3446: checking for ld used by GCC" >&5
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:3479: checking for GNU ld" >&5
+echo "configure:3476: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:3482: checking for non-GNU ld" >&5
+echo "configure:3479: checking for non-GNU ld" >&5
fi
if eval "test \"\${lt_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:3517: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:3514: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:3534: checking for $LD option to reload object files" >&5
+echo "configure:3531: checking for $LD option to reload object files" >&5
if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
test -n "$reload_flag" && reload_flag=" $reload_flag"
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:3546: checking for BSD-compatible nm" >&5
+echo "configure:3543: checking for BSD-compatible nm" >&5
if eval "test \"\${lt_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 for a sed that does not truncate output""... $ac_c" 1>&6
-echo "configure:3584: checking for a sed that does not truncate output" >&5
+echo "configure:3581: checking for a sed that does not truncate output" >&5
if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo "$ac_t""$SED" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:3668: checking whether ln -s works" >&5
+echo "configure:3665: 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
fi
echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
-echo "configure:3689: checking how to recognise dependent libraries" >&5
+echo "configure:3686: checking how to recognise dependent libraries" >&5
if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
deplibs_check_method=$lt_cv_deplibs_check_method
echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:3879: checking for object suffix" >&5
+echo "configure:3876: 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:3885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3882: \"$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 executable suffix""... $ac_c" 1>&6
-echo "configure:3906: checking for executable suffix" >&5
+echo "configure:3903: 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:3916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:3913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.C | *.o | *.obj | *.xcoff) ;;
# Check for command to grab the raw symbol name followed by C symbol from nm.
echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
-echo "configure:3947: checking command to parse $NM output" >&5
+echo "configure:3944: checking command to parse $NM output" >&5
if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
int main(){nm_test_var='a';nm_test_func();return(0);}
EOF
- if { (eval echo configure:4030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:4027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
# Now try to grab the symbols.
nlist=conftest.nm
- if { (eval echo configure:4033: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then
+ if { (eval echo configure:4030: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
mv -f "$nlist"T "$nlist"
save_CFLAGS="$CFLAGS"
LIBS="conftstm.$ac_objext"
CFLAGS="$CFLAGS$no_builtin_flag"
- if { (eval echo configure:4084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
+ if { (eval echo configure:4081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
pipe_works=yes
fi
LIBS="$save_LIBS"
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4133: checking for $ac_hdr" >&5
+echo "configure:4130: 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 4138 "configure"
+#line 4135 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4140: \"$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*
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:4179: checking for ${ac_tool_prefix}file" >&5
+echo "configure:4176: checking for ${ac_tool_prefix}file" >&5
if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:4241: checking for file" >&5
+echo "configure:4238: checking for file" >&5
if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4312: checking for $ac_word" >&5
+echo "configure:4309: 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 "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:4344: checking for $ac_word" >&5
+echo "configure:4341: 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 "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4379: checking for $ac_word" >&5
+echo "configure:4376: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4411: checking for $ac_word" >&5
+echo "configure:4408: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4460 "configure"' > conftest.$ac_ext
- if { (eval echo configure:4461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 4457 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:4458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case `/usr/bin/file conftest.$ac_objext` 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:4482: checking whether the C compiler needs -belf" >&5
+echo "configure:4479: 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
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 4495 "configure"
+#line 4492 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:4502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4499: \"$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:4532: checking for $ac_word" >&5
+echo "configure:4529: 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:4564: checking for $ac_word" >&5
+echo "configure:4561: 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:4599: checking for $ac_word" >&5
+echo "configure:4596: 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:4631: checking for $ac_word" >&5
+echo "configure:4628: 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:4666: checking for $ac_word" >&5
+echo "configure:4663: 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:4698: checking for $ac_word" >&5
+echo "configure:4695: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# recent cygwin and mingw systems supply a stub DllMain which the user
# can override, but on older systems we have to supply one
echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
-echo "configure:4734: checking if libtool should supply DllMain function" >&5
+echo "configure:4731: checking if libtool should supply DllMain function" >&5
if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4739 "configure"
+#line 4736 "configure"
#include "confdefs.h"
int main() {
DllMain (0, 0, 0);
; return 0; }
EOF
-if { (eval echo configure:4747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_need_dllmain=no
else
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -mdll"
echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
-echo "configure:4768: checking how to link DLLs" >&5
+echo "configure:4765: checking how to link DLLs" >&5
if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4773 "configure"
+#line 4770 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:4780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_dll_switch=-mdll
else
compiler="$2"
echo $ac_n "checking for objdir""... $ac_c" 1>&6
-echo "configure:4894: checking for objdir" >&5
+echo "configure:4891: checking for objdir" >&5
rm -f .libs 2>/dev/null
mkdir .libs 2>/dev/null
if test -d .libs; then
# in isolation, and that seeing it set (from the cache) indicates that
# the associated values are set (in the cache) correctly too.
echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
-echo "configure:4921: checking for $compiler option to produce PIC" >&5
+echo "configure:4918: checking for $compiler option to produce PIC" >&5
if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Check to make sure the pic_flag actually works.
echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
-echo "configure:5073: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
+echo "configure:5070: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
cat > conftest.$ac_ext <<EOF
-#line 5080 "configure"
+#line 5077 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
case $host_os in
hpux9* | hpux10* | hpux11*)
fi
echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
-echo "configure:5139: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
+echo "configure:5136: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
cat > conftest.$ac_ext <<EOF
-#line 5147 "configure"
+#line 5144 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_prog_cc_static_works=yes
else
# Check to see if options -o and -c are simultaneously supported by compiler
echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
-echo "configure:5181: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo "configure:5178: checking if $compiler supports -c -o file.$ac_objext" >&5
if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
compiler_c_o=no
-if { (eval echo configure:5200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
+if { (eval echo configure:5197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
if test -s out/conftest.err; then
if test x"$compiler_c_o" = x"yes"; then
# Check to see if we can write to a .lo
echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
-echo "configure:5229: checking if $compiler supports -c -o file.lo" >&5
+echo "configure:5226: checking if $compiler supports -c -o file.lo" >&5
if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
save_objext="$ac_objext"
ac_objext=lo
cat > conftest.$ac_ext <<EOF
-#line 5240 "configure"
+#line 5237 "configure"
#include "confdefs.h"
int main() {
int some_variable = 0;
; return 0; }
EOF
-if { (eval echo configure:5247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
if test "$compiler_c_o" = no && test "$need_locks" != no; then
# do not overwrite the value of need_locks provided by the user
echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
-echo "configure:5278: checking if we can lock with hard links" >&5
+echo "configure:5275: checking if we can lock with hard links" >&5
hard_links=yes
$rm conftest*
ln conftest.a conftest.b 2>/dev/null && hard_links=no
if test "$GCC" = yes; then
# Check to see if options -fno-rtti -fno-exceptions are supported by compiler
echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
-echo "configure:5297: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo "configure:5294: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
echo "int some_variable = 0;" > conftest.$ac_ext
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
compiler_rtti_exceptions=no
cat > conftest.$ac_ext <<EOF
-#line 5303 "configure"
+#line 5300 "configure"
#include "confdefs.h"
int main() {
int some_variable = 0;
; return 0; }
EOF
-if { (eval echo configure:5310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
# See if the linker supports building shared libraries.
echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
-echo "configure:5337: checking whether the linker ($LD) supports shared libraries" >&5
+echo "configure:5334: checking whether the linker ($LD) supports shared libraries" >&5
allow_undefined_flag=
no_undefined_flag=
# Check hardcoding attributes.
echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
-echo "configure:6042: checking how to hardcode library paths into programs" >&5
+echo "configure:6039: checking how to hardcode library paths into programs" >&5
hardcode_action=
if test -n "$hardcode_libdir_flag_spec" || \
test -n "$runpath_var"; then
striplib=
old_striplib=
echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
-echo "configure:6070: checking whether stripping libraries is possible" >&5
+echo "configure:6067: checking whether stripping libraries is possible" >&5
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
# PORTME Fill in your ld.so characteristics
echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
-echo "configure:6084: checking dynamic linker characteristics" >&5
+echo "configure:6081: checking dynamic linker characteristics" >&5
library_names_spec=
libname_spec='lib$name'
soname_spec=
# Report the final consequences.
echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
-echo "configure:6506: checking if libtool supports shared libraries" >&5
+echo "configure:6503: checking if libtool supports shared libraries" >&5
echo "$ac_t""$can_build_shared" 1>&6
echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
-echo "configure:6510: checking whether to build shared libraries" >&5
+echo "configure:6507: checking whether to build shared libraries" >&5
test "$can_build_shared" = "no" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
echo "$ac_t""$enable_shared" 1>&6
echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
-echo "configure:6533: checking whether to build static libraries" >&5
+echo "configure:6530: checking whether to build static libraries" >&5
# Make sure either enable_shared or enable_static is yes.
test "$enable_shared" = yes || enable_static=yes
echo "$ac_t""$enable_static" 1>&6
*)
echo $ac_n "checking for dllload""... $ac_c" 1>&6
-echo "configure:6574: checking for dllload" >&5
+echo "configure:6571: checking for dllload" >&5
if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6579 "configure"
+#line 6576 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dllload(); below. */
; return 0; }
EOF
-if { (eval echo configure:6603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_dllload=yes"
else
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for shl_load""... $ac_c" 1>&6
-echo "configure:6621: checking for shl_load" >&5
+echo "configure:6618: checking for shl_load" >&5
if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6626 "configure"
+#line 6623 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shl_load(); below. */
; return 0; }
EOF
-if { (eval echo configure:6650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_shl_load=yes"
else
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:6668: checking for shl_load in -ldld" >&5
+echo "configure:6665: checking for shl_load in -ldld" >&5
ac_lib_var=`echo dld'_'shl_load | 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="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6676 "configure"
+#line 6673 "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
shl_load()
; return 0; }
EOF
-if { (eval echo configure:6687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6684: \"$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_t""no" 1>&6
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "configure:6706: checking for dlopen" >&5
+echo "configure:6703: checking for dlopen" >&5
if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6711 "configure"
+#line 6708 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dlopen(); below. */
; return 0; }
EOF
-if { (eval echo configure:6735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_dlopen=yes"
else
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:6753: checking for dlopen in -ldl" >&5
+echo "configure:6750: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | 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="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6761 "configure"
+#line 6758 "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
dlopen()
; return 0; }
EOF
-if { (eval echo configure:6772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6769: \"$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_t""no" 1>&6
echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
-echo "configure:6791: checking for dlopen in -lsvld" >&5
+echo "configure:6788: checking for dlopen in -lsvld" >&5
ac_lib_var=`echo svld'_'dlopen | 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="-lsvld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6799 "configure"
+#line 6796 "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
dlopen()
; return 0; }
EOF
-if { (eval echo configure:6810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6807: \"$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_t""no" 1>&6
echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
-echo "configure:6829: checking for dld_link in -ldld" >&5
+echo "configure:6826: checking for dld_link in -ldld" >&5
ac_lib_var=`echo dld'_'dld_link | 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="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6837 "configure"
+#line 6834 "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
dld_link()
; return 0; }
EOF
-if { (eval echo configure:6848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6845: \"$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
LIBS="$lt_cv_dlopen_libs $LIBS"
echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
-echo "configure:6907: checking whether a program can dlopen itself" >&5
+echo "configure:6904: checking whether a program can dlopen itself" >&5
if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 6917 "configure"
+#line 6914 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
exit (status);
}
EOF
- if { (eval echo configure:6978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ if { (eval echo configure:6975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
(./conftest; exit; ) 2>/dev/null
lt_status=$?
case x$lt_status in
if test "x$lt_cv_dlopen_self" = xyes; then
LDFLAGS="$LDFLAGS $link_static_flag"
echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
-echo "configure:7001: checking whether a statically linked program can dlopen itself" >&5
+echo "configure:6998: checking whether a statically linked program can dlopen itself" >&5
if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 7011 "configure"
+#line 7008 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
exit (status);
}
EOF
- if { (eval echo configure:7072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ if { (eval echo configure:7069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
(./conftest; exit; ) 2>/dev/null
lt_status=$?
case x$lt_status in
# systems, -lgcc has to come before -lc. If gcc already passes -lc
# to ld, don't add -lc before -lgcc.
echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
-echo "configure:7121: checking whether -lc should be explicitly linked in" >&5
+echo "configure:7118: checking whether -lc should be explicitly linked in" >&5
if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
$rm conftest*
echo 'static int dummy;' > conftest.$ac_ext
- if { (eval echo configure:7128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:7125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
soname=conftest
lib=conftest
libobjs=conftest.$ac_objext
libname=conftest
save_allow_undefined_flag=$allow_undefined_flag
allow_undefined_flag=
- if { (eval echo configure:7141: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
+ if { (eval echo configure:7138: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
then
lt_cv_archive_cmds_need_lc=no
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:7731: checking for $ac_word" >&5
+echo "configure:7728: 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:7784: checking how to run the C preprocessor" >&5
+echo "configure:7781: 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 7799 "configure"
+#line 7796 "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:7805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7802: \"$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 7816 "configure"
+#line 7813 "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:7822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7819: \"$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 7833 "configure"
+#line 7830 "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:7839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7836: \"$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
:
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:7866: checking for Cygwin environment" >&5
+echo "configure:7863: 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 7871 "configure"
+#line 7868 "configure"
#include "confdefs.h"
int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:7882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7879: \"$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:7898: checking for mingw32 environment" >&5
+echo "configure:7895: 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 7903 "configure"
+#line 7900 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:7910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:7929: checking for executable suffix" >&5
+echo "configure:7926: 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:7939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:7936: \"$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:7960: checking for object suffix" >&5
+echo "configure:7957: 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:7966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7963: \"$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:7990: checking for be_app in -lbe" >&5
+echo "configure:7987: 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 7998 "configure"
+#line 7995 "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:8009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8006: \"$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:8035: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "configure:8032: 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 8052 "configure"
+#line 8049 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
; return 0; }
EOF
-if { (eval echo configure:8089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8086: \"$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:8123: checking for ${OL_MKDEP} depend flag" >&5
+echo "configure:8120: 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:8133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
+ if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8130: \"$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:8166: checking for afopen in -ls" >&5
+echo "configure:8163: 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 8174 "configure"
+#line 8171 "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:8185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8182: \"$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:8229: checking for $ac_hdr" >&5
+echo "configure:8226: 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 8234 "configure"
+#line 8231 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8236: \"$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:8271: checking for lt_dlinit in -lltdl" >&5
+echo "configure:8268: 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 8279 "configure"
+#line 8276 "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:8290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8287: \"$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
# test for EBCDIC
echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
-echo "configure:8342: checking for EBCDIC" >&5
+echo "configure:8339: 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 8348 "configure"
+#line 8345 "configure"
#include "confdefs.h"
#if !('M' == 0xd4)
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8354: \"$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:8381: checking for ANSI C header files" >&5
+echo "configure:8378: 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 8386 "configure"
+#line 8383 "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:8394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8391: \"$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 8411 "configure"
+#line 8408 "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 8429 "configure"
+#line 8426 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 8450 "configure"
+#line 8447 "configure"
#include "confdefs.h"
#include <ctype.h>
#ifndef HAVE_EBCDIC
exit (0); }
EOF
-if { (eval echo configure:8468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8465: \"$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:8502: checking for $ac_hdr that defines DIR" >&5
+echo "configure:8499: 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 8507 "configure"
+#line 8504 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:8515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8512: \"$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:8540: checking for opendir in -ldir" >&5
+echo "configure:8537: 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 8548 "configure"
+#line 8545 "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:8559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8556: \"$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:8581: checking for opendir in -lx" >&5
+echo "configure:8578: 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 8589 "configure"
+#line 8586 "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:8600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8597: \"$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:8623: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:8620: 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 8628 "configure"
+#line 8625 "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:8644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8641: \"$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:8665: checking POSIX termios" >&5
+echo "configure:8662: 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 8670 "configure"
+#line 8667 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <unistd.h>
tcgetattr(0, 0);
; return 0; }
EOF
-if { (eval echo configure:8680: \"$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*
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:8696: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
+echo "configure:8693: 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 8705 "configure"
+#line 8702 "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 8725 "configure"
+#line 8722 "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:8813: checking for $ac_hdr" >&5
+echo "configure:8810: 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 8818 "configure"
+#line 8815 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8820: \"$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 sigaction sigset
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:8851: 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 8856 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+char (*f)();
+
+int main() {
-echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
-echo "configure:8853: checking for sigset in -lV3" >&5
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:8880: \"$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 "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
+ echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
+echo "configure:8907: 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 8861 "configure"
+#line 8915 "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:8872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8926: \"$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
fi
+fi
if test "$ac_cv_header_winsock_h" = yes; then
echo $ac_n "checking for winsock""... $ac_c" 1>&6
-echo "configure:8902: checking for winsock" >&5
+echo "configure:8957: checking for winsock" >&5
if eval "test \"\${ol_cv_winsock+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for curlib in ws2_32 wsock32; do
LIBS="$LIBS -l$curlib"
cat > conftest.$ac_ext <<EOF
-#line 8910 "configure"
+#line 8965 "configure"
#include "confdefs.h"
#include <winsock.h>
; return 0; }
EOF
-if { (eval echo configure:8923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8978: \"$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:8961: checking for socket" >&5
+echo "configure:9016: 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 8966 "configure"
+#line 9021 "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:8990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9045: \"$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:9009: checking for main in -lsocket" >&5
+echo "configure:9064: 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 9017 "configure"
+#line 9072 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:9024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9079: \"$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:9052: checking for main in -lnet" >&5
+echo "configure:9107: 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 9060 "configure"
+#line 9115 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:9067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9122: \"$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:9095: checking for main in -lnsl_s" >&5
+echo "configure:9150: 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 9103 "configure"
+#line 9158 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:9110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9165: \"$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:9138: checking for main in -lnsl" >&5
+echo "configure:9193: 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 9146 "configure"
+#line 9201 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:9153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9208: \"$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:9181: checking for socket in -linet" >&5
+echo "configure:9236: 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 9189 "configure"
+#line 9244 "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:9200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9255: \"$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:9228: checking for main in -lgen" >&5
+echo "configure:9283: 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 9236 "configure"
+#line 9291 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:9243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9298: \"$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:9275: checking for select" >&5
+echo "configure:9330: 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 9280 "configure"
+#line 9335 "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:9304: \"$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*
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:9327: checking types of arguments for select()" >&5
+echo "configure:9382: 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 9341 "configure"
+#line 9396 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
; return 0; }
EOF
-if { (eval echo configure:9360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_not_found=no ; break 3
else
for ac_func in poll
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9404: checking for $ac_func" >&5
+echo "configure:9459: 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 9409 "configure"
+#line 9464 "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:9433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9488: \"$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:9461: checking for $ac_hdr" >&5
+echo "configure:9516: 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 9466 "configure"
+#line 9521 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9526: \"$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:9502: checking for $ac_hdr" >&5
+echo "configure:9557: 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 9507 "configure"
+#line 9562 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9567: \"$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_sys_epoll_h}" = yes; then
echo $ac_n "checking for epoll system call""... $ac_c" 1>&6
-echo "configure:9540: checking for epoll system call" >&5
+echo "configure:9595: checking for epoll system call" >&5
if test "$cross_compiling" = yes; then
echo "$ac_t""no" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9545 "configure"
+#line 9600 "configure"
#include "confdefs.h"
int main(int argc, char *argv)
{
exit (epfd == -1 ? 1 : 0);
}
EOF
-if { (eval echo configure:9553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
# strerror checks
echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
-echo "configure:9573: checking declaration of sys_errlist" >&5
+echo "configure:9628: 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 9579 "configure"
+#line 9634 "configure"
#include "confdefs.h"
#include <stdio.h>
char *c = (char *) *sys_errlist
; return 0; }
EOF
-if { (eval echo configure:9592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9647: \"$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:9615: checking existence of sys_errlist" >&5
+echo "configure:9670: 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 9621 "configure"
+#line 9676 "configure"
#include "confdefs.h"
#include <errno.h>
int main() {
char *c = (char *) *sys_errlist
; return 0; }
EOF
-if { (eval echo configure:9628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9683: \"$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
for ac_func in strerror strerror_r
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9651: checking for $ac_func" >&5
+echo "configure:9706: 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 9656 "configure"
+#line 9711 "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:9680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9735: \"$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_strerror_r=no
if test "${ac_cv_func_strerror_r}" = yes ; then
echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6
-echo "configure:9707: checking non-posix strerror_r" >&5
+echo "configure:9762: checking non-posix strerror_r" >&5
if eval "test \"\${ol_cv_nonposix_strerror_r+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9713 "configure"
+#line 9768 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if test $ol_decl_strerror_r = yes ; then
cat > conftest.$ac_ext <<EOF
-#line 9729 "configure"
+#line 9784 "configure"
#include "confdefs.h"
#include <string.h>
int main() {
; return 0; }
EOF
-if { (eval echo configure:9740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_nonposix_strerror_r=yes
else
ol_cv_nonposix_strerror=no
else
cat > conftest.$ac_ext <<EOF
-#line 9755 "configure"
+#line 9810 "configure"
#include "confdefs.h"
main() {
}
EOF
-if { (eval echo configure:9766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ol_cv_nonposix_strerror_r=yes
else
elif test "${ac_cv_func_strerror}" = no ; then
echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
-echo "configure:9792: checking declaration of sys_errlist" >&5
+echo "configure:9847: 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 9798 "configure"
+#line 9853 "configure"
#include "confdefs.h"
#include <stdio.h>
char *c = (char *) *sys_errlist
; return 0; }
EOF
-if { (eval echo configure:9811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9866: \"$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:9834: checking existence of sys_errlist" >&5
+echo "configure:9889: 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 9840 "configure"
+#line 9895 "configure"
#include "confdefs.h"
#include <errno.h>
int main() {
char *c = (char *) *sys_errlist
; return 0; }
EOF
-if { (eval echo configure:9847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9902: \"$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
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:9875: checking for $ac_hdr" >&5
+echo "configure:9930: 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 9880 "configure"
+#line 9935 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9940: \"$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 library containing regfree""... $ac_c" 1>&6
-echo "configure:9916: checking for library containing regfree" >&5
+echo "configure:9971: checking for library containing regfree" >&5
if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_regfree="no"
cat > conftest.$ac_ext <<EOF
-#line 9923 "configure"
+#line 9978 "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
regfree()
; return 0; }
EOF
-if { (eval echo configure:9934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_regfree="none required"
else
test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 9945 "configure"
+#line 10000 "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
regfree()
; return 0; }
EOF
-if { (eval echo configure:9956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_regfree="-l$ac_lib"
break
echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
-echo "configure:9979: checking for compatible POSIX regex" >&5
+echo "configure:10034: 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 9988 "configure"
+#line 10043 "configure"
#include "confdefs.h"
#include <sys/types.h>
return rc;
}
EOF
-if { (eval echo configure:10014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10069: \"$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
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:10040: checking for $ac_hdr" >&5
+echo "configure:10095: 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 10045 "configure"
+#line 10100 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10105: \"$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"
echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
-echo "configure:10080: checking for library containing uuid_to_str" >&5
+echo "configure:10135: checking for library containing uuid_to_str" >&5
if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_uuid_to_str="no"
cat > conftest.$ac_ext <<EOF
-#line 10087 "configure"
+#line 10142 "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
uuid_to_str()
; return 0; }
EOF
-if { (eval echo configure:10098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_uuid_to_str="none required"
else
test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 10109 "configure"
+#line 10164 "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
uuid_to_str()
; return 0; }
EOF
-if { (eval echo configure:10120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_uuid_to_str="-l$ac_lib"
break
if test $have_uuid = no ; then
echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
-echo "configure:10155: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
+echo "configure:10210: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
save_LIBS="$LIBS"
LIBS="$LIBS -lrpcrt4"
cat > conftest.$ac_ext <<EOF
-#line 10159 "configure"
+#line 10214 "configure"
#include "confdefs.h"
int __stdcall UuidCreate(void *);
; return 0; }
EOF
-if { (eval echo configure:10172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
need_rpcrt=yes
else
ol_link_dnssrv=no
echo $ac_n "checking for res_query""... $ac_c" 1>&6
-echo "configure:10191: checking for res_query" >&5
+echo "configure:10246: 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 10196 "configure"
+#line 10251 "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:10220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10275: \"$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""... $ac_c" 1>&6
-echo "configure:10241: checking for __res_query" >&5
+echo "configure:10296: 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 10246 "configure"
+#line 10301 "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:10270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10325: \"$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:10294: checking for res_query in -lbind" >&5
+echo "configure:10349: 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 10302 "configure"
+#line 10357 "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:10313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10368: \"$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:10345: checking for __res_query in -lbind" >&5
+echo "configure:10400: 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 10353 "configure"
+#line 10408 "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:10364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10419: \"$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:10396: checking for res_query in -lresolv" >&5
+echo "configure:10451: 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 10404 "configure"
+#line 10459 "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:10415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10470: \"$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:10447: checking for __res_query in -lresolv" >&5
+echo "configure:10502: 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 10455 "configure"
+#line 10510 "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:10466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10521: \"$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_9_query in -lresolv""... $ac_c" 1>&6
-echo "configure:10498: checking for _res_9_query in -lresolv" >&5
+echo "configure:10553: checking for _res_9_query in -lresolv" >&5
ac_lib_var=`echo resolv'_'_res_9_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 10506 "configure"
+#line 10561 "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_9_query()
; return 0; }
EOF
-if { (eval echo configure:10517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10572: \"$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 hstrerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:10565: checking for $ac_func" >&5
+echo "configure:10620: 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 10570 "configure"
+#line 10625 "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:10594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10649: \"$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 getaddrinfo getnameinfo gai_strerror inet_ntop
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:10622: checking for $ac_func" >&5
+echo "configure:10677: 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 10627 "configure"
+#line 10682 "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:10651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10706: \"$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
fi
elif test $ol_enable_ipv6 != no ; then
echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
-echo "configure:10683: checking INET6_ADDRSTRLEN" >&5
+echo "configure:10738: checking INET6_ADDRSTRLEN" >&5
if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10689 "configure"
+#line 10744 "configure"
#include "confdefs.h"
# include <netinet/in.h>
echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
-echo "configure:10714: checking struct sockaddr_storage" >&5
+echo "configure:10769: checking struct sockaddr_storage" >&5
if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10720 "configure"
+#line 10775 "configure"
#include "confdefs.h"
#include <sys/types.h>
; return 0; }
EOF
-if { (eval echo configure:10732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_struct_sockaddr_storage=yes
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:10763: checking for $ac_hdr" >&5
+echo "configure:10818: 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 10768 "configure"
+#line 10823 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10828: \"$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:10819: checking for $ac_hdr" >&5
+echo "configure:10874: 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 10824 "configure"
+#line 10879 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10884: \"$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:10861: checking for $ac_hdr" >&5
+echo "configure:10916: 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 10866 "configure"
+#line 10921 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10926: \"$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 -lk5crypto""... $ac_c" 1>&6
-echo "configure:10905: checking for main in -lk5crypto" >&5
+echo "configure:10960: checking for main in -lk5crypto" >&5
ac_lib_var=`echo k5crypto'_'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="-lk5crypto $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 10913 "configure"
+#line 10968 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:10920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10975: \"$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 main in -lkrb5""... $ac_c" 1>&6
-echo "configure:10943: checking for main in -lkrb5" >&5
+echo "configure:10998: 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 -l$krb5crypto -lcom_err $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 10951 "configure"
+#line 11006 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:10958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11013: \"$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 -ldes""... $ac_c" 1>&6
-echo "configure:10983: checking for main in -ldes" >&5
+echo "configure:11038: checking for main in -ldes" >&5
ac_lib_var=`echo des'_'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="-ldes $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 10991 "configure"
+#line 11046 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:10998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11053: \"$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 main in -lkrb5""... $ac_c" 1>&6
-echo "configure:11021: checking for main in -lkrb5" >&5
+echo "configure:11076: 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 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 11029 "configure"
+#line 11084 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:11036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11091: \"$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:11095: checking for $ac_hdr" >&5
+echo "configure:11150: 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 11100 "configure"
+#line 11155 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11160: \"$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:11135: checking for main in -lkrb4" >&5
+echo "configure:11190: 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 -l$krb5crypto -lcom_err $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 11143 "configure"
+#line 11198 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:11150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11205: \"$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:11175: checking for main in -lkrb4" >&5
+echo "configure:11230: 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 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 11183 "configure"
+#line 11238 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:11190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11245: \"$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:11232: checking for des_debug in Kerberos libraries" >&5
+echo "configure:11287: 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 11240 "configure"
+#line 11295 "configure"
#include "confdefs.h"
#include <kerberosIV/krb.h>
; return 0; }
EOF
-if { (eval echo configure:11253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11308: \"$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:11292: checking for $ac_hdr" >&5
+echo "configure:11347: 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 11297 "configure"
+#line 11352 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11357: \"$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:11331: checking for main in -lkrb" >&5
+echo "configure:11386: 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 11339 "configure"
+#line 11394 "configure"
#include "confdefs.h"
int main() {
main()
; 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:11401: \"$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:11413: checking for $ac_hdr" >&5
+echo "configure:11468: 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 11418 "configure"
+#line 11473 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11423: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11478: \"$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:11453: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
+echo "configure:11508: 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 11461 "configure"
+#line 11516 "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:11472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11527: \"$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:11497: checking for SSL_library_init in -lssl" >&5
+echo "configure:11552: 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 11505 "configure"
+#line 11560 "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:11516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11571: \"$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:11542: checking for ssl3_accept in -lssl" >&5
+echo "configure:11597: 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 11550 "configure"
+#line 11605 "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:11561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11616: \"$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
fi
echo $ac_n "checking OpenSSL library version (CRL checking capability)""... $ac_c" 1>&6
-echo "configure:11606: checking OpenSSL library version (CRL checking capability)" >&5
+echo "configure:11661: checking OpenSSL library version (CRL checking capability)" >&5
if eval "test \"\${ol_cv_ssl_crl_compat+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 11612 "configure"
+#line 11667 "configure"
#include "confdefs.h"
#ifdef HAVE_OPENSSL_SSL_H
echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
-echo "configure:11689: checking for _beginthread" >&5
+echo "configure:11744: 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 11694 "configure"
+#line 11749 "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:11718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11773: \"$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:11774: checking for $ac_hdr" >&5
+echo "configure:11829: 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 11779 "configure"
+#line 11834 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11839: \"$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:11813: checking POSIX thread version" >&5
+echo "configure:11868: 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 11819 "configure"
+#line 11874 "configure"
#include "confdefs.h"
# include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:11830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 11834 "configure"
+#line 11889 "configure"
#include "confdefs.h"
#include <pthread.h>
EOF
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 11854 "configure"
+#line 11909 "configure"
#include "confdefs.h"
# include <pthread.h>
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 11871 "configure"
+#line 11926 "configure"
#include "confdefs.h"
#include <pthread.h>
EOF
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 11883 "configure"
+#line 11938 "configure"
#include "confdefs.h"
# include <pthread.h>
echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
-echo "configure:11930: checking for LinuxThreads pthread.h" >&5
+echo "configure:11985: 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 11935 "configure"
+#line 11990 "configure"
#include "confdefs.h"
#include <pthread.h>
EOF
echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
-echo "configure:11962: checking for GNU Pth pthread.h" >&5
+echo "configure:12017: 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 11967 "configure"
+#line 12022 "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:11996: checking for $ac_hdr" >&5
+echo "configure:12051: 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 12001 "configure"
+#line 12056 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12061: \"$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:12036: checking for pthread_create in default libraries" >&5
+echo "configure:12091: 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 12043 "configure"
+#line 12098 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:12110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12165: \"$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 12122 "configure"
+#line 12177 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:12194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12249: \"$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:12219: checking for pthread link with -kthread" >&5
+echo "configure:12274: 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 12230 "configure"
+#line 12285 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:12297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12352: \"$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 12309 "configure"
+#line 12364 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:12381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12436: \"$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:12411: checking for pthread link with -pthread" >&5
+echo "configure:12466: 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 12422 "configure"
+#line 12477 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:12489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12544: \"$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 12501 "configure"
+#line 12556 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:12573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12628: \"$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:12603: checking for pthread link with -pthreads" >&5
+echo "configure:12658: 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 12614 "configure"
+#line 12669 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:12681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12736: \"$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 12693 "configure"
+#line 12748 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:12765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:12820: \"$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:12795: checking for pthread link with -mthreads" >&5
+echo "configure:12850: 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 12806 "configure"
+#line 12861 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:12873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12928: \"$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 12885 "configure"
+#line 12940 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:12957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:13012: \"$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:12987: checking for pthread link with -thread" >&5
+echo "configure:13042: 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 12998 "configure"
+#line 13053 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:13065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13120: \"$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 13077 "configure"
+#line 13132 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:13149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:13204: \"$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:13180: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
+echo "configure:13235: 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 13191 "configure"
+#line 13246 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:13258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13313: \"$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 13270 "configure"
+#line 13325 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:13342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:13397: \"$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:13372: checking for pthread link with -lpthread -lmach -lexc" >&5
+echo "configure:13427: 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 13383 "configure"
+#line 13438 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:13450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13505: \"$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 13462 "configure"
+#line 13517 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:13534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:13589: \"$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:13565: checking for pthread link with -lpthread -Wl,-woff,85" >&5
+echo "configure:13620: 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 13576 "configure"
+#line 13631 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:13643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13698: \"$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 13655 "configure"
+#line 13710 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:13727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:13782: \"$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:13758: checking for pthread link with -lpthread" >&5
+echo "configure:13813: 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 13769 "configure"
+#line 13824 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:13836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13891: \"$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 13848 "configure"
+#line 13903 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:13920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:13975: \"$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:13950: checking for pthread link with -lc_r" >&5
+echo "configure:14005: 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 13961 "configure"
+#line 14016 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:14028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14083: \"$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 14040 "configure"
+#line 14095 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:14112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:14167: \"$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:14143: checking for pthread link with -threads" >&5
+echo "configure:14198: 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 14154 "configure"
+#line 14209 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:14221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14276: \"$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 14233 "configure"
+#line 14288 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:14305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:14360: \"$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:14336: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
+echo "configure:14391: 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 14347 "configure"
+#line 14402 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:14414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14469: \"$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 14426 "configure"
+#line 14481 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:14498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:14553: \"$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:14528: checking for pthread link with -lpthreads -lmach -lexc" >&5
+echo "configure:14583: 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 14539 "configure"
+#line 14594 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:14606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14661: \"$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 14618 "configure"
+#line 14673 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:14690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:14745: \"$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:14720: checking for pthread link with -lpthreads -lexc" >&5
+echo "configure:14775: 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 14731 "configure"
+#line 14786 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:14798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14853: \"$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 14810 "configure"
+#line 14865 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:14882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:14937: \"$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:14913: checking for pthread link with -lpthreads" >&5
+echo "configure:14968: 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 14924 "configure"
+#line 14979 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
; return 0; }
EOF
-if { (eval echo configure:14991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15046: \"$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 15003 "configure"
+#line 15058 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:15075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:15130: \"$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 thr_yield
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15112: checking for $ac_func" >&5
+echo "configure:15167: 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 15117 "configure"
+#line 15172 "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:15141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15196: \"$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
$ac_cv_func_pthread_yield = no -a \
$ac_cv_func_thr_yield = no ; then
echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
-echo "configure:15170: checking for sched_yield in -lrt" >&5
+echo "configure:15225: 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 15178 "configure"
+#line 15233 "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:15189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15244: \"$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 pthread_kill pthread_rwlock_destroy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15225: checking for $ac_func" >&5
+echo "configure:15280: 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 15230 "configure"
+#line 15285 "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:15254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15309: \"$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:15280: checking for pthread_detach with <pthread.h>" >&5
+echo "configure:15335: 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 15286 "configure"
+#line 15341 "configure"
#include "confdefs.h"
#include <pthread.h>
pthread_detach(NULL);
; return 0; }
EOF
-if { (eval echo configure:15298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15353: \"$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:15330: checking for $ac_func" >&5
+echo "configure:15385: 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 15335 "configure"
+#line 15390 "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:15359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15414: \"$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_other_threads_np
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:15388: checking for $ac_func" >&5
+echo "configure:15443: 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 15393 "configure"
+#line 15448 "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:15417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15472: \"$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
done
echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
-echo "configure:15442: checking for LinuxThreads implementation" >&5
+echo "configure:15497: 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:15455: checking for LinuxThreads consistency" >&5
+echo "configure:15510: 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:15480: checking if pthread_create() works" >&5
+echo "configure:15535: 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 15489 "configure"
+#line 15544 "configure"
#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
}
EOF
-if { (eval echo configure:15561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:15616: \"$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:15583: checking if select yields when using pthreads" >&5
+echo "configure:15638: 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 15592 "configure"
+#line 15647 "configure"
#include "confdefs.h"
#include <sys/types.h>
exit(2);
}
EOF
-if { (eval echo configure:15669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:15724: \"$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:15713: checking for $ac_hdr" >&5
+echo "configure:15768: 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 15718 "configure"
+#line 15773 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:15723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:15778: \"$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:15753: checking for cthread_fork" >&5
+echo "configure:15808: 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 15758 "configure"
+#line 15813 "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:15782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15837: \"$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:15804: checking for cthread_fork with -all_load" >&5
+echo "configure:15859: 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 15812 "configure"
+#line 15867 "configure"
#include "confdefs.h"
#include <mach/cthreads.h>
int main() {
; return 0; }
EOF
-if { (eval echo configure:15821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15876: \"$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
save_LIBS="$LIBS"
LIBS="$LIBS -lthreads"
echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
-echo "configure:15851: checking for cthread_fork" >&5
+echo "configure:15906: 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 15856 "configure"
+#line 15911 "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:15880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15935: \"$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
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:15930: checking for $ac_hdr" >&5
+echo "configure:15985: 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 15935 "configure"
+#line 15990 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:15940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:15995: \"$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:15969: checking for pth_version in -lpth" >&5
+echo "configure:16024: 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 15977 "configure"
+#line 16032 "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:15988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16043: \"$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:16033: checking for $ac_hdr" >&5
+echo "configure:16088: 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 16038 "configure"
+#line 16093 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:16043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:16098: \"$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:16071: checking for thr_create in -lthread" >&5
+echo "configure:16126: 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 16079 "configure"
+#line 16134 "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:16090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16145: \"$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:16130: checking for $ac_func" >&5
+echo "configure:16185: 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 16135 "configure"
+#line 16190 "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:16159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16214: \"$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:16190: checking for $ac_hdr" >&5
+echo "configure:16245: 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 16195 "configure"
+#line 16250 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:16200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:16255: \"$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:16228: checking for lwp_create in -llwp" >&5
+echo "configure:16283: 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 16236 "configure"
+#line 16291 "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:16247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16302: \"$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:16300: checking for $ac_hdr" >&5
+echo "configure:16355: 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 16305 "configure"
+#line 16360 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:16310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:16365: \"$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:16339: checking for $ac_func" >&5
+echo "configure:16394: 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 16344 "configure"
+#line 16399 "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:16368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16423: \"$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:16394: checking for LinuxThreads pthread.h" >&5
+echo "configure:16449: 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 16399 "configure"
+#line 16454 "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:16429: checking for $ac_hdr" >&5
+echo "configure:16484: 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 16434 "configure"
+#line 16489 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:16439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:16494: \"$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:16469: checking for $ac_hdr" >&5
+echo "configure:16524: 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 16474 "configure"
+#line 16529 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:16479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:16534: \"$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:16509: checking for $ac_hdr" >&5
+echo "configure:16564: 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 16514 "configure"
+#line 16569 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:16519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:16574: \"$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:16578: checking for thread specific errno" >&5
+echo "configure:16633: 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 16584 "configure"
+#line 16639 "configure"
#include "confdefs.h"
#include <errno.h>
int main() {
errno = 0;
; return 0; }
EOF
-if { (eval echo configure:16591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16646: \"$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:16607: checking for thread specific h_errno" >&5
+echo "configure:16662: 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 16613 "configure"
+#line 16668 "configure"
#include "confdefs.h"
#include <netdb.h>
int main() {
h_errno = 0;
; return 0; }
EOF
-if { (eval echo configure:16620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16675: \"$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
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:16673: checking for $ac_func" >&5
+echo "configure:16728: 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 16678 "configure"
+#line 16733 "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:16702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16757: \"$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:16731: checking number of arguments of ctime_r" >&5
+echo "configure:16786: 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 16736 "configure"
+#line 16791 "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:16743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:16798: \"$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 16755 "configure"
+#line 16810 "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:16762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:16817: \"$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:16802: checking number of arguments of gethostbyname_r" >&5
+echo "configure:16857: 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 16807 "configure"
+#line 16862 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
buffer, bufsize, &h_errno);
; return 0; }
EOF
-if { (eval echo configure:16821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:16876: \"$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 16833 "configure"
+#line 16888 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
&rhent, &h_errno);
; return 0; }
EOF
-if { (eval echo configure:16848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:16903: \"$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:16889: checking number of arguments of gethostbyaddr_r" >&5
+echo "configure:16944: 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 16894 "configure"
+#line 16949 "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:16910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:16965: \"$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 16922 "configure"
+#line 16977 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
&rhent, &h_errno);
; return 0; }
EOF
-if { (eval echo configure:16940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:16995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_func_gethostbyaddr_r_nargs8=yes
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:16990: checking for $ac_hdr" >&5
+echo "configure:17045: 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 16995 "configure"
+#line 17050 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:17000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:17055: \"$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:17028: checking if Berkeley DB header compatibility" >&5
+echo "configure:17083: 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 17034 "configure"
+#line 17089 "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:17071: checking for Berkeley DB link (default)" >&5
+echo "configure:17126: 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 $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 17081 "configure"
+#line 17136 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:17128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17183: \"$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 (-ldb43)""... $ac_c" 1>&6
-echo "configure:17152: checking for Berkeley DB link (-ldb43)" >&5
+echo "configure:17207: checking for Berkeley DB link (-ldb43)" >&5
if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 17162 "configure"
+#line 17217 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:17209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db43=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
-echo "configure:17233: checking for Berkeley DB link (-ldb-43)" >&5
+echo "configure:17288: checking for Berkeley DB link (-ldb-43)" >&5
if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 17243 "configure"
+#line 17298 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:17290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_43=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
-echo "configure:17314: checking for Berkeley DB link (-ldb-4.3)" >&5
+echo "configure:17369: checking for Berkeley DB link (-ldb-4.3)" >&5
if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 17324 "configure"
+#line 17379 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:17371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_4_dot_3=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
-echo "configure:17395: checking for Berkeley DB link (-ldb-4-3)" >&5
+echo "configure:17450: checking for Berkeley DB link (-ldb-4-3)" >&5
if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 17405 "configure"
+#line 17460 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:17452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_4_3=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
-echo "configure:17476: checking for Berkeley DB link (-ldb42)" >&5
+echo "configure:17531: checking for Berkeley DB link (-ldb42)" >&5
if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 17486 "configure"
+#line 17541 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:17533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db42=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
-echo "configure:17557: checking for Berkeley DB link (-ldb-42)" >&5
+echo "configure:17612: checking for Berkeley DB link (-ldb-42)" >&5
if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 17567 "configure"
+#line 17622 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:17614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_42=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
-echo "configure:17638: checking for Berkeley DB link (-ldb-4.2)" >&5
+echo "configure:17693: checking for Berkeley DB link (-ldb-4.2)" >&5
if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 17648 "configure"
+#line 17703 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:17695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_4_dot_2=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
-echo "configure:17719: checking for Berkeley DB link (-ldb-4-2)" >&5
+echo "configure:17774: checking for Berkeley DB link (-ldb-4-2)" >&5
if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 17729 "configure"
+#line 17784 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:17776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_4_2=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
-echo "configure:17800: checking for Berkeley DB link (-ldb-4)" >&5
+echo "configure:17855: checking for Berkeley DB link (-ldb-4)" >&5
if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 17810 "configure"
+#line 17865 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:17857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_4=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
-echo "configure:17881: checking for Berkeley DB link (-ldb4)" >&5
+echo "configure:17936: checking for Berkeley DB link (-ldb4)" >&5
if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 17891 "configure"
+#line 17946 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:17938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db4=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:17962: checking for Berkeley DB link (-ldb)" >&5
+echo "configure:18017: 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 $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 17972 "configure"
+#line 18027 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:18019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18074: \"$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 (-ldb41)""... $ac_c" 1>&6
-echo "configure:18043: checking for Berkeley DB link (-ldb41)" >&5
+echo "configure:18098: checking for Berkeley DB link (-ldb41)" >&5
if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 18053 "configure"
+#line 18108 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:18100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db41=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
-echo "configure:18124: checking for Berkeley DB link (-ldb-41)" >&5
+echo "configure:18179: checking for Berkeley DB link (-ldb-41)" >&5
if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 18134 "configure"
+#line 18189 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:18181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_41=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
-echo "configure:18205: checking for Berkeley DB link (-ldb-4.1)" >&5
+echo "configure:18260: checking for Berkeley DB link (-ldb-4.1)" >&5
if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 18215 "configure"
+#line 18270 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:18262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_4_dot_1=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
-echo "configure:18286: checking for Berkeley DB link (-ldb-4-1)" >&5
+echo "configure:18341: checking for Berkeley DB link (-ldb-4-1)" >&5
if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 18296 "configure"
+#line 18351 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:18343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_4_1=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:18367: checking for Berkeley DB link (-ldb3)" >&5
+echo "configure:18422: 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 $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 18377 "configure"
+#line 18432 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:18424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18479: \"$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 (-ldb-3)""... $ac_c" 1>&6
-echo "configure:18448: checking for Berkeley DB link (-ldb-3)" >&5
+echo "configure:18503: checking for Berkeley DB link (-ldb-3)" >&5
if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 18458 "configure"
+#line 18513 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:18505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_3=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:18529: checking for Berkeley DB link (-ldb2)" >&5
+echo "configure:18584: 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 $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 18539 "configure"
+#line 18594 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:18586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18641: \"$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 (-ldb-2)""... $ac_c" 1>&6
-echo "configure:18610: checking for Berkeley DB link (-ldb-2)" >&5
+echo "configure:18665: checking for Berkeley DB link (-ldb-2)" >&5
if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 18620 "configure"
+#line 18675 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:18667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_2=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:18691: checking for Berkeley DB link (-ldb1)" >&5
+echo "configure:18746: 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 $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 18701 "configure"
+#line 18756 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:18748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18803: \"$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
echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
-echo "configure:18772: checking for Berkeley DB link (-ldb-1)" >&5
+echo "configure:18827: checking for Berkeley DB link (-ldb-1)" >&5
if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 18782 "configure"
+#line 18837 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:18829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:18884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_1=yes
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:18864: checking for $ac_hdr" >&5
+echo "configure:18919: 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 18869 "configure"
+#line 18924 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:18874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:18929: \"$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:18904: checking for Berkeley DB link (default)" >&5
+echo "configure:18959: 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 $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 18914 "configure"
+#line 18969 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:18961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19016: \"$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 (-ldb43)""... $ac_c" 1>&6
-echo "configure:18985: checking for Berkeley DB link (-ldb43)" >&5
+echo "configure:19040: checking for Berkeley DB link (-ldb43)" >&5
if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 18995 "configure"
+#line 19050 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:19042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db43=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
-echo "configure:19066: checking for Berkeley DB link (-ldb-43)" >&5
+echo "configure:19121: checking for Berkeley DB link (-ldb-43)" >&5
if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 19076 "configure"
+#line 19131 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:19123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_43=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
-echo "configure:19147: checking for Berkeley DB link (-ldb-4.3)" >&5
+echo "configure:19202: checking for Berkeley DB link (-ldb-4.3)" >&5
if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 19157 "configure"
+#line 19212 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:19204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_4_dot_3=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
-echo "configure:19228: checking for Berkeley DB link (-ldb-4-3)" >&5
+echo "configure:19283: checking for Berkeley DB link (-ldb-4-3)" >&5
if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 19238 "configure"
+#line 19293 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:19285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_4_3=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
-echo "configure:19309: checking for Berkeley DB link (-ldb42)" >&5
+echo "configure:19364: checking for Berkeley DB link (-ldb42)" >&5
if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 19319 "configure"
+#line 19374 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:19366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db42=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
-echo "configure:19390: checking for Berkeley DB link (-ldb-42)" >&5
+echo "configure:19445: checking for Berkeley DB link (-ldb-42)" >&5
if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 19400 "configure"
+#line 19455 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:19447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_42=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
-echo "configure:19471: checking for Berkeley DB link (-ldb-4.2)" >&5
+echo "configure:19526: checking for Berkeley DB link (-ldb-4.2)" >&5
if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 19481 "configure"
+#line 19536 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:19528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_4_dot_2=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
-echo "configure:19552: checking for Berkeley DB link (-ldb-4-2)" >&5
+echo "configure:19607: checking for Berkeley DB link (-ldb-4-2)" >&5
if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 19562 "configure"
+#line 19617 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:19609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_4_2=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
-echo "configure:19633: checking for Berkeley DB link (-ldb-4)" >&5
+echo "configure:19688: checking for Berkeley DB link (-ldb-4)" >&5
if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 19643 "configure"
+#line 19698 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:19690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_4=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
-echo "configure:19714: checking for Berkeley DB link (-ldb4)" >&5
+echo "configure:19769: checking for Berkeley DB link (-ldb4)" >&5
if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 19724 "configure"
+#line 19779 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:19771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db4=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:19795: checking for Berkeley DB link (-ldb)" >&5
+echo "configure:19850: 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 $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 19805 "configure"
+#line 19860 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:19852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19907: \"$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 (-ldb41)""... $ac_c" 1>&6
-echo "configure:19876: checking for Berkeley DB link (-ldb41)" >&5
+echo "configure:19931: checking for Berkeley DB link (-ldb41)" >&5
if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 19886 "configure"
+#line 19941 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:19933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db41=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
-echo "configure:19957: checking for Berkeley DB link (-ldb-41)" >&5
+echo "configure:20012: checking for Berkeley DB link (-ldb-41)" >&5
if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 19967 "configure"
+#line 20022 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:20014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_41=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
-echo "configure:20038: checking for Berkeley DB link (-ldb-4.1)" >&5
+echo "configure:20093: checking for Berkeley DB link (-ldb-4.1)" >&5
if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 20048 "configure"
+#line 20103 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:20095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_4_dot_1=yes
else
if test $ol_cv_lib_db = no ; then
echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
-echo "configure:20119: checking for Berkeley DB link (-ldb-4-1)" >&5
+echo "configure:20174: checking for Berkeley DB link (-ldb-4-1)" >&5
if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 20129 "configure"
+#line 20184 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:20176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_4_1=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:20200: checking for Berkeley DB link (-ldb3)" >&5
+echo "configure:20255: 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 $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 20210 "configure"
+#line 20265 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:20257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20312: \"$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 (-ldb-3)""... $ac_c" 1>&6
-echo "configure:20281: checking for Berkeley DB link (-ldb-3)" >&5
+echo "configure:20336: checking for Berkeley DB link (-ldb-3)" >&5
if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 20291 "configure"
+#line 20346 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:20338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_3=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:20362: checking for Berkeley DB link (-ldb2)" >&5
+echo "configure:20417: 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 $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 20372 "configure"
+#line 20427 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:20419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20474: \"$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 (-ldb-2)""... $ac_c" 1>&6
-echo "configure:20443: checking for Berkeley DB link (-ldb-2)" >&5
+echo "configure:20498: checking for Berkeley DB link (-ldb-2)" >&5
if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 20453 "configure"
+#line 20508 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:20500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_2=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:20524: checking for Berkeley DB link (-ldb1)" >&5
+echo "configure:20579: 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 $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 20534 "configure"
+#line 20589 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:20581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20636: \"$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
echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
-echo "configure:20605: checking for Berkeley DB link (-ldb-1)" >&5
+echo "configure:20660: checking for Berkeley DB link (-ldb-1)" >&5
if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 20615 "configure"
+#line 20670 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
; return 0; }
EOF
-if { (eval echo configure:20662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_db_db_1=yes
else
if test "$ol_cv_lib_db" != no ; then
ol_cv_berkeley_db=yes
echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
-echo "configure:20688: checking for Berkeley DB version match" >&5
+echo "configure:20743: checking for Berkeley DB version match" >&5
if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ol_cv_berkeley_db_version=cross
else
cat > conftest.$ac_ext <<EOF
-#line 20703 "configure"
+#line 20758 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
version = db_version( &major, &minor, &patch );
- if( major != DB_VERSION_MAJOR || minor < DB_VERSION_MINOR ) {
+ if( major != DB_VERSION_MAJOR ||
+ minor != DB_VERSION_MINOR ||
+ patch != DB_VERSION_PATCH )
+ {
printf("Berkeley DB version mismatch\n"
"\theader: %s\n\tlibrary: %s\n",
DB_VERSION_STRING, version);
return 0;
}
EOF
-if { (eval echo configure:20736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:20794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ol_cv_berkeley_db_version=yes
else
fi
echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
-echo "configure:20760: checking for Berkeley DB thread support" >&5
+echo "configure:20818: 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 20775 "configure"
+#line 20833 "configure"
#include "confdefs.h"
#ifdef HAVE_DB_185_H
return rc;
}
EOF
-if { (eval echo configure:20842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:20900: \"$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
{ echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
else
echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
-echo "configure:20905: checking Berkeley DB version for BDB backend" >&5
+echo "configure:20963: checking Berkeley DB version for BDB backend" >&5
if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 20911 "configure"
+#line 20969 "configure"
#include "confdefs.h"
#include <db.h>
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:20958: checking for MDBM library" >&5
+echo "configure:21016: 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:20964: checking for mdbm_set_chain" >&5
+echo "configure:21022: 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 20969 "configure"
+#line 21027 "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:20993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21051: \"$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:21012: checking for mdbm_set_chain in -lmdbm" >&5
+echo "configure:21070: 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 21020 "configure"
+#line 21078 "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:21031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21089: \"$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:21066: checking for $ac_hdr" >&5
+echo "configure:21124: 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 21071 "configure"
+#line 21129 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:21076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:21134: \"$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:21103: checking for db" >&5
+echo "configure:21161: 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:21136: checking for GDBM library" >&5
+echo "configure:21194: 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:21142: checking for gdbm_open" >&5
+echo "configure:21200: 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 21147 "configure"
+#line 21205 "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:21171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21229: \"$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:21190: checking for gdbm_open in -lgdbm" >&5
+echo "configure:21248: 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 21198 "configure"
+#line 21256 "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:21209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21267: \"$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:21244: checking for $ac_hdr" >&5
+echo "configure:21302: 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 21249 "configure"
+#line 21307 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:21254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:21312: \"$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:21281: checking for db" >&5
+echo "configure:21339: 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:21315: checking for NDBM library" >&5
+echo "configure:21373: 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:21321: checking for dbm_open" >&5
+echo "configure:21379: 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 21326 "configure"
+#line 21384 "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:21350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21408: \"$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:21369: checking for dbm_open in -lndbm" >&5
+echo "configure:21427: 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 21377 "configure"
+#line 21435 "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:21388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21446: \"$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:21408: checking for dbm_open in -ldbm" >&5
+echo "configure:21466: 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 21416 "configure"
+#line 21474 "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:21427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21485: \"$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:21464: checking for $ac_hdr" >&5
+echo "configure:21522: 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 21469 "configure"
+#line 21527 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:21474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:21532: \"$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:21501: checking for db" >&5
+echo "configure:21559: checking for db" >&5
if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:21561: checking for $ac_hdr" >&5
+echo "configure:21619: 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 21566 "configure"
+#line 21624 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:21571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:21629: \"$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*
EOF
echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
-echo "configure:21593: checking for TCP wrappers library" >&5
+echo "configure:21651: checking for TCP wrappers library" >&5
save_LIBS="$LIBS"
LIBS="$LIBS -lwrap"
cat > conftest.$ac_ext <<EOF
-#line 21597 "configure"
+#line 21655 "configure"
#include "confdefs.h"
#include <tcpd.h>
; return 0; }
EOF
-if { (eval echo configure:21612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""-lwrap" 1>&6
have_wrappers=yes
LIBS="$LIBS -lnsl"
cat > conftest.$ac_ext <<EOF
-#line 21624 "configure"
+#line 21682 "configure"
#include "confdefs.h"
#include <tcpd.h>
; return 0; }
EOF
-if { (eval echo configure:21639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""-lwrap -lnsl" 1>&6
have_wrappers=yes
if test $ol_enable_syslog != no ; then
echo $ac_n "checking for openlog""... $ac_c" 1>&6
-echo "configure:21679: checking for openlog" >&5
+echo "configure:21737: 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 21684 "configure"
+#line 21742 "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:21708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21766: \"$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:21740: checking for $ac_hdr" >&5
+echo "configure:21798: 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 21745 "configure"
+#line 21803 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:21750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:21808: \"$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 SQLDriverConnect in -liodbc""... $ac_c" 1>&6
-echo "configure:21780: checking for SQLDriverConnect in -liodbc" >&5
+echo "configure:21838: checking for SQLDriverConnect in -liodbc" >&5
ac_lib_var=`echo iodbc'_'SQLDriverConnect | 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="-liodbc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 21788 "configure"
+#line 21846 "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
SQLDriverConnect()
; return 0; }
EOF
-if { (eval echo configure:21799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21857: \"$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_link_sql="-liodbc"
else
echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
-echo "configure:21824: checking for SQLDriverConnect in -lodbc" >&5
+echo "configure:21882: checking for SQLDriverConnect in -lodbc" >&5
ac_lib_var=`echo odbc'_'SQLDriverConnect | 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="-lodbc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 21832 "configure"
+#line 21890 "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
SQLDriverConnect()
; return 0; }
EOF
-if { (eval echo configure:21843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21901: \"$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:21885: checking for $ac_hdr" >&5
+echo "configure:21943: 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 21890 "configure"
+#line 21948 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:21895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:21953: \"$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_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
-echo "configure:21924: checking for sasl_client_init in -lsasl2" >&5
+echo "configure:21982: checking for sasl_client_init in -lsasl2" >&5
ac_lib_var=`echo sasl2'_'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="-lsasl2 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 21932 "configure"
+#line 21990 "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:21943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22001: \"$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_t""no" 1>&6
echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
-echo "configure:21962: checking for sasl_client_init in -lsasl" >&5
+echo "configure:22020: 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 21970 "configure"
+#line 22028 "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:21981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22039: \"$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
else
echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
-echo "configure:22017: checking Cyrus SASL library version" >&5
+echo "configure:22075: checking Cyrus SASL library version" >&5
if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 22023 "configure"
+#line 22081 "configure"
#include "confdefs.h"
#ifdef HAVE_SASL_SASL_H
ac_save_LIBS="$LIBS"
LIBS="$LIBS $ol_link_sasl"
echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
-echo "configure:22072: checking for sasl_version" >&5
+echo "configure:22130: checking for sasl_version" >&5
if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 22077 "configure"
+#line 22135 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char sasl_version(); below. */
; return 0; }
EOF
-if { (eval echo configure:22101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_sasl_version=yes"
else
ol_LIBS=$LIBS
LIBS="-lfetch -lcom_err $LIBS"
echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
-echo "configure:22162: checking fetch(3) library" >&5
+echo "configure:22220: 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 22168 "configure"
+#line 22226 "configure"
#include "confdefs.h"
#include <sys/param.h>
struct url *u = fetchParseURL("file:///");
; return 0; }
EOF
-if { (eval echo configure:22178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_lib_fetch=yes
else
LIBS="$TLS_LIBS $LIBS"
echo $ac_n "checking for crypt""... $ac_c" 1>&6
-echo "configure:22215: checking for crypt" >&5
+echo "configure:22273: 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 22220 "configure"
+#line 22278 "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:22244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22302: \"$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
LIBS="$save_LIBS"
echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:22264: checking for crypt in -lcrypt" >&5
+echo "configure:22322: 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 22272 "configure"
+#line 22330 "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:22283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22341: \"$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:22328: checking for setproctitle" >&5
+echo "configure:22386: 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 22333 "configure"
+#line 22391 "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:22357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22415: \"$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:22376: checking for setproctitle in -lutil" >&5
+echo "configure:22434: 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 22384 "configure"
+#line 22442 "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:22395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22453: \"$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:22435: checking for $ac_hdr" >&5
+echo "configure:22493: 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 22440 "configure"
+#line 22498 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:22445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:22503: \"$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_slp_h = yes ; then
echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
-echo "configure:22474: checking for SLPOpen in -lslp" >&5
+echo "configure:22532: checking for SLPOpen in -lslp" >&5
ac_lib_var=`echo slp'_'SLPOpen | 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="-lslp $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 22482 "configure"
+#line 22540 "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
SLPOpen()
; return 0; }
EOF
-if { (eval echo configure:22493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22551: \"$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:22535: checking for $ac_hdr" >&5
+echo "configure:22593: 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 22540 "configure"
+#line 22598 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:22545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:22603: \"$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:22575: checking for $ac_hdr" >&5
+echo "configure:22633: 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 22580 "configure"
+#line 22638 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:22585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:22643: \"$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:22615: checking for $ac_hdr" >&5
+echo "configure:22673: 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 22620 "configure"
+#line 22678 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:22625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:22683: \"$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_gmp_h = yes ; then
echo $ac_n "checking for __gmpz_add_ui in -lgmp""... $ac_c" 1>&6
-echo "configure:22674: checking for __gmpz_add_ui in -lgmp" >&5
+echo "configure:22732: checking for __gmpz_add_ui in -lgmp" >&5
ac_lib_var=`echo gmp'_'__gmpz_add_ui | 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="-lgmp $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 22682 "configure"
+#line 22740 "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
__gmpz_add_ui()
; return 0; }
EOF
-if { (eval echo configure:22693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22751: \"$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 multiple precision support""... $ac_c" 1>&6
-echo "configure:22720: checking for multiple precision support" >&5
+echo "configure:22778: checking for multiple precision support" >&5
ol_mp_support="none"
case "$ol_with_multiple_precision" in
echo $ac_n "checking long long""... $ac_c" 1>&6
-echo "configure:22779: checking long long" >&5
+echo "configure:22837: checking long long" >&5
if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 22785 "configure"
+#line 22843 "configure"
#include "confdefs.h"
int main() {
long long x;
; return 0; }
EOF
-if { (eval echo configure:22792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:22850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_type_long_long=yes
else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:22813: checking for ANSI C header files" >&5
+echo "configure:22871: 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 22818 "configure"
+#line 22876 "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:22826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:22884: \"$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 22843 "configure"
+#line 22901 "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 22861 "configure"
+#line 22919 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 22882 "configure"
+#line 22940 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
exit (0); }
EOF
-if { (eval echo configure:22900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:22958: \"$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:22924: checking for mode_t" >&5
+echo "configure:22982: 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 22929 "configure"
+#line 22987 "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:22960: checking for off_t" >&5
+echo "configure:23018: 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 22965 "configure"
+#line 23023 "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:22996: checking for pid_t" >&5
+echo "configure:23054: 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 23001 "configure"
+#line 23059 "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:23032: checking for ptrdiff_t" >&5
+echo "configure:23090: 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 23037 "configure"
+#line 23095 "configure"
#include "confdefs.h"
#include <stddef.h>
int main() {
ptrdiff_t p
; return 0; }
EOF
-if { (eval echo configure:23044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:23102: \"$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:23065: checking return type of signal handlers" >&5
+echo "configure:23123: 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 23070 "configure"
+#line 23128 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:23087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:23145: \"$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:23106: checking for size_t" >&5
+echo "configure:23164: 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 23111 "configure"
+#line 23169 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:23143: checking for ssize_t" >&5
+echo "configure:23201: 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 23148 "configure"
+#line 23206 "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:23179: checking for caddr_t" >&5
+echo "configure:23237: 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 23184 "configure"
+#line 23242 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
-echo "configure:23216: checking for socklen_t" >&5
+echo "configure:23274: 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 23221 "configure"
+#line 23279 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
socklen_t len;
; return 0; }
EOF
-if { (eval echo configure:23235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:23293: \"$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:23256: checking for member st_blksize in aggregate type struct stat" >&5
+echo "configure:23314: 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 23261 "configure"
+#line 23319 "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:23269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:23327: \"$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:23291: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:23349: 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 23296 "configure"
+#line 23354 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:23305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:23363: \"$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:23326: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:23384: 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 23331 "configure"
+#line 23389 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:23339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:23397: \"$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:23360: checking for uid_t in sys/types.h" >&5
+echo "configure:23418: 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 23365 "configure"
+#line 23423 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
fi
echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
-echo "configure:23394: checking for sig_atomic_t" >&5
+echo "configure:23452: 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 23399 "configure"
+#line 23457 "configure"
#include "confdefs.h"
#include <signal.h>
int main() {
sig_atomic_t atomic;
; return 0; }
EOF
-if { (eval echo configure:23406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:23464: \"$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:23430: checking struct passwd for pw_gecos" >&5
+echo "configure:23488: 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 23436 "configure"
+#line 23494 "configure"
#include "confdefs.h"
#include <pwd.h>
int main() {
; return 0; }
EOF
-if { (eval echo configure:23446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:23504: \"$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:23468: checking struct passwd for pw_passwd" >&5
+echo "configure:23526: 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 23474 "configure"
+#line 23532 "configure"
#include "confdefs.h"
#include <pwd.h>
int main() {
; return 0; }
EOF
-if { (eval echo configure:23484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:23542: \"$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:23506: checking if toupper() requires islower()" >&5
+echo "configure:23564: 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 23515 "configure"
+#line 23573 "configure"
#include "confdefs.h"
#include <ctype.h>
exit(1);
}
EOF
-if { (eval echo configure:23527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:23585: \"$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:23550: checking for working const" >&5
+echo "configure:23608: 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 23555 "configure"
+#line 23613 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:23604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:23662: \"$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:23625: checking if compiler understands volatile" >&5
+echo "configure:23683: 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 23630 "configure"
+#line 23688 "configure"
#include "confdefs.h"
int x, y, z;
int main() {
*b = 0;
; return 0; }
EOF
-if { (eval echo configure:23639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:23697: \"$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:23670: checking whether byte ordering is bigendian" >&5
+echo "configure:23728: 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 23677 "configure"
+#line 23735 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:23688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:23746: \"$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 23692 "configure"
+#line 23750 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:23703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:23761: \"$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 23723 "configure"
+#line 23781 "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:23736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:23794: \"$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:23762: checking size of short" >&5
+echo "configure:23820: 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 23768 "configure"
+#line 23826 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <stdlib.h>
switch (0) case 0: case (sizeof (short) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:23779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:23837: \"$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:23802: checking size of int" >&5
+echo "configure:23860: 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 23808 "configure"
+#line 23866 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <stdlib.h>
switch (0) case 0: case (sizeof (int) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:23819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:23877: \"$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:23842: checking size of long" >&5
+echo "configure:23900: 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 23848 "configure"
+#line 23906 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <stdlib.h>
switch (0) case 0: case (sizeof (long) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:23859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:23917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_long=$ac_size
else
echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
-echo "configure:23882: checking size of wchar_t" >&5
+echo "configure:23940: checking size of wchar_t" >&5
if eval "test \"\${ac_cv_sizeof_wchar_t+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 23888 "configure"
+#line 23946 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <stdlib.h>
switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:23899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:23957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_wchar_t=$ac_size
else
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:23950: checking for 8-bit clean memcmp" >&5
+echo "configure:24008: 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 23958 "configure"
+#line 24016 "configure"
#include "confdefs.h"
main()
}
EOF
-if { (eval echo configure:23968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:24026: \"$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
echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
+
+if test $ac_cv_func_memcmp_clean = no ; then
+ cat >> confdefs.h <<\EOF
+#define NEED_MEMCMP_REPLACEMENT 1
+EOF
+
+fi
+
echo $ac_n "checking for strftime""... $ac_c" 1>&6
-echo "configure:23986: checking for strftime" >&5
+echo "configure:24052: 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 23991 "configure"
+#line 24057 "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:24015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:24081: \"$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:24037: checking for strftime in -lintl" >&5
+echo "configure:24103: 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 24045 "configure"
+#line 24111 "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:24056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:24122: \"$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:24084: checking for inet_aton()" >&5
+echo "configure:24150: 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 24089 "configure"
+#line 24155 "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:24111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:24177: \"$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:24133: checking for _spawnlp" >&5
+echo "configure:24199: 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 24138 "configure"
+#line 24204 "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:24162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:24228: \"$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:24186: checking for _snprintf" >&5
+echo "configure:24252: 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 24191 "configure"
+#line 24257 "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:24215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:24281: \"$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:24241: checking for _vsnprintf" >&5
+echo "configure:24307: 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 24246 "configure"
+#line 24312 "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:24270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:24336: \"$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:24296: checking for vprintf" >&5
+echo "configure:24362: 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 24301 "configure"
+#line 24367 "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:24325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:24391: \"$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:24349: checking for _doprnt" >&5
+echo "configure:24415: 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 24354 "configure"
+#line 24420 "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:24378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:24444: \"$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 snprintf vsnprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:24407: checking for $ac_func" >&5
+echo "configure:24473: 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 24412 "configure"
+#line 24478 "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:24436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:24502: \"$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
setsid \
setuid \
seteuid \
- sigaction \
signal \
- sigset \
strdup \
strpbrk \
strrchr \
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:24521: checking for $ac_func" >&5
+echo "configure:24585: 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 24526 "configure"
+#line 24590 "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:24550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:24614: \"$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 getpeereid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:24578: checking for $ac_func" >&5
+echo "configure:24642: 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 24583 "configure"
+#line 24647 "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:24607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:24671: \"$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
fi
if test "$ac_cv_func_getpeereid" != yes; then
echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
-echo "configure:24639: checking for msg_accrights in msghdr" >&5
+echo "configure:24703: checking for msg_accrights in msghdr" >&5
if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 24644 "configure"
+#line 24708 "configure"
#include "confdefs.h"
#include <sys/socket.h>
int main() {
struct msghdr m; m.msg_accrightslen=0
; return 0; }
EOF
-if { (eval echo configure:24651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:24715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_msghdr_msg_accrights=yes
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:24695: checking for $ac_hdr" >&5
+echo "configure:24759: 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 24700 "configure"
+#line 24764 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:24705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:24769: \"$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: could not locate <ltdl.h>" 1>&2; exit 1; }
fi
echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
-echo "configure:24736: checking for lt_dlinit in -lltdl" >&5
+echo "configure:24800: 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 24744 "configure"
+#line 24808 "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:24755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:24819: \"$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
-if test "$ol_enable_chain" != no ; then
- BUILD_CHAIN=$ol_enable_chain
- if test "$ol_enable_chain" = mod ; then
- MFLAG=SLAPD_MOD_DYNAMIC
- SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS chain.la"
- else
- MFLAG=SLAPD_MOD_STATIC
- fi
- cat >> confdefs.h <<EOF
-#define SLAPD_OVER_CHAIN $MFLAG
-EOF
-
-fi
-
if test "$ol_enable_denyop" != no ; then
BUILD_DENYOP=$ol_enable_denyop
if test "$ol_enable_denyop" = mod ; then
fi
+if test "$ol_enable_translucent" != no ; then
+ BUILD_TRANSLUCENT=$ol_enable_translucent
+ if test "$ol_enable_translucent" = mod ; then
+ MFLAG=SLAPD_MOD_DYNAMIC
+ SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
+ else
+ MFLAG=SLAPD_MOD_STATIC
+ fi
+ cat >> confdefs.h <<EOF
+#define SLAPD_OVER_TRANSLUCENT $MFLAG
+EOF
+
+fi
+
if test "$ol_enable_unique" != no ; then
BUILD_UNIQUE=$ol_enable_unique
if test "$ol_enable_unique" = mod ; then
+
s%@BUILD_REFINT@%$BUILD_REFINT%g
s%@BUILD_RWM@%$BUILD_RWM%g
s%@BUILD_SYNCPROV@%$BUILD_SYNCPROV%g
+s%@BUILD_TRANSLUCENT@%$BUILD_TRANSLUCENT%g
s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
s%@BUILD_SLURPD@%$BUILD_SLURPD%g
s%@LDAP_LIBS@%$LDAP_LIBS%g
ENDX
if test "${STATIC_BACKENDS}"; then
- for b in ${STATIC_BACKENDS}; do
+ for b in config ${STATIC_BACKENDS}; do
bb=`echo "${b}" | sed -e 's/back-//'`
cat >> $BACKENDSC << ENDX
extern BI_init ${bb}_back_initialize;
BackendInfo slap_binfo[] = {
ENDX
- for b in ${STATIC_BACKENDS}; do
+ for b in config ${STATIC_BACKENDS}; do
bb=`echo "${b}" | sed -e 's/back-//'`
echo " Add ${bb} ..."
cat >> $BACKENDSC << ENDX
dnl ----------------------------------------------------------------
dnl SLAPD Overlay Options
-Overlays="chain denyop dyngroup glue lastmod ppolicy proxycache rwm \
- refint syncprov unique"
+Overlays="denyop dyngroup glue lastmod ppolicy proxycache rwm \
+ refint syncprov translucent unique"
AC_ARG_WITH(xxslapoverlays,[
SLAPD Overlay Options:])
OL_ARG_ENABLE(overlays,[ --enable-overlays enable all available overlays no|yes|mod],
no, [no yes mod])dnl
-OL_ARG_ENABLE(chain,[ --enable-chain LDAP Chain Response no|yes|mod],
- no, [no yes mod])
OL_ARG_ENABLE(denyop,[ --enable-denyop Deny Operation overlay no|yes|mod],
no, [no yes mod])
OL_ARG_ENABLE(dyngroup,[ --enable-dyngroup Dynamic Group overlay no|yes|mod],
no, [no yes mod])
OL_ARG_ENABLE(rwm,[ --enable-rwm Rewrite/Remap overlay no|yes|mod],
no, [no yes mod])
-OL_ARG_ENABLE(syncprov,[ --enable-syncprov Syncrepl Provider overlay no|yes|mod],
+OL_ARG_ENABLE(syncprov,[ --enable-syncprov Syncrepl Provider overlay no|yes|mod],
yes, [no yes mod])
+OL_ARG_ENABLE(translucent,[ --enable-translucent Translucent Proxy overlay no|yes|mod],
+ no, [no yes mod])
OL_ARG_ENABLE(unique,[ --enable-unique Attribute Uniqueness overlay no|yes|mod],
no, [no yes mod])
fi
fi
-if test $ol_enable_chain != no -a $ol_enable_ldap = no ; then
- AC_MSG_ERROR([--enable-chain requires --enable-ldap])
-fi
-
if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
AC_MSG_ERROR([--enable-meta requires --enable-ldap])
fi
BUILD_REFINT=no
BUILD_RWM=no
BUILD_SYNCPROV=no
+BUILD_TRANSLUCENT=no
BUILD_UNIQUE=no
SLAPD_DYNAMIC_OVERLAYS=
winsock2.h \
)
-
dnl ----------------------------------------------------------------
dnl Checks for libraries
+AC_CHECK_FUNCS( sigaction sigset )
+
dnl HP-UX requires -lV3
dnl this is not needed on newer versions of HP-UX
-AC_CHECK_LIB(V3, sigset)
+if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
+ AC_CHECK_LIB(V3, sigset)
+fi
dnl The following is INTENTIONALLY scripted out because shell does not
dnl support variable names with the '@' character, which is what
dnl ----------------------------------------------------------------
dnl Checks for library functions.
AC_FUNC_MEMCMP
+
+if test $ac_cv_func_memcmp_clean = no ; then
+ AC_DEFINE(NEED_MEMCMP_REPLACEMENT,1,
+ [define if memcmp is not 8-bit clean or is otherwise broken])
+fi
+
dnl AM_FUNC_MKTIME dnl checks for sys/time.h and unistd.h
AC_FUNC_STRFTIME
dnl AM_FUNC_STRTOD
setsid \
setuid \
seteuid \
- sigaction \
signal \
- sigset \
strdup \
strpbrk \
strrchr \
AC_DEFINE_UNQUOTED(SLAPD_SQL,$MFLAG,[define to support SQL backend])
fi
-if test "$ol_enable_chain" != no ; then
- BUILD_CHAIN=$ol_enable_chain
- if test "$ol_enable_chain" = mod ; then
- MFLAG=SLAPD_MOD_DYNAMIC
- SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS chain.la"
- else
- MFLAG=SLAPD_MOD_STATIC
- fi
- AC_DEFINE_UNQUOTED(SLAPD_OVER_CHAIN,$MFLAG,[define for Dynamic Group overlay])
-fi
-
if test "$ol_enable_denyop" != no ; then
BUILD_DENYOP=$ol_enable_denyop
if test "$ol_enable_denyop" = mod ; then
AC_DEFINE_UNQUOTED(SLAPD_OVER_SYNCPROV,$MFLAG,[define for Syncrepl Provider overlay])
fi
+if test "$ol_enable_translucent" != no ; then
+ BUILD_TRANSLUCENT=$ol_enable_translucent
+ if test "$ol_enable_translucent" = mod ; then
+ MFLAG=SLAPD_MOD_DYNAMIC
+ SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
+ else
+ MFLAG=SLAPD_MOD_STATIC
+ fi
+ AC_DEFINE_UNQUOTED(SLAPD_OVER_TRANSLUCENT,$MFLAG,[define for Translucent Proxy overlay])
+fi
+
if test "$ol_enable_unique" != no ; then
BUILD_UNIQUE=$ol_enable_unique
if test "$ol_enable_unique" = mod ; then
AC_SUBST(BUILD_REFINT)
AC_SUBST(BUILD_RWM)
AC_SUBST(BUILD_SYNCPROV)
+ AC_SUBST(BUILD_TRANSLUCENT)
AC_SUBST(BUILD_UNIQUE)
AC_SUBST(BUILD_SLURPD)
ENDX
if test "${STATIC_BACKENDS}"; then
- for b in ${STATIC_BACKENDS}; do
+ for b in config ${STATIC_BACKENDS}; do
bb=`echo "${b}" | sed -e 's/back-//'`
cat >> $BACKENDSC << ENDX
extern BI_init ${bb}_back_initialize;
BackendInfo slap_binfo[[]] = {
ENDX
- for b in ${STATIC_BACKENDS}; do
+ for b in config ${STATIC_BACKENDS}; do
bb=`echo "${b}" | sed -e 's/back-//'`
echo " Add ${bb} ..."
cat >> $BACKENDSC << ENDX
ldapsasl
LDAP SASL auxprop plugin
Contributed by Symas Corp.
+ Note: this module is now part of Cyrus SASL
+ and no longer included here.
slapd-modules
Native modules
+++ /dev/null
-LDAP auxprop plugin for SASL-enabled servers.
-Copyright (C) 2002,2003 by Howard Chu, hyc@symas.com
-
-This software is licensed under the terms of the OpenLDAP license.
-
-The file ldapdb.c was written for Cyrus SASL 2.1.3 and OpenLDAP 2.1.3.
-Due to various bugs in the Cyrus source you should use Cyrus SASL 2.1.15
-or newer. You need at least Cyrus SASL 2.1.16 to use the auxprop-store
-functionality.
-
-The version of ldapdb bundled with OpenLDAP 2.1.22 and older will work
-with all OpenLDAP releases 2.1.3 and up. The ldapdb in OpenLDAP 2.1.23
-uses a different LDAP request and requires the server to be 2.1.23 or newer.
-
-It can be compiled by copying into the Cyrus SASL source tree, in the
-plugins subdirectory. No configuration or build script is provided.
-
-To compile, type "make ldapdb.lo". To link, you'll have to copy the
-link rule for one of the other plugins. Below is a sample on my Linux
-system:
-
- /bin/sh ../libtool --mode=link gcc -Wall -W -g -O2 -L/usr/local/lib -Wl,-rpath,/usr/local/lib -module -export-dynamic -rpath /usr/lib/sasl2 -o libldapdb.la -version-info 2:4:0 ldapdb.lo -lldap -llber -lssl -lcrypto
-
-Once installed, you need to add some config items to the SASL server's
-config file in /usr/lib/sasl2. For example:
-
-ldapdb_uri: ldap://ldap.example.com
-ldapdb_id: root
-ldapdb_pw: secret
-ldapdb_mech: DIGEST-MD5
-
-This config assumes an LDAP server on the same machine as the server
-that is using SASL. The LDAP server must be configured to map the SASL
-authcId "root" into a DN that has proxy authorization privileges to
-every account that is allowed to login to this server. (See the OpenLDAP
-Admin Guide section 10 for details.)
-
-Unlike other LDAP-enabled plugins for other services that are common
-on the web, this plugin does not require you to configure DN search
-patterns to map usernames to LDAP DNs. This plugin requires SASL name
-mapping to be configured on the target slapd. This approach keeps the
-LDAP-specific configuration details in one place, the slapd.conf, and
-makes the configuration of remote services much simpler.
-
-An additional keyword "ldapdb_rc" may be specified in the config file.
-The filename specified here will be put into the server's LDAPRC
-environment variable, and libldap-specific config options may be set
-in that ldaprc file. The main purpose behind this option is to allow
-a client TLS certificate to be configured, so that SASL/EXTERNAL may
-be used between the SASL server and the LDAP server. This is the most
-optimal way to use this plugin when the servers are on separate machines.
-
-Note: this plugin is not for use with slapd itself. When OpenLDAP is
-built with SASL support, slapd uses its own internal auxprop module.
-By default, without configuring anything else, slapd will fail to load
-the ldapdb module when it's present. This is as it should be. If you
-don't like the "auxpropfunc: error -7" message that is sent to syslog
-by slapd, you can stop it by creating /usr/lib/sasl2/slapd.conf with:
-
- auxprop_plugin: slapd
-
-which will force the SASL library to ignore all other auxprop modules.
-
-This plugin has been in use for over a year at many sites with good
-results. If you have questions or problems, please send feedback via
-the openldap-software mailing list.
-
- -- Howard Chu
-
-Update... With OpenLDAP 2.1.13 you can use SASL/EXTERNAL on ldapi://.
-This is fast and secure, and needs no username or password to be stored.
-The SASL config file is just
-
-ldapdb_uri: ldapi://
-ldapdb_mech: EXTERNAL
-
-The slapd.conf will need to map these usernames to LDAP DNs:
-
-sasl-regexp uidNumber=(.*)\\+gidNumber=(.*),cn=peercred,cn=external,cn=auth
- ldap:///dc=example,dc=com??sub?(&(uidNumber=$1)(gidNumber=$2))
-
-sasl-regexp uid=(.*),cn=external,cn=auth
- ldap:///dc=example,dc=com??sub?(uid=$1)
-
-Update... With OpenLDAP 2.1.23 you can use the ldapdb_starttls keyword
-to use the StartTLS extended operation on an LDAP session. This item
-may be set to either "try" or "demand", e.g.:
-
-ldapdb_uri: ldap://ldap.example.com
-ldapdb_starttls: try
-
-When set to "try" any failure in StartTLS is ignored. When set to "demand"
-then any failure aborts the connection.
+++ /dev/null
-/* $OpenLDAP$ */
-/* SASL LDAP auxprop implementation
- * Copyright (C) 2002,2003 Howard Chu, All rights reserved. <hyc@symas.com>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted only as authorized by the OpenLDAP
- * Public License.
- *
- * A copy of this license is available in the file LICENSE in the
- * top-level directory of the distribution or, alternatively, at
- * <http://www.OpenLDAP.org/license.html>.
- */
-
-#include <config.h>
-
-#include <stdio.h>
-
-#include "sasl.h"
-#include "saslutil.h"
-#include "saslplug.h"
-
-#define SASL_VERSION_FULL ((SASL_VERSION_MAJOR << 16) |\
- (SASL_VERSION_MINOR << 8) |SASL_VERSION_STEP)
-
-#include "plugin_common.h"
-
-#include <ldap.h>
-
-static char ldapdb[] = "ldapdb";
-
-typedef struct ldapctx {
- const char *uri; /* URI of LDAP server */
- struct berval id; /* SASL authcid to bind as */
- struct berval pw; /* password for bind */
- struct berval mech; /* SASL mech */
- int use_tls; /* Issue StartTLS request? */
-} ldapctx;
-
-static int ldapdb_interact(LDAP *ld, unsigned flags __attribute__((unused)),
- void *def, void *inter)
-{
- sasl_interact_t *in = inter;
- ldapctx *ctx = def;
- struct berval p;
-
- for (;in->id != SASL_CB_LIST_END;in++)
- {
- p.bv_val = NULL;
- switch(in->id)
- {
- case SASL_CB_GETREALM:
- ldap_get_option(ld, LDAP_OPT_X_SASL_REALM, &p.bv_val);
- if (p.bv_val) p.bv_len = strlen(p.bv_val);
- break;
- case SASL_CB_AUTHNAME:
- p = ctx->id;
- break;
- case SASL_CB_PASS:
- p = ctx->pw;
- break;
- }
- if (p.bv_val)
- {
- in->result = p.bv_val;
- in->len = p.bv_len;
- }
- }
- return LDAP_SUCCESS;
-}
-
-typedef struct connparm {
- LDAP *ld;
- LDAPControl c;
- LDAPControl *ctrl[2];
- struct berval *dn;
-} connparm;
-
-static int ldapdb_connect(ldapctx *ctx, sasl_server_params_t *sparams,
- const char *user, unsigned ulen, connparm *cp)
-{
- int i;
- char *authzid;
-
- if((i=ldap_initialize(&cp->ld, ctx->uri))) {
- return i;
- }
-
- authzid = sparams->utils->malloc(ulen + sizeof("u:"));
- if (!authzid) {
- return LDAP_NO_MEMORY;
- }
- strcpy(authzid, "u:");
- strcpy(authzid+2, user);
- cp->c.ldctl_oid = LDAP_CONTROL_PROXY_AUTHZ;
- cp->c.ldctl_value.bv_val = authzid;
- cp->c.ldctl_value.bv_len = ulen + 2;
- cp->c.ldctl_iscritical = 1;
-
- i = LDAP_VERSION3;
- ldap_set_option(cp->ld, LDAP_OPT_PROTOCOL_VERSION, &i);
-
- /* If TLS is set and it fails, continue or bail out as requested */
- if (ctx->use_tls && (i=ldap_start_tls_s(cp->ld, NULL, NULL)) != LDAP_SUCCESS
- && ctx->use_tls > 1) {
- sparams->utils->free(authzid);
- return i;
- }
-
- i = ldap_sasl_interactive_bind_s(cp->ld, NULL, ctx->mech.bv_val, NULL,
- NULL, LDAP_SASL_QUIET, ldapdb_interact, ctx);
- if (i != LDAP_SUCCESS) {
- sparams->utils->free(authzid);
- return i;
- }
-
- cp->ctrl[0] = &cp->c;
- cp->ctrl[1] = NULL;
- i = ldap_whoami_s(cp->ld, &cp->dn, cp->ctrl, NULL);
- if (i == LDAP_SUCCESS && cp->dn) {
- if (!cp->dn->bv_val || strncmp(cp->dn->bv_val, "dn:", 3)) {
- ber_bvfree(cp->dn);
- cp->dn = NULL;
- i = LDAP_INVALID_SYNTAX;
- } else {
- cp->c.ldctl_value = *(cp->dn);
- }
- }
- sparams->utils->free(authzid);
- return i;
-}
-
-static void ldapdb_auxprop_lookup(void *glob_context,
- sasl_server_params_t *sparams,
- unsigned flags,
- const char *user,
- unsigned ulen)
-{
- ldapctx *ctx = glob_context;
- connparm cp;
- int ret, i, n, *aindx;
- const struct propval *pr;
- struct berval **bvals;
- LDAPMessage *msg, *res;
- char **attrs = NULL;
-
- if(!ctx || !sparams || !user) return;
-
- pr = sparams->utils->prop_get(sparams->propctx);
- if(!pr) return;
-
- /* count how many attrs to fetch */
- for(i = 0, n = 0; pr[i].name; i++) {
- if(pr[i].name[0] == '*' && (flags & SASL_AUXPROP_AUTHZID))
- continue;
- if(pr[i].values && !(flags & SASL_AUXPROP_OVERRIDE))
- continue;
- n++;
- }
- /* nothing to do, bail out */
- if (!n) return;
-
- /* alloc an array of attr names for search, and index to the props */
- attrs = sparams->utils->malloc((n+1)*sizeof(char *)*2);
- if (!attrs) return;
-
- aindx = (int *)(attrs + n + 1);
-
- /* copy attr list */
- for (i=0, n=0; pr[i].name; i++) {
- if(pr[i].name[0] == '*' && (flags & SASL_AUXPROP_AUTHZID))
- continue;
- if(pr[i].values && !(flags & SASL_AUXPROP_OVERRIDE))
- continue;
- attrs[n] = (char *)pr[i].name;
- if (pr[i].name[0] == '*') attrs[n]++;
- aindx[n] = i;
- n++;
- }
- attrs[n] = NULL;
-
- if(ldapdb_connect(ctx, sparams, user, ulen, &cp)) {
- goto done;
- }
-
- ret = ldap_search_ext_s(cp.ld, cp.dn->bv_val+3, LDAP_SCOPE_BASE,
- "(objectclass=*)", attrs, 0, cp.ctrl, NULL, NULL, 1, &res);
- ber_bvfree(cp.dn);
-
- if (ret != LDAP_SUCCESS) goto done;
-
- for(msg=ldap_first_message(cp.ld, res); msg; msg=ldap_next_message(cp.ld, msg))
- {
- if (ldap_msgtype(msg) != LDAP_RES_SEARCH_ENTRY) continue;
- for (i=0; i<n; i++)
- {
- bvals = ldap_get_values_len(cp.ld, msg, attrs[i]);
- if (!bvals) continue;
- if (pr[aindx[i]].values)
- sparams->utils->prop_erase(sparams->propctx, pr[aindx[i]].name);
- sparams->utils->prop_set(sparams->propctx, pr[aindx[i]].name,
- bvals[0]->bv_val, bvals[0]->bv_len);
- ber_bvecfree(bvals);
- }
- }
- ldap_msgfree(res);
-
- done:
- if(attrs) sparams->utils->free(attrs);
- if(cp.ld) ldap_unbind(cp.ld);
-}
-
-#if SASL_VERSION_FULL >= 0x020110
-static int ldapdb_auxprop_store(void *glob_context,
- sasl_server_params_t *sparams,
- struct propctx *prctx,
- const char *user,
- unsigned ulen)
-{
- ldapctx *ctx = glob_context;
- connparm cp;
- const struct propval *pr;
- int i, n;
- LDAPMod **mods;
-
- /* just checking if we are enabled */
- if (!prctx) return SASL_OK;
-
- if (!sparams || !user) return SASL_BADPARAM;
-
- pr = sparams->utils->prop_get(prctx);
- if (!pr) return SASL_BADPARAM;
-
- for (n=0; pr[n].name; n++);
- if (!n) return SASL_BADPARAM;
-
- mods = sparams->utils->malloc((n+1) * sizeof(LDAPMod*) + n * sizeof(LDAPMod));
- if (!mods) return SASL_NOMEM;
-
- if((i=ldapdb_connect(ctx, sparams, user, ulen, &cp)) == 0) {
-
- for (i=0; i<n; i++) {
- mods[i] = (LDAPMod *)((char *)(mods+n+1) + i * sizeof(LDAPMod));
- mods[i]->mod_op = LDAP_MOD_REPLACE;
- mods[i]->mod_type = (char *)pr[i].name;
- mods[i]->mod_values = (char **)pr[i].values;
- }
- mods[i] = NULL;
-
- i = ldap_modify_ext_s(cp.ld, cp.dn->bv_val+3, mods, cp.ctrl, NULL);
- ber_bvfree(cp.dn);
- }
-
- sparams->utils->free(mods);
-
- if (i) {
- sparams->utils->seterror(sparams->utils->conn, 0,
- ldap_err2string(i));
- if (i == LDAP_NO_MEMORY) i = SASL_NOMEM;
- else i = SASL_FAIL;
- }
- if (cp.ld) ldap_unbind(cp.ld);
- return i;
-}
-#endif /* SASL_VERSION_FULL >= 2.1.16 */
-
-static void ldapdb_auxprop_free(void *glob_ctx, const sasl_utils_t *utils)
-{
- utils->free(glob_ctx);
-}
-
-static sasl_auxprop_plug_t ldapdb_auxprop_plugin = {
- 0, /* Features */
- 0, /* spare */
- NULL, /* glob_context */
- ldapdb_auxprop_free, /* auxprop_free */
- ldapdb_auxprop_lookup, /* auxprop_lookup */
- ldapdb, /* name */
-#if SASL_VERSION_FULL >=0x020110
- ldapdb_auxprop_store /* spare if <2.1.16*/
-#else
- NULL
-#endif
-};
-
-static int ldapdb_auxprop_plug_init(const sasl_utils_t *utils,
- int max_version,
- int *out_version,
- sasl_auxprop_plug_t **plug,
- const char *plugname __attribute__((unused)))
-{
- ldapctx tmp, *p;
- const char *s;
- unsigned len;
-
- if(!out_version || !plug) return SASL_BADPARAM;
-
- if(max_version < SASL_AUXPROP_PLUG_VERSION) return SASL_BADVERS;
-
- memset(&tmp, 0, sizeof(tmp));
-
- utils->getopt(utils->getopt_context, ldapdb, "ldapdb_uri", &tmp.uri, NULL);
- if(!tmp.uri) return SASL_BADPARAM;
-
- utils->getopt(utils->getopt_context, ldapdb, "ldapdb_id",
- (const char **)&tmp.id.bv_val, &len);
- tmp.id.bv_len = len;
- utils->getopt(utils->getopt_context, ldapdb, "ldapdb_pw",
- (const char **)&tmp.pw.bv_val, &len);
- tmp.pw.bv_len = len;
- utils->getopt(utils->getopt_context, ldapdb, "ldapdb_mech",
- (const char **)&tmp.mech.bv_val, &len);
- tmp.mech.bv_len = len;
- utils->getopt(utils->getopt_context, ldapdb, "ldapdb_starttls", &s, NULL);
- if (s)
- {
- if (!strcasecmp(s, "demand")) tmp.use_tls = 2;
- else if (!strcasecmp(s, "try")) tmp.use_tls = 1;
- }
- utils->getopt(utils->getopt_context, ldapdb, "ldapdb_rc", &s, &len);
- if (s)
- {
- char *str = utils->malloc(sizeof("LDAPRC=")+len);
- if (!str) return SASL_NOMEM;
- strcpy( str, "LDAPRC=" );
- strcpy( str + sizeof("LDAPRC=")-1, s );
- if (putenv(str))
- {
- utils->free(str);
- return SASL_NOMEM;
- }
- }
-
- p = utils->malloc(sizeof(ldapctx));
- if (!p) return SASL_NOMEM;
- *p = tmp;
- ldapdb_auxprop_plugin.glob_context = p;
-
- *out_version = SASL_AUXPROP_PLUG_VERSION;
-
- *plug = &ldapdb_auxprop_plugin;
-
- return SASL_OK;
-}
-
-SASL_AUXPROP_PLUG_INIT( ldapdb )
-
* use nibble memory in it
*/
free ( bv.bv_val );
+ GenBufFreeBuf( b );
+ BufFreeBuf( buf );
return LDAP_SUCCESS;
}
rc = csi->csi_comp_desc->cd_gser_encoder( b, csi );
if ( rc < 0 ) {
+ GenBufFreeBuf( b );
BufFreeBuf( buf );
return rc;
}
BufCopy( nval->bv_val, b, size );
}
ExpBufFreeBuf( buf );
+ GenBufFreeBuf( b );
return LDAP_SUCCESS;
}
Internet-Draft Editor: J. Sermersheim
Intended Category: Standard Track Novell, Inc
-Document: draft-ietf-ldapbis-protocol-27.txt Oct 2004
+Document: draft-ietf-ldapbis-protocol-30.txt Feb 2005
Obsoletes: RFCs 2251, 2830, 3771
Protocol (DAP).
-Sermersheim Internet-Draft - Expires Apr 2005 Page 1
+Sermersheim Internet-Draft - Expires Aug 2005 Page 1
+\f
Lightweight Directory Access Protocol Version 3
Table of Contents
1. Introduction....................................................3
- 1.1. Relationship to Obsolete Specifications.......................3
+ 1.1. Relationship to Other LDAP Specifications.....................3
2. Conventions.....................................................3
3. Protocol Model..................................................4
- 3.1 Operation and LDAP Exchange Relationship.......................4
+ 3.1 Operation and LDAP Message Layer Relationship..................5
4. Elements of Protocol............................................5
4.1. Common Elements...............................................5
4.1.1. Message Envelope............................................5
4.1.2. String Types................................................7
4.1.3. Distinguished Name and Relative Distinguished Name..........7
- 4.1.4. Attribute Descriptions......................................7
+ 4.1.4. Attribute Descriptions......................................8
4.1.5. Attribute Value.............................................8
4.1.6. Attribute Value Assertion...................................8
4.1.7. Attribute and PartialAttribute..............................9
4.1.8. Matching Rule Identifier....................................9
4.1.9. Result Message..............................................9
4.1.10. Referral..................................................11
- 4.1.11. Controls..................................................12
+ 4.1.11. Controls..................................................13
4.2. Bind Operation...............................................14
4.3. Unbind Operation.............................................17
4.4. Unsolicited Notification.....................................17
4.5. Search Operation.............................................18
- 4.6. Modify Operation.............................................27
- 4.7. Add Operation................................................28
- 4.8. Delete Operation.............................................29
- 4.9. Modify DN Operation..........................................30
- 4.10. Compare Operation...........................................31
- 4.11. Abandon Operation...........................................32
- 4.12. Extended Operation..........................................32
- 4.13. IntermediateResponse Message................................34
- 4.13.1. Usage with LDAP ExtendedRequest and ExtendedResponse......34
- 4.13.2. Usage with LDAP Request Controls..........................35
- 4.14. StartTLS Operation..........................................35
- 5. Protocol Encoding, Connection, and Transfer....................37
- 5.2. Protocol Encoding............................................37
- 5.3. Transmission Control Protocol (TCP)..........................38
- 6. Security Considerations........................................38
- 7. Acknowledgements...............................................39
- 8. Normative References...........................................40
- 9. Informative References.........................................41
- 10. IANA Considerations...........................................42
- 11. Editor's Address..............................................42
- Appendix A - LDAP Result Codes....................................43
- A.1 Non-Error Result Codes........................................43
- A.2 Result Codes..................................................43
- Appendix B - Complete ASN.1 Definition............................48
- Appendix C - Changes..............................................54
- C.1 Changes made to RFC 2251:.....................................54
- C.2 Changes made to RFC 2830:.....................................59
- C.3 Changes made to RFC 3771:.....................................59
-
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 2
+ 4.6. Modify Operation.............................................29
+ 4.7. Add Operation................................................31
+ 4.8. Delete Operation.............................................31
+ 4.9. Modify DN Operation..........................................32
+ 4.10. Compare Operation...........................................33
+ 4.11. Abandon Operation...........................................34
+ 4.12. Extended Operation..........................................35
+ 4.13. IntermediateResponse Message................................36
+ 4.14. StartTLS Operation..........................................37
+ 5. Protocol Encoding, Connection, and Transfer....................39
+ 5.1. Protocol Encoding............................................40
+ 5.2. Transmission Control Protocol (TCP)..........................40
+ 5.3. Termination of the LDAP session..............................40
+ 6. Security Considerations........................................41
+ 7. Acknowledgements...............................................42
+ 8. Normative References...........................................42
+ 9. Informative References.........................................44
+ 10. IANA Considerations...........................................44
+ 11. Editor's Address..............................................45
+ Appendix A - LDAP Result Codes....................................46
+ A.1 Non-Error Result Codes........................................46
+ A.2 Result Codes..................................................46
+ Appendix B - Complete ASN.1 Definition............................51
+ Appendix C - Changes..............................................57
+ C.1 Changes made to RFC 2251:.....................................57
+ C.2 Changes made to RFC 2830:.....................................62
+ C.3 Changes made to RFC 3771:.....................................63
+
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 2
+\f
Lightweight Directory Access Protocol Version 3
-
1. Introduction
The Directory is "a collection of open systems cooperating to provide
in which the protocol elements are encoded and transferred.
-1.1. Relationship to Obsolete Specifications
+1.1. Relationship to Other LDAP Specifications
This document is an integral part of the LDAP Technical Specification
[Roadmap] which obsoletes the previously defined LDAP technical
Information on the Unicode character encoding model can be found in
[CharModel].
+
-Sermersheim Internet-Draft - Expires Apr 2005 Page 3
+Sermersheim Internet-Draft - Expires Aug 2005 Page 3
+\f
Lightweight Directory Access Protocol Version 3
- The term "connection" refers to the underlying transport service used
- to carry the protocol exchange.
+ The term "transport connection" refers to the underlying transport
+ services used to carry the protocol exchange, as well as associations
+ established by these services.
+
+ The term "TLS layer" refers to TLS services used in providing
+ security services, as well as associations established by these
+ services.
- The term "LDAP exchange" refers to the layer where LDAP PDUs are
- exchanged between protocol peers.
+ The term "SASL layer" refers to SASL services used in providing
+ security services, as well as associations established by these
+ services.
- The term "TLS layer" refers to a layer inserted between the
- connection and the LDAP exchange that utilizes Transport Layer
- Security ([TLS]) to protect the exchange of LDAP PDUs.
+ The term "LDAP message layer" refers to the LDAP Message (PDU)
+ services used in providing directory services, as well as
+ associations established by these services.
- The term "SASL layer" refers to a layer inserted between the
- connection and the LDAP exchange that utilizes Simple Authentication
- and Security Layer ([SASL]) to protect the exchange of LDAP PDUs.
+ The term "LDAP session" refers to combined services (transport
+ connection, TLS layer, SASL layer, LDAP message layer) and their
+ associations.
See the table in Section 5 for an illustration of these four terms.
implementations acting as a gateway to X.500 directories may need to
make multiple DAP requests to service a single LDAP request.
-
-3.1 Operation and LDAP Exchange Relationship
-
- Protocol operations are tied to an LDAP exchange. When the connection
- is closed, any uncompleted operations tied to the LDAP exchange are,
- when possible, abandoned, and when not possible, completed without
- transmission of the response. Also, when the connection is closed,
- the client MUST NOT assume that any uncompleted update operations
- tied to the LDAP exchange have succeeded or failed.
+
+
+
-Sermersheim Internet-Draft - Expires Apr 2005 Page 4
+Sermersheim Internet-Draft - Expires Aug 2005 Page 4
+\f
Lightweight Directory Access Protocol Version 3
+
+3.1 Operation and LDAP Message Layer Relationship
+
+ Protocol operations are exchanged at the LDAP message layer. When the
+ transport connection is closed, any uncompleted operations at the
+ LDAP message layer, when possible, are abandoned, and when not
+ possible, are completed without transmission of the response. Also,
+ when the transport connection is closed, the client MUST NOT assume
+ that any uncompleted update operations have succeeded or failed.
4. Elements of Protocol
Changes to the protocol other than through the extension mechanisms
described here require a different version number. A client indicates
- the version it is using as part of the bind request, described in
- Section 4.2. If a client has not sent a bind, the server MUST assume
+ the version it is using as part of the BindRequest, described in
+ Section 4.2. If a client has not sent a Bind, the server MUST assume
the client is using version 3 or later.
- Clients may determine the protocol versions a server supports by
- reading the 'supportedLDAPVersion' attribute from the root DSE (DSA-
- Specific Entry) [Models].
+ Clients may attempt to determine the protocol versions a server
+ supports by reading the 'supportedLDAPVersion' attribute from the
+ root DSE (DSA-Specific Entry) [Models].
4.1. Common Elements
encapsulated in a common envelope, the LDAPMessage, which is defined
as follows:
+
+
+
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 5
+\f
+ Lightweight Directory Access Protocol Version 3
+
LDAPMessage ::= SEQUENCE {
messageID MessageID,
protocolOp CHOICE {
modifyRequest ModifyRequest,
modifyResponse ModifyResponse,
addRequest AddRequest,
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 5
- Lightweight Directory Access Protocol Version 3
-
addResponse AddResponse,
delRequest DelRequest,
delResponse DelResponse,
encoding structures or lengths of data fields are found to be
incorrect, then the server SHOULD return the Notice of Disconnection
described in Section 4.4.1, with the resultCode set to protocolError,
- and MUST immediately close the connection.
+ and MUST immediately terminate the LDAP session as described in
+ Section 5.3.
In other cases where the client or server cannot parse a PDU, it
- SHOULD abruptly close the connection where further communication
- (including providing notice) would be pernicious. Otherwise, server
- implementations MUST return an appropriate response to the request,
- with the resultCode set to protocolError.
+ SHOULD abruptly terminate the LDAP session (Section 5.3) where
+ further communication (including providing notice) would be
+ pernicious. Otherwise, server implementations MUST return an
+ appropriate response to the request, with the resultCode set to
+ protocolError.
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 6
+\f
+ Lightweight Directory Access Protocol Version 3
+
4.1.1.1. Message ID
All LDAPMessage envelopes encapsulating responses contain the
messageID value of the corresponding request LDAPMessage.
The message ID of a request MUST have a non-zero value different from
- the the messageID of any other uncompleted requests in the LDAP
- exchange. The zero value is reserved for the unsolicited notification
+ the messageID of any other request in progress in the same LDAP
+ session. The zero value is reserved for the unsolicited notification
message.
Typical clients increment a counter for each request.
A client MUST NOT send a request with the same message ID as an
- earlier request in the same LDAP exchange unless it can be determined
+ earlier request in the same LDAP session unless it can be determined
that the server is no longer servicing the earlier request (e.g.
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 6
- Lightweight Directory Access Protocol Version 3
-
- after the final response is received, or a subsequent bind
+ after the final response is received, or a subsequent Bind
completes). Otherwise the behavior is undefined. For this purpose,
- note that abandon and abandoned operations do not send responses.
+ note that Abandon and successfully abandoned operations do not send
+ responses.
4.1.2. String Types
LDAPDN ::= LDAPString
-- Constrained to <distinguishedName> [LDAPDN]
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 7
+\f
+ Lightweight Directory Access Protocol Version 3
+
A RelativeLDAPDN is defined to be the representation of a Relative
Distinguished Name (RDN) after encoding according to the
is an attribute type and zero or more options.
AttributeDescription ::= LDAPString
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 7
- Lightweight Directory Access Protocol Version 3
-
-- Constrained to <attributedescription>
-- [Models]
The AttributeValueAssertion (AVA) type definition is similar to the
one in the X.500 Directory standards. It contains an attribute
- description and a matching rule ([Models Section 4.1.3) assertion
+ description and a matching rule ([Models] Section 4.1.3) assertion
value suitable for that type. Elements of this type are typically
used to assert that the value in assertionValue matches a value of an
attribute.
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 8
+\f
+ Lightweight Directory Access Protocol Version 3
+
AttributeValueAssertion ::= SEQUENCE {
attributeDesc AttributeDescription,
[Syntaxes] for an example.
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 8
- Lightweight Directory Access Protocol Version 3
-
4.1.7. Attribute and PartialAttribute
Attributes and partial attributes consist of an attribute description
...,
vals (SIZE(1..MAX))})
- No two attribute values may be equivalent as described by Section 2.3
- of [Models]. The set of attribute values is unordered.
+ No two of the attribute values may be equivalent as described by
+ Section 2.3 of [Models]. The set of attribute values is unordered.
Implementations MUST NOT rely upon the ordering being repeatable.
The LDAPResult is the construct used in this protocol to return
success or failure indications from servers to clients. To various
- requests, servers will return responses of LDAPResult or responses
- containing the components of LDAPResult to indicate the final status
- of a protocol operation request.
+ requests, servers will return responses containing the elements found
+ in LDAPResult to indicate the final status of the protocol operation
+ request.
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 9
+\f
+ Lightweight Directory Access Protocol Version 3
+
LDAPResult ::= SEQUENCE {
resultCode ENUMERATED {
success (0),
compareFalse (5),
compareTrue (6),
authMethodNotSupported (7),
- strongAuthRequired (8),
+ strongerAuthRequired (8),
-- 9 reserved --
referral (10),
adminLimitExceeded (11),
unavailableCriticalExtension (12),
confidentialityRequired (13),
saslBindInProgress (14),
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 9
- Lightweight Directory Access Protocol Version 3
-
noSuchAttribute (16),
undefinedAttributeType (17),
inappropriateMatching (18),
diagnosticMessage LDAPString,
referral [3] Referral OPTIONAL }
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 10
+\f
+ Lightweight Directory Access Protocol Version 3
+
The resultCode enumeration is extensible as defined in Section 3.6 of
[LDAPIANA]. The meanings of the listed result codes are given in
Appendix A. If a server detects multiple errors for an operation,
readable (terminal control and page formatting characters should be
avoided) diagnostic message. As this diagnostic message is not
standardized, implementations MUST NOT rely on the values returned.
- If the server chooses not to return a textual diagnostic, the
- diagnosticMessage field MUST be empty.
+ Diagnostic messages typically supplement the resultCode with
+ additional information. If the server chooses not to return a textual
+ diagnostic, the diagnosticMessage field MUST be empty.
For certain result codes (typically, but not restricted to
noSuchObject, aliasProblem, invalidDNSyntax and
aliasDereferencingProblem), the matchedDN field is set (subject to
access controls) to the name of the last entry (object or alias) used
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 10
- Lightweight Directory Access Protocol Version 3
-
- in finding the target (or base) object. If no aliases were
- dereferenced while attempting to locate the entry, this will be a
- truncated form of the name provided or if aliases were dereferenced,
- of the resulting name, as defined in Section 12.5 of [X.511].
- Otherwise the matchedDN field is empty.
+ in finding the target (or base) object. This will be a truncated form
+ of the provided name or, if an alias was dereferenced while
+ attempting to locate the entry, of the resulting name. Otherwise the
+ matchedDN field is empty.
4.1.10. Referral
- The operation is restricted on this server -- perhaps due to a
read-only copy of an entry to be modified.
- The referral field is present in an LDAPResult if the resultCode
- field value is referral, and absent with all other result codes. It
- contains one or more references to one or more servers or services
- that may be accessed via LDAP or other protocols. Referrals can be
- returned in response to any operation request (except unbind and
- abandon which do not have responses). At least one URI MUST be
- present in the Referral.
+ The referral field is present in an LDAPResult if the resultCode is
+ set to referral, and absent with all other result codes. It contains
+ one or more references to one or more servers or services that may be
+ accessed via LDAP or other protocols. Referrals can be returned in
+ response to any operation request (except Unbind and Abandon which do
+ not have responses). At least one URI MUST be present in the
+ Referral.
- During a search operation, after the baseObject is located, and
+ During a Search operation, after the baseObject is located, and
entries are being evaluated, the referral is not returned. Instead,
continuation references, described in Section 4.5.3, are returned
when other servers would need to be contacted to complete the
Referral ::= SEQUENCE SIZE (1..MAX) OF uri URI
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 11
+\f
+ Lightweight Directory Access Protocol Version 3
+
URI ::= LDAPString -- limited to characters permitted in
-- URIs
- If the client wishes to progress the operation, it MUST follow the
- referral by contacting one of the supported services. If multiple
- URIs are present, the client assumes that any supported URI may be
- used to progress the operation.
+ If the client wishes to progress the operation, it contacts one of
+ the supported services found in the referral. If multiple URIs are
+ present, the client assumes that any supported URI may be used to
+ progress the operation.
- Protocol peers that follow referrals MUST ensure that they do not
- loop between servers. They MUST NOT repeatedly contact the same
- server for the same request with the same target entry name, scope
- and filter. Some implementations use a counter that is incremented
- each time referral handling occurs for an operation, and these kinds
- of implementations MUST be able to handle at least ten nested
- referrals between the root and a leaf entry.
+ Clients that follow referrals MUST ensure that they do not loop
+ between servers. They MUST NOT repeatedly contact the same server for
+ the same request with the same parameters. Some clients use a counter
+ that is incremented each time referral handling occurs for an
+ operation, and these kinds of clients MUST be able to handle at least
+ ten nested referrals while progressing the operation.
A URI for a server implementing LDAP and accessible via [TCP]/[IP]
(v4 or v6) is written as an LDAP URL according to [LDAPURL].
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 11
- Lightweight Directory Access Protocol Version 3
-
- When an LDAP URL is used, the following instructions are followed:
+ Referral values which are LDAP URLs follow these rules:
- - If an alias was dereferenced, the <dn> part of the URL MUST be
- present, with the new target object name. UTF-8 encoded characters
- appearing in the string representation of a DN or search filter
- may not be legal for URLs (e.g. spaces) and MUST be escaped using
- the % method in [URI].
+ - If an alias was dereferenced, the <dn> part of the LDAP URL MUST
+ be present, with the new target object name.
- It is RECOMMENDED that the <dn> part be present to avoid
ambiguity.
- - If the <dn> part is present, the client MUST use this name in its
- next request to progress the operation, and if it is not present
- the client will use the same name as in the original request.
+ - If the <dn> part is present, the client uses this name in its next
+ request to progress the operation, and if it is not present the
+ client uses the same name as in the original request.
- Some servers (e.g. participating in distributed indexing) may
- provide a different filter in a URL of a referral for a search
+ provide a different filter in a URL of a referral for a Search
operation.
- - If the <filter> part of the LDAP URL is present, the client MUST
- use this filter in its next request to progress this search, and
- if it is not present the client MUST use the same filter as it
- used for that search.
+ - If the <filter> part of the LDAP URL is present, the client uses
+ this filter in its next request to progress this Search, and if it
+ is not present the client uses the same filter as it used for that
+ Search.
- - For search, it is RECOMMENDED that the <scope> part be present to
+ - For Search, it is RECOMMENDED that the <scope> part be present to
avoid ambiguity.
- - If the <scope> part is missing, the scope of the original search
+ - If the <scope> part is missing, the scope of the original Search
is used by the client to progress the operation.
- Other aspects of the new request may be the same as or different
URIs is left to future specifications. Clients may ignore URIs that
they do not support.
+
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 12
+\f
+ Lightweight Directory Access Protocol Version 3
+
+ UTF-8 encoded characters appearing in the string representation of a
+ DN, search filter, or other fields of the referral value may not be
+ legal for URIs (e.g. spaces) and MUST be escaped using the % method
+ in [URI].
+
4.1.11. Controls
controlType LDAPOID,
criticality BOOLEAN DEFAULT FALSE,
controlValue OCTET STRING OPTIONAL }
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 12
- Lightweight Directory Access Protocol Version 3
-
The controlType field is the dotted-decimal representation of an
OBJECT IDENTIFIER which uniquely identifies the control. This
request control.
The criticality field only has meaning in controls attached to
- request messages (except unbindRequest). For controls attached to
- response messages and the unbindRequest, the criticality field SHOULD
+ request messages (except UnbindRequest). For controls attached to
+ response messages and the UnbindRequest, the criticality field SHOULD
be FALSE, and MUST be ignored by the receiving protocol peer. A value
of TRUE indicates that it is unacceptable to perform the operation
- without applying the semantics of the control and FALSE otherwise.
- Specifically, the criticality field is applied as follows:
+ without applying the semantics of the control. Specifically, the
+ criticality field is applied as follows:
- Regardless of the value of the criticality field, if the server
recognizes the control type and it is appropriate for the
- If the server does not recognize the control type or it is not
appropriate for the operation, and the criticality field is TRUE,
the server MUST NOT perform the operation, and for operations that
- have a response message, MUST return unavailableCriticalExtension
- in the resultCode.
+ have a response message, MUST return with the resultCode set to
+ unavailableCriticalExtension.
- If the server does not recognize the control type or it is not
appropriate for the operation, and the criticality field is FALSE,
the server MUST ignore the control.
+
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 13
+\f
+ Lightweight Directory Access Protocol Version 3
+
The controlValue may contain information associated with the
controlType. Its format is defined by the specification of the
control. Implementations MUST be prepared to handle arbitrary
contents of the controlValue octet string, including zero bytes. It
is absent only if there is no value information which is associated
with a control of its type. When a controlValue is defined in terms
- of ASN.1, and BER encoded according to Section 5.2, it also follows
+ of ASN.1, and BER encoded according to Section 5.1, it also follows
the extensibility rules in Section 4.
Servers list the controlType of request controls they recognize in
dependent semantics are given in a specification, the order of a
combination of controls in the SEQUENCE is ignored. Where the order
is to be ignored but cannot be ignored by the server, the message is
-
-
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 13
- Lightweight Directory Access Protocol Version 3
-
considered not well-formed and the operation fails with
protocolError.
are defined above should not be altered by the control's
specification),
- - whether information is to be present in the controlValue field,
- and if so, the format of the controlValue contents,
+ - whether the controlValue field is present, and if so, the format
+ of its contents,
- the semantics of the control, and
4.2. Bind Operation
- The function of the Bind Operation is to allow authentication
+ The function of the Bind operation is to allow authentication
information to be exchanged between the client and server. The Bind
operation should be thought of as the "authenticate" operation.
Operational, authentication, and security-related semantics of this
operation are given in [AuthMeth].
- The Bind Request is defined as follows:
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 14
+\f
+ Lightweight Directory Access Protocol Version 3
+
+ The Bind request is defined as follows:
BindRequest ::= [APPLICATION 0] SEQUENCE {
version INTEGER (1 .. 127),
mechanism LDAPString,
credentials OCTET STRING OPTIONAL }
- Fields of the Bind Request are:
+ Fields of the BindRequest are:
- version: A version number indicating the version of the protocol
- to be used for the LDAP exchange. This document describes version
- 3 of the protocol. There is no version negotiation. The client
- sets this field to the version it desires. If the server does not
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 14
- Lightweight Directory Access Protocol Version 3
-
- support the specified version, it MUST respond with protocolError
- in the resultCode field of the BindResponse.
+ to be used at the LDAP message layer. This document describes
+ version 3 of the protocol. There is no version negotiation. The
+ client sets this field to the version it desires. If the server
+ does not support the specified version, it MUST respond with a
+ BindResponse where the resultCode is set to protocolError.
- name: If not empty, the name of the Directory object that the
client wishes to bind as. This field may take on a null value (a
- authentication: information used in authentication. This type is
extensible as defined in Section 3.7 of [LDAPIANA]. Servers that
- do not support a choice supplied by a client return
- authMethodNotSupported in the resultCode field of the
- BindResponse.
+ do not support a choice supplied by a client return a BindResponse
+ with the resultCode set to authMethodNotSupported.
Textual passwords (consisting of a character sequence with a known
character set and encoding) transferred to the server using the
octets) MUST NOT be altered. The determination of whether a
password is textual is a local client matter.
- Authorization is the decision of which access an operation has to the
- directory. Among other things, the process of authorization takes as
- input authentication information obtained during the bind operation
- and/or other acts of authentication (such as lower layer security
- services).
-
+
+
+
+
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 15
+\f
+ Lightweight Directory Access Protocol Version 3
+
4.2.1. Processing of the Bind Request
Before processing a BindRequest, all uncompleted operations MUST
either complete or be abandoned. The server may either wait for the
uncompleted operations to complete, or abandon them. The server then
proceeds to authenticate the client in either a single-step, or
- multi-step bind process. Each step requires the server to return a
+ multi-step Bind process. Each step requires the server to return a
BindResponse to indicate the status of authentication.
After sending a BindRequest, clients MUST NOT send further LDAP PDUs
BindRequest.
If the client did not bind before sending a request and receives an
- operationsError to that request, it may then send a Bind Request. If
+ operationsError to that request, it may then send a BindRequest. If
this also fails or the client chooses not to bind on the existing
- LDAP exchange, it may close the connection, reopen it and begin again
- by first sending a PDU with a Bind Request. This will aid in
- interoperating with servers implementing other versions of LDAP.
+ LDAP session, it may terminate the LDAP session, re-establish it and
+ begin again by first sending a PDU with a BindRequest. This will aid
+ in interoperating with servers implementing other versions of LDAP.
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 15
- Lightweight Directory Access Protocol Version 3
-
- Clients may send multiple Bind Requests on an LDAP exchange to change
- the authentication and/or security associations or to complete a
- multi-stage bind process. Authentication from earlier binds is
- subsequently ignored.
+ Clients may send multiple Bind requests to change the authentication
+ and/or security associations or to complete a multi-stage Bind
+ process. Authentication from earlier binds is subsequently ignored.
For some SASL authentication mechanisms, it may be necessary for the
client to invoke the BindRequest multiple times ([AuthMeth] Section
- 8.2). Clients MUST NOT invoke operations between two Bind Requests
- made as part of a multi-stage bind.
+ 8.2). Clients MUST NOT invoke operations between two Bind requests
+ made as part of a multi-stage Bind.
A client may abort a SASL bind negotiation by sending a BindRequest
with a different value in the mechanism field of SaslCredentials, or
an AuthenticationChoice other than sasl.
If the client sends a BindRequest with the sasl mechanism field as an
- empty string, the server MUST return a BindResponse with
- authMethodNotSupported as the resultCode. This will allow clients to
+ empty string, the server MUST return a BindResponse with the
+ resultCode set to authMethodNotSupported. This will allow clients to
abort a negotiation if it wishes to try again with the same SASL
mechanism.
4.2.2. Bind Response
- The Bind Response is defined as follows.
+ The Bind response is defined as follows.
BindResponse ::= [APPLICATION 1] SEQUENCE {
COMPONENTS OF LDAPResult,
BindResponse consists simply of an indication from the server of the
status of the client's request for authentication.
- A successful bind operation is indicated by a BindResponse with a
+
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 16
+\f
+ Lightweight Directory Access Protocol Version 3
+
+ A successful Bind operation is indicated by a BindResponse with a
resultCode set to success. Otherwise, an appropriate result code is
- set in the BindResponse. For bind, the protocolError result code may
- be used to indicate that the version number supplied by the client is
- unsupported.
+ set in the BindResponse. For BindResponse, the protocolError result
+ code may be used to indicate that the version number supplied by the
+ client is unsupported.
- If the client receives a BindResponse where the resultCode field is
+ If the client receives a BindResponse where the resultCode is set to
protocolError, it is to assume that the server does not support this
version of LDAP. While the client may be able proceed with another
version of this protocol (this may or may not require closing and re-
- establishing the connection), how to proceed with another version of
- this protocol is beyond the scope of this document. Clients which are
- unable or unwilling to proceed SHOULD close the connection.
+ establishing the transport connection), how to proceed with another
+ version of this protocol is beyond the scope of this document.
+ Clients which are unable or unwilling to proceed SHOULD terminate the
+ LDAP session.
The serverSaslCreds field is used as part of a SASL-defined bind
mechanism to allow the client to authenticate the server to which it
this field SHALL NOT be included in the BindResponse.
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 16
- Lightweight Directory Access Protocol Version 3
-
4.3. Unbind Operation
- The function of the Unbind Operation is to terminate an LDAP exchange
- and close the connection. The Unbind operation is not the antithesis
- of the Bind operation as the name implies. The naming of these
- operations is historical. The Unbind operation should be thought of
- as the "quit" operation.
+ The function of the Unbind operation is to terminate an LDAP session.
+ The Unbind operation is not the antithesis of the Bind operation as
+ the name implies. The naming of these operations are historical. The
+ Unbind operation should be thought of as the "quit" operation.
- The Unbind Operation is defined as follows:
+ The Unbind operation is defined as follows:
UnbindRequest ::= [APPLICATION 2] NULL
- The Unbind Operation has no response defined. Upon transmission of
- the UnbindRequest, each protocol peer is to consider the LDAP
- exchange terminated, MUST cease transmission of messages to the other
- peer, and MUST close the connection. Uncompleted operations are
- handled as specified in Section 5.1.
+ The client, upon transmission of the UnbindRequest, and the server,
+ upon receipt of the UnbindRequest are to gracefully terminate the
+ LDAP session as described in Section 5.3.
+
+ Uncompleted operations are handled as specified in Section 3.1.
4.4. Unsolicited Notification
An unsolicited notification is an LDAPMessage sent from the server to
the client which is not in response to any LDAPMessage received by
the server. It is used to signal an extraordinary condition in the
- server or in the LDAP exchange or connection between the client and
- the server. The notification is of an advisory nature, and the server
- will not expect any response to be returned from the client.
+ server or in the LDAP session between the client and the server. The
+ notification is of an advisory nature, and the server will not expect
+ any response to be returned from the client.
+
+
+
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 17
+\f
+ Lightweight Directory Access Protocol Version 3
+
The unsolicited notification is structured as an LDAPMessage in which
- the messageID is zero and protocolOp is of the extendedResp form (See
- Section 4.12). The responseName field of the ExtendedResponse always
- contains an LDAPOID which is unique for this notification.
+ the messageID is zero and protocolOp is set to the extendedResp
+ choice using the ExtendedResponse type (See Section 4.12). The
+ responseName field of the ExtendedResponse always contains an LDAPOID
+ which is unique for this notification.
One unsolicited notification (Notice of Disconnection) is defined in
this document. The specification of an unsolicited notification
- the OBJECT IDENTIFIER assigned to the notification (to be
specified in the responseName,
- - the format of the contents (if any) of the responseValue,
+ - the format of the contents of the responseValue (if any),
- - the circumstances which will cause the notification to be
- returned, and
+ - the circumstances which will cause the notification to be sent,
+ and
- - the semantics of the operation.
+ - the semantics of the message.
4.4.1. Notice of Disconnection
This notification may be used by the server to advise the client that
- the server is about to close the connection due to an error
- condition. This notification is intended to assist clients in
- distinguishing between an error condition and a transient network
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 17
- Lightweight Directory Access Protocol Version 3
-
- failure. Note that this notification is not a response to an unbind
- requested by the client. Uncompleted operations are handled as
- specified in Section 5.1.
+ the server is about to terminate the LDAP session on its own
+ initiative. This notification is intended to assist clients in
+ distinguishing between an exceptional server condition and a
+ transient network failure. Note that this notification is not a
+ response to an Unbind requested by the client. Uncompleted operations
+ are handled as specified in Section 3.1.
The responseName is 1.3.6.1.4.1.1466.20036, the responseValue field
is absent, and the resultCode is used to indicate the reason for the
- disconnection.
+ disconnection. When the strongerAuthRequired resultCode is returned
+ with this message, it indicates that the server has detected that an
+ established security association between the client and server has
+ unexpectedly failed or been compromised.
- Upon transmission of the Notice of Disconnection, the server is to
- consider the LDAP exchange terminated, MUST cease transmission of
- messages to the client, and MUST close the connection.
+ Upon transmission of the Notice of Disconnection, the server
+ gracefully terminates the LDAP session as described in Section 5.3.
4.5. Search Operation
- The Search Operation is used to request a server to return, subject
+ The Search operation is used to request a server to return, subject
to access controls and other restrictions, a set of entries matching
a complex search criterion. This can be used to read attributes from
a single entry, from entries immediately subordinate to a particular
4.5.1. Search Request
- The Search Request is defined as follows:
+ The Search request is defined as follows:
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 18
+\f
+ Lightweight Directory Access Protocol Version 3
+
SearchRequest ::= [APPLICATION 3] SEQUENCE {
baseObject LDAPDN,
scope ENUMERATED {
baseObject (0),
singleLevel (1),
- wholeSubtree (2) },
+ wholeSubtree (2),
+ ... },
derefAliases ENUMERATED {
neverDerefAliases (0),
derefInSearching (1),
AttributeSelection ::= SEQUENCE OF selector LDAPString
-- The LDAPString is constrained to
- -- <attributeSelector> below
+ -- <attributeSelector> in Section 4.5.1.7
Filter ::= CHOICE {
- and [0] SET OF filter Filter,
- or [1] SET OF filter Filter,
+ and [0] SET SIZE (1..MAX) OF filter Filter,
+ or [1] SET SIZE (1..MAX) OF filter Filter,
not [2] Filter,
equalityMatch [3] AttributeValueAssertion,
substrings [4] SubstringFilter,
greaterOrEqual [5] AttributeValueAssertion,
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 18
- Lightweight Directory Access Protocol Version 3
-
lessOrEqual [6] AttributeValueAssertion,
present [7] AttributeDescription,
approxMatch [8] AttributeValueAssertion,
- extensibleMatch [9] MatchingRuleAssertion }
+ extensibleMatch [9] MatchingRuleAssertion,
+ ... }
SubstringFilter ::= SEQUENCE {
type AttributeDescription,
- -- initial and final can occur at most once
substrings SEQUENCE SIZE (1..MAX) OF substring CHOICE {
- initial [0] AssertionValue,
+ initial [0] AssertionValue, -- can occur at most once
any [1] AssertionValue,
- final [2] AssertionValue } }
+ final [2] AssertionValue } -- can occur at most once
+ }
MatchingRuleAssertion ::= SEQUENCE {
matchingRule [1] MatchingRuleId OPTIONAL,
matchValue [3] AssertionValue,
dnAttributes [4] BOOLEAN DEFAULT FALSE }
- Fields of the Search Request are:
+
+
+
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 19
+\f
+ Lightweight Directory Access Protocol Version 3
+
+ Note that an X.500 "list"-like operation can be emulated by the
+ client requesting a singleLevel Search operation with a filter
+ checking for the presence of the 'objectClass' attribute, and that an
+ X.500 "read"-like operation can be emulated by a baseObject Search
+ operation with the same filter. A server which provides a gateway to
+ X.500 is not required to use the Read or List operations, although it
+ may choose to do so, and if it does, it must provide the same
+ semantics as the X.500 Search operation.
+
+
+4.5.1.1 SearchRequest.baseObject
+
+ The name of the base object entry (or possibly the root) relative to
+ which the Search is to be performed.
- - baseObject: The name of the base object entry relative to which
- the search is to be performed.
- - scope: Specifies the scope of the search to be performed. The
- semantics (as described in [X.511]) of the possible values of this
- field are:
-
- baseObject: The scope is constrained to the entry named by
- baseObject.
-
- singleLevel: The scope is constrained to the immediate
- subordinates of the entry named by baseObject.
-
- wholeSubtree: the scope is constrained to the entry named by
- the baseObject, and all its subordinates.
+4.5.1.2 SearchRequest.scope
+
+ Specifies the scope of the Search to be performed. The semantics (as
+ described in [X.511]) of the defined values of this field are:
+ baseObject: The scope is constrained to the entry named by
+ baseObject.
+
+ singleLevel: The scope is constrained to the immediate
+ subordinates of the entry named by baseObject.
+
+ wholeSubtree: the scope is constrained to the entry named by the
+ baseObject, and all its subordinates.
- - derefAliases: An indicator as to how alias entries (as defined in
- [Models]) are to be handled in searching. The semantics of the
- possible values of this field are:
- neverDerefAliases: Do not dereference aliases in searching or
- in locating the base object of the search.
-
- derefInSearching: While searching, dereference any alias entry
- subordinate to the base object which is also in the search
- scope. The filter is applied to the dereferenced object(s). If
- the search scope is wholeSubtree, the search continues in the
- subtree of any dereferenced object. Aliases in that subtree are
- also dereferenced. Servers SHOULD eliminate duplicate entries
- that arise due to alias dereferencing while searching.
-
+4.5.1.3 SearchRequest.derefAliases
+
+ An indicator as to whether or not alias entries (as defined in
+ [Models]) are to be dereferenced during stages of the Search
+ operation.
+
+ The act of dereferencing an alias includes recursively dereferencing
+ aliases which refer to aliases.
+
+ Servers MUST detect looping while dereferencing aliases in order to
+ prevent denial of service attacks of this nature.
+
+ The semantics of the defined values of this field are:
+
+ neverDerefAliases: Do not dereference aliases in searching or in
+ locating the base object of the Search.
+
+
+
+
+
-Sermersheim Internet-Draft - Expires Apr 2005 Page 19
+Sermersheim Internet-Draft - Expires Aug 2005 Page 20
+\f
Lightweight Directory Access Protocol Version 3
- derefFindingBaseObj: Dereference aliases in locating the base
- object of the search, but not when searching subordinates of
- the base object.
-
- derefAlways: Dereference aliases both in searching and in
- locating the base object of the search.
- Servers MUST detect looping while dereferencing aliases in order
- to prevent denial of service attacks of this nature.
-
- - sizeLimit: A size limit that restricts the maximum number of
- entries to be returned as a result of the search. A value of zero
- in this field indicates that no client-requested size limit
- restrictions are in effect for the search. Servers may also
- enforce a maximum number of entries to return.
-
- - timeLimit: A time limit that restricts the maximum time (in
- seconds) allowed for a search. A value of zero in this field
- indicates that no client-requested time limit restrictions are in
- effect for the search. Servers may also enforce a maximum time
- limit for the search.
-
- - typesOnly: An indicator as to whether search results are to
- contain both attribute descriptions and values, or just attribute
- descriptions. Setting this field to TRUE causes only attribute
- descriptions (no values) to be returned. Setting this field to
- FALSE causes both attribute descriptions and values to be
- returned.
-
- - filter: A filter that defines the conditions that must be
- fulfilled in order for the search to match a given entry.
+ derefInSearching: While searching subordinates of the base object,
+ dereference any alias within the search scope. Dereferenced
+ objects become the vertices of further search scopes where the
+ Search operation is also applied. If the search scope is
+ wholeSubtree, the Search continues in the subtree(s) of any
+ dereferenced object. If the search scope is singleLevel, the
+ search is applied to any dereferenced objects, and is not applied
+ to their subordinates. Servers SHOULD eliminate duplicate entries
+ that arise due to alias dereferencing while searching.
- The 'and', 'or' and 'not' choices can be used to form combinations
- of filters. At least one filter element MUST be present in an
- 'and' or 'or' choice. The others match against individual
- attribute values of entries in the scope of the search.
- (Implementor's note: the 'not' filter is an example of a tagged
- choice in an implicitly-tagged module. In BER this is treated as
- if the tag was explicit.)
-
- A server MUST evaluate filters according to the three-valued logic
- of X.511 (1993) Section 7.8.1. In summary, a filter is evaluated
- to either "TRUE", "FALSE" or "Undefined". If the filter evaluates
- to TRUE for a particular entry, then the attributes of that entry
- are returned as part of the search result (subject to any
- applicable access control restrictions). If the filter evaluates
- to FALSE or Undefined, then the entry is ignored for the search.
+ derefFindingBaseObj: Dereference aliases in locating the base
+ object of the Search, but not when searching subordinates of the
+ base object.
- A filter of the "and" choice is TRUE if all the filters in the SET
- OF evaluate to TRUE, FALSE if at least one filter is FALSE, and
- otherwise Undefined. A filter of the "or" choice is FALSE if all
- of the filters in the SET OF evaluate to FALSE, TRUE if at least
- one filter is TRUE, and Undefined otherwise. A filter of the 'not'
- choice is TRUE if the filter being negated is FALSE, FALSE if it
- is TRUE, and Undefined if it is Undefined.
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 20
+ derefAlways: Dereference aliases both in searching and in locating
+ the base object of the Search.
+
+
+4.5.1.4 SearchRequest.sizeLimit
+
+ A size limit that restricts the maximum number of entries to be
+ returned as a result of the Search. A value of zero in this field
+ indicates that no client-requested size limit restrictions are in
+ effect for the Search. Servers may also enforce a maximum number of
+ entries to return.
+
+
+4.5.1.5 SearchRequest.timeLimit
+
+ A time limit that restricts the maximum time (in seconds) allowed for
+ a Search. A value of zero in this field indicates that no client-
+ requested time limit restrictions are in effect for the Search.
+ Servers may also enforce a maximum time limit for the Search.
+
+
+4.5.1.6 SearchRequest.typesOnly
+
+ An indicator as to whether Search results are to contain both
+ attribute descriptions and values, or just attribute descriptions.
+ Setting this field to TRUE causes only attribute descriptions (no
+ values) to be returned. Setting this field to FALSE causes both
+ attribute descriptions and values to be returned.
+
+
+
+
+
+
+
+
+
+
+
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 21
+\f
Lightweight Directory Access Protocol Version 3
-
- The present match evaluates to TRUE where there is an attribute or
- subtype of the specified attribute description present in an
- entry, and FALSE otherwise (including a presence test with an
- unrecognized attribute description.)
-
- The matching rule for equalityMatch filter items is defined by the
- EQUALITY matching rule for the attribute type.
-
- There SHALL be at most one 'initial', and at most one 'final' in
- the 'substrings' of a SubstringFilter. If 'initial' is present, it
- SHALL be the first element of 'substrings'. If 'final' is present,
- it SHALL be the last element of 'substrings'.
- The matching rule for AssertionValues in a substrings filter item
- is defined by the SUBSTR matching rule for the attribute type.
- Note that the AssertionValue in a substrings filter item conforms
- to the assertion syntax of the EQUALITY matching rule for the
- attribute type rather than the assertion syntax of the SUBSTR
- matching rule for the attribute type. Conceptually, the entire
- SubstringFilter is converted into an assertion value of the
- substrings matching rule prior to applying the rule.
-
- The matching rule for the greaterOrEqual filter item is defined by
- the ORDERING and EQUALITY matching rules for the attribute type.
-
- The matching rule for the lessOrEqual filter item is defined by
- the ORDERING matching rule for the attribute type.
-
- An approxMatch filter item evaluates to TRUE when there is a value
- of the attribute or subtype for which some locally-defined
- approximate matching algorithm (e.g. spelling variations, phonetic
- match, etc.) returns TRUE. If an item matches for equality, it
- also satisfies an approximate match. If approximate matching is
- not supported for the attribute, this filter item should be
- treated as an equalityMatch.
-
- An extensibleMatch filter item is evaluated as follows:
+4.5.1.7 SearchRequest.filter
+
+ A filter that defines the conditions that must be fulfilled in order
+ for the Search to match a given entry.
+
+ The 'and', 'or' and 'not' choices can be used to form combinations of
+ filters. At least one filter element MUST be present in an 'and' or
+ 'or' choice. The others match against individual attribute values of
+ entries in the scope of the Search. (Implementor's note: the 'not'
+ filter is an example of a tagged choice in an implicitly-tagged
+ module. In BER this is treated as if the tag was explicit.)
+
+ A server MUST evaluate filters according to the three-valued logic of
+ [X.511] (1993) Clause 7.8.1. In summary, a filter is evaluated to
+ either "TRUE", "FALSE" or "Undefined". If the filter evaluates to
+ TRUE for a particular entry, then the attributes of that entry are
+ returned as part of the Search result (subject to any applicable
+ access control restrictions). If the filter evaluates to FALSE or
+ Undefined, then the entry is ignored for the Search.
+
+ A filter of the "and" choice is TRUE if all the filters in the SET OF
+ evaluate to TRUE, FALSE if at least one filter is FALSE, and
+ otherwise Undefined. A filter of the "or" choice is FALSE if all of
+ the filters in the SET OF evaluate to FALSE, TRUE if at least one
+ filter is TRUE, and Undefined otherwise. A filter of the 'not' choice
+ is TRUE if the filter being negated is FALSE, FALSE if it is TRUE,
+ and Undefined if it is Undefined.
+
+ A filter item evaluates to Undefined when the server would not be
+ able to determine whether the assertion value matches an entry.
+ Examples include:
+
+ - An attribute description in an equalityMatch, substrings,
+ greaterOrEqual, lessOrEqual, approxMatch or extensibleMatch
+ filter is not recognized by the server.
- If the matchingRule field is absent, the type field MUST be
- present, and an equality match is performed for that type.
-
- If the type field is absent and the matchingRule is present, the
- matchValue is compared against all attributes in an entry which
- support that matchingRule. The matchingRule determines the
- syntax for the assertion value. The filter item evaluates to
- TRUE if it matches with at least one attribute in the entry,
- FALSE if it does not match any attribute in the entry, and
- Undefined if the matchingRule is not recognized or the
- assertionValue is invalid.
-
- If the type field is present and the matchingRule is present,
- the matchValue is compared against entry attributes of the
- specified type. In this case, the matchingRule MUST be one
+ - The attribute type does not define the appropriate matching
+ rule.
+
+ - A MatchingRuleId in the extensibleMatch is not recognized by
+ the server or is not valid for the attribute type.
+
+ - The type of filtering requested is not implemented.
+
+ - The assertion value is invalid.
+
+
+
+
+
+
+
-Sermersheim Internet-Draft - Expires Apr 2005 Page 21
+Sermersheim Internet-Draft - Expires Aug 2005 Page 22
+\f
Lightweight Directory Access Protocol Version 3
- suitable for use with the specified type (see [Syntaxes]),
- otherwise the filter item is Undefined.
-
- If the dnAttributes field is set to TRUE, the match is
- additionally applied against all the AttributeValueAssertions in
- an entry's distinguished name, and evaluates to TRUE if there is
- at least one attribute in the distinguished name for which the
- filter item evaluates to TRUE. The dnAttributes field is present
- to alleviate the need for multiple versions of generic matching
- rules (such as word matching), where one applies to entries and
- another applies to entries and dn attributes as well.
-
- A filter item evaluates to Undefined when the server would not be
- able to determine whether the assertion value matches an entry.
- Examples include:
-
- - An attribute description in an equalityMatch, substrings,
- greaterOrEqual, lessOrEqual, approxMatch or extensibleMatch
- filter is not recognized by the server.
-
- - The attribute type does not define the appropriate matching
- rule.
-
- - A MatchingRuleId in the extensibleMatch is not recognized by
- the server or is not valid for the attribute type.
+ For example, if a server did not recognize the attribute type
+ shoeSize, a filter of (shoeSize=*) would evaluate to FALSE, and the
+ filters (shoeSize=12), (shoeSize>=12) and (shoeSize<=12) would each
+ evaluate to Undefined.
+
+ Servers MUST NOT return errors if attribute descriptions or matching
+ rule ids are not recognized, assertion values are invalid, or the
+ assertion syntax is not supported. More details of filter processing
+ are given in Clause 7.8 of [X.511].
+
+
+4.5.1.7.1 SearchRequest.filter.equalityMatch
+
+ The matching rule for equalityMatch filter items is defined by the
+ EQUALITY matching rule for the attribute type.
+
+
+4.5.1.7.2 SearchRequest.filter.substrings
+
+ There SHALL be at most one 'initial', and at most one 'final' in the
+ 'substrings' of a SubstringFilter. If 'initial' is present, it SHALL
+ be the first element of 'substrings'. If 'final' is present, it SHALL
+ be the last element of 'substrings'.
+
+ The matching rule for an AssertionValue in a substrings filter item
+ is defined by the SUBSTR matching rule for the attribute type. Note
+ that the AssertionValue in a substrings filter item conforms to the
+ assertion syntax of the EQUALITY matching rule for the attribute type
+ rather than the assertion syntax of the SUBSTR matching rule for the
+ attribute type. Conceptually, the entire SubstringFilter is converted
+ into an assertion value of the substrings matching rule prior to
+ applying the rule.
+
+
+4.5.1.7.3 SearchRequest.filter.greaterOrEqual
+
+ The matching rule for the greaterOrEqual filter item is defined by
+ the ORDERING and EQUALITY matching rules for the attribute type.
+
+
+4.5.1.7.4 SearchRequest.filter.lessOrEqual
+
+ The matching rule for the lessOrEqual filter item is defined by the
+ ORDERING matching rule for the attribute type.
+
+
+4.5.1.7.5 SearchRequest.filter.present
+
+ The present match evaluates to TRUE where there is an attribute or
+ subtype of the specified attribute description present in an entry,
+ and FALSE otherwise (including a presence test with an unrecognized
+ attribute description).
+
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 23
+\f
+ Lightweight Directory Access Protocol Version 3
+
+4.5.1.7.6 SearchRequest.filter.approxMatch
+
+ An approxMatch filter item evaluates to TRUE when there is a value of
+ the attribute or subtype for which some locally-defined approximate
+ matching algorithm (e.g. spelling variations, phonetic match, etc.)
+ returns TRUE. If an item matches for equality, it also satisfies an
+ approximate match. If approximate matching is not supported for the
+ attribute, this filter item should be treated as an equalityMatch.
+
+
+4.5.1.7.7 SearchRequest.filter.extensibleMatch
+
+ The fields of the extensibleMatch filter item are evaluated as
+ follows:
+
+ - If the matchingRule field is absent, the type field MUST be
+ present, and an equality match is performed for that type.
- - The type of filtering requested is not implemented.
+ - If the type field is absent and the matchingRule is present, the
+ matchValue is compared against all attributes in an entry which
+ support that matchingRule.
+
+ - If the type field is present and the matchingRule is present, the
+ matchValue is compared against entry attributes of the specified
+ type.
+
+ - If the dnAttributes field is set to TRUE, the match is
+ additionally applied against all the AttributeValueAssertions in
+ an entry's distinguished name, and evaluates to TRUE if there is
+ at least one attribute in the distinguished name for which the
+ filter item evaluates to TRUE. The dnAttributes field is present
+ to alleviate the need for multiple versions of generic matching
+ rules (such as word matching), where one applies to entries and
+ another applies to entries and DN attributes as well.
- - The assertion value is invalid.
+ The matchingRule used for evaluation determines the syntax for the
+ assertion value. Once the matchingRule and attribute(s) have been
+ determined, the filter item evaluates to TRUE if it matches with at
+ least one attribute in the entry, FALSE if it does not match any
+ attribute in the entry, and Undefined if the matchingRule is not
+ recognized, the matchingRule is unsuitable for use with the specified
+ type, or the assertionValue is invalid.
- For example, if a server did not recognize the attribute type
- shoeSize, a filter of (shoeSize=*) would evaluate to FALSE, and
- the filters (shoeSize=12), (shoeSize>=12) and (shoeSize<=12) would
- each evaluate to Undefined.
-
- Servers MUST NOT return errors if attribute descriptions or
- matching rule ids are not recognized, assertion values are
- invalid, or the assertion syntax is not supported. More details of
- filter processing are given in Section 7.8 of [X.511].
- - attributes: A selection list of the attributes to be returned from
- each entry which matches the search filter. LDAPString values of
- this field are constrained to the following Augmented Backus-Naur
- Form ([ABNF]):
+4.5.1.7 SearchRequest.attributes
- attributeSelector = attributedescription / selectorpecial
+ A selection list of the attributes to be returned from each entry
+ which matches the search filter. LDAPString values of this field are
+ constrained to the following Augmented Backus-Naur Form ([ABNF]):
+
+ attributeSelector = attributedescription / selectorspecial
selectorspecial = noattrs / alluserattrs
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 24
+\f
+ Lightweight Directory Access Protocol Version 3
+
noattrs = %x31.2E.31 ; "1.1"
alluserattrs = %x2A ; asterisk ("*")
-
-
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 22
- Lightweight Directory Access Protocol Version 3
-
The <attributedescription> production is defined in Section 2.5 of
[Models].
- There are three special cases which may appear in the attributes
- selection list:
+ There are three special cases which may appear in the attributes
+ selection list:
- an empty list with no attributes,
- a list containing "*" (with zero or more attribute
- descriptions), and
+ descriptions), and
- a list containing only "1.1".
This OID was chosen because it does not (and can not) correspond
to any attribute in use.
- Client implementors should note that even if all user attributes
- are requested, some attributes and/or attribute values of the
- entry may not be included in search results due to access controls
- or other restrictions. Furthermore, servers will not return
- operational attributes, such as objectClasses or attributeTypes,
- unless they are listed by name. Operational attributes are
- described in [Models].
-
- Attributes are returned at most once in an entry. If an attribute
- description is named more than once in the list, the subsequent
- names are ignored. If an attribute description in the list is not
- recognized, it is ignored by the server.
-
- Note that an X.500 "list"-like operation can be emulated by the
- client requesting a one-level LDAP search operation with a filter
- checking for the presence of the 'objectClass' attribute, and that an
- X.500 "read"-like operation can be emulated by a base object LDAP
- search operation with the same filter. A server which provides a
- gateway to X.500 is not required to use the Read or List operations,
- although it may choose to do so, and if it does, it must provide the
- same semantics as the X.500 search operation.
+ Client implementors should note that even if all user attributes are
+ requested, some attributes and/or attribute values of the entry may
+ not be included in Search results due to access controls or other
+ restrictions. Furthermore, servers will not return operational
+ attributes, such as objectClasses or attributeTypes, unless they are
+ listed by name. Operational attributes are described in [Models].
+
+ Attributes are returned at most once in an entry. If an attribute
+ description is named more than once in the list, the subsequent names
+ are ignored. If an attribute description in the list is not
+ recognized, it is ignored by the server.
4.5.2. Search Result
- The results of the search operation are returned as zero or more
- searchResultEntry messages, zero or more SearchResultReference
- messages, followed by a single searchResultDone message.
+ The results of the Search operation are returned as zero or more
+ SearchResultEntry and/or SearchResultReference messages, followed by
+ a single SearchResultDone message.
SearchResultEntry ::= [APPLICATION 4] SEQUENCE {
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 23
- Lightweight Directory Access Protocol Version 3
-
objectName LDAPDN,
attributes PartialAttributeList }
PartialAttributeList ::= SEQUENCE OF
partialAttribute PartialAttribute
- -- Note that the PartialAttributeList may hold zero elements.
- -- This may happen when none of the attributes of an entry
- -- were requested, or could be returned.
- -- Note also that the partialAttribute vals set may hold zero
- -- elements. This may happen when typesOnly is requested, access
- -- controls prevent the return of values, or other reasons.
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 25
+\f
+ Lightweight Directory Access Protocol Version 3
+
SearchResultReference ::= [APPLICATION 19] SEQUENCE
SIZE (1..MAX) OF uri URI
SearchResultDone ::= [APPLICATION 5] LDAPResult
- Each SearchResultEntry represents an entry found during the search.
+ Each SearchResultEntry represents an entry found during the Search.
Each SearchResultReference represents an area not yet explored during
- the search. The SearchResultEntry and SearchResultReference PDUs may
+ the Search. The SearchResultEntry and SearchResultReference PDUs may
come in any order. Following all the SearchResultReference and
SearchResultEntry responses, the server returns a SearchResultDone
response, which contains an indication of success, or detailing any
Each entry returned in a SearchResultEntry will contain all
appropriate attributes as specified in the attributes field of the
- Search Request. Return of attributes is subject to access control and
- other administrative policy.
+ Search Request, subject to access control and other administrative
+ policy. Note that the PartialAttributeList may hold zero elements.
+ This may happen when none of the attributes of an entry were
+ requested, or could be returned. Note also that the partialAttribute
+ vals set may hold zero elements. This may happen when typesOnly is
+ requested, access controls prevent the return of values, or other
+ reasons.
Some attributes may be constructed by the server and appear in a
SearchResultEntry attribute list, although they are not stored
4.5.3. Continuation References in the Search Result
If the server was able to locate the entry referred to by the
- baseObject but was unable to search one or more non-local entries,
- the server may return one or more SearchResultReference entries, each
- containing a reference to another set of servers for continuing the
- operation. A server MUST NOT return any SearchResultReference if it
- has not located the baseObject and thus has not searched any entries;
- in this case it would return a SearchResultDone containing either a
+ baseObject but was unable or unwilling to search one or more non-
+ local entries, the server may return one or more
+ SearchResultReference messages, each containing a reference to
+ another set of servers for continuing the operation. A server MUST
+ NOT return any SearchResultReference messages if it has not located
+ the baseObject and thus has not searched any entries; in this case it
+ would return a SearchResultDone containing either a referral or
+ noSuchObject result code (depending on the server's knowledge of the
+ entry named in the baseObject).
+
+
+
-Sermersheim Internet-Draft - Expires Apr 2005 Page 24
+Sermersheim Internet-Draft - Expires Aug 2005 Page 26
+\f
Lightweight Directory Access Protocol Version 3
- referral or noSuchObject result code (depending on the server's
- knowledge of the entry named in the baseObject).
-
If a server holds a copy or partial copy of the subordinate naming
- context [Section 5 of Models], it may use the search filter to
+ context (Section 5 of [Models]), it may use the search filter to
determine whether or not to return a SearchResultReference response.
Otherwise SearchResultReference responses are always returned when in
scope.
The SearchResultReference is of the same data type as the Referral.
- A URI for a server implementing LDAP and accessible via [TCP]/[IP]
- (v4 or v6) is written as an LDAP URL according to [LDAPURL].
-
- In order to complete the search, the client issues a new search
- operation for each SearchResultReference that is returned. Note that
- the abandon operation described in Section 4.11 applies only to a
- particular operation sent on the LDAP exchange between a client and
- server. The client must abandon subsequent search operations it
- wishes to individually.
+ If the client wishes to progress the Search, it issues a new Search
+ operation for each SearchResultReference that is returned. If
+ multiple URIs are present, the client assumes that any supported URI
+ may be used to progress the operation.
Clients that follow search continuation references MUST ensure that
they do not loop between servers. They MUST NOT repeatedly contact
- the same server for the same request with the same target entry name,
- scope and filter. Some clients use a counter that is incremented each
- time search result reference handling occurs for an operation, and
- these kinds of clients MUST be able to handle at least ten nested
- search result references between the root and a leaf entry.
+ the same server for the same request with the same parameters. Some
+ clients use a counter that is incremented each time search result
+ reference handling occurs for an operation, and these kinds of
+ clients MUST be able to handle at least ten nested referrals while
+ progressing the operation.
+
+ Note that the Abandon operation described in Section 4.11 applies
+ only to a particular operation sent at the LDAP message layer between
+ a client and server. The client must abandon subsequent Search
+ operations it wishes to individually.
+
+ A URI for a server implementing LDAP and accessible via [TCP]/[IP]
+ (v4 or v6) is written as an LDAP URL according to [LDAPURL].
- When an LDAP URL is used, the following instructions are followed:
+ SearchResultReference values which are LDAP URLs follow these rules:
- - The <dn> part of the URL MUST be present, with the new target
- object name. The client MUST use this name when following the
- reference. UTF-8 encoded characters appearing in the string
- representation of a DN or search filter may not be legal for URLs
- (e.g. spaces) and MUST be escaped using the % method in [URI].
+ - The <dn> part of the LDAP URL MUST be present, with the new target
+ object name. The client uses this name when following the
+ reference.
- Some servers (e.g. participating in distributed indexing) may
- provide a different filter in a URL of a SearchResultReference.
+ provide a different filter in the LDAP URL.
- - If the <filter> part of the URL is present, the client MUST use
- this filter in its next request to progress this search, and if it
- is not present the client MUST use the same filter as it used for
- that search.
+ - If the <filter> part of the LDAP URL is present, the client uses
+ this filter in its next request to progress this Search, and if it
+ is not present the client uses the same filter as it used for that
+ Search.
- If the originating search scope was singleLevel, the <scope> part
- of the URL will be "base".
+ of the LDAP URL will be "base".
- It is RECOMMENDED that the <scope> part be present to avoid
- ambiguity.
+ ambiguity. In the absence of a <scope> part, the scope of the
+ original Search request is assumed.
- - Other aspects of the new search request may be the same as or
- different from the search request which generated the
+ - Other aspects of the new Search request may be the same as or
+ different from the Search request which generated the
SearchResultReference.
+
-Sermersheim Internet-Draft - Expires Apr 2005 Page 25
+Sermersheim Internet-Draft - Expires Aug 2005 Page 27
+\f
Lightweight Directory Access Protocol Version 3
-
- The name of an unexplored subtree in a SearchResultReference need
not be subordinate to the base object.
Other kinds of URIs may be returned. The syntax and semantics of such
URIs is left to future specifications. Clients may ignore URIs that
they do not support.
+
+ UTF-8 encoded characters appearing in the string representation of a
+ DN, search filter, or other fields of the referral value may not be
+ legal for URIs (e.g. spaces) and MUST be escaped using the % method
+ in [URI].
+
4.5.3.1. Examples
For example, suppose the contacted server (hosta) holds the entry
<DC=Example,DC=NET> and the entry <CN=Manager,DC=Example,DC=NET>. It
- knows that either LDAP-capable servers (hostb) or (hostc) hold
+ knows that both LDAP servers (hostb) and (hostc) hold
<OU=People,DC=Example,DC=NET> (one is the master and the other server
a shadow), and that LDAP-capable server (hostd) holds the subtree
- <OU=Roles,DC=Example,DC=NET>. If a wholeSubtree search of
+ <OU=Roles,DC=Example,DC=NET>. If a wholeSubtree Search of
<DC=Example,DC=NET> is requested to the contacted server, it may
return the following:
Client implementors should note that when following a
SearchResultReference, additional SearchResultReference may be
generated. Continuing the example, if the client contacted the server
- (hostb) and issued the search for the subtree
+ (hostb) and issued the Search request for the subtree
<OU=People,DC=Example,DC=NET>, the server might respond as follows:
SearchResultEntry for OU=People,DC=Example,DC=NET
ldap://hostf/OU=Consultants,OU=People,DC=Example,DC=NET??sub }
SearchResultDone (success)
- Similarly, if a singleLevel search of <DC=Example,DC=NET> is
+ Similarly, if a singleLevel Search of <DC=Example,DC=NET> is
requested to the contacted server, it may return the following:
+
+
+
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 28
+\f
+ Lightweight Directory Access Protocol Version 3
+
SearchResultEntry for CN=Manager,DC=Example,DC=NET
SearchResultReference {
ldap://hostb/OU=People,DC=Example,DC=NET??base
ldap://hostd/OU=Roles,DC=Example,DC=NET??base }
SearchResultDone (success)
-
-
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 26
- Lightweight Directory Access Protocol Version 3
-
- If the contacted server does not hold the base object for the search,
+ If the contacted server does not hold the base object for the Search,
but has knowledge of its possible location, then it may return a
referral to the client. In this case, if the client requests a
- subtree search of <DC=Example,DC=ORG> to hosta, the server returns a
+ subtree Search of <DC=Example,DC=ORG> to hosta, the server returns a
SearchResultDone containing a referral.
SearchResultDone (referral) {
4.6. Modify Operation
- The Modify Operation allows a client to request that a modification
+ The Modify operation allows a client to request that a modification
of an entry be performed on its behalf by a server. The Modify
Request is defined as follows:
operation ENUMERATED {
add (0),
delete (1),
- replace (2) },
+ replace (2),
+ ... },
modification PartialAttribute } }
Fields of the Modify Request are:
- - object: The name of the object to be modified. The value of this
- field contains the DN of the entry to be modified. The server
- SHALL NOT perform any alias dereferencing in determining the
- object to be modified.
+ - object: The value of this field contains the name of the entry to
+ be modified. The server SHALL NOT perform any alias dereferencing
+ in determining the object to be modified.
- changes: A list of modifications to be performed on the entry. The
entire list of modifications MUST be performed in the order they
modification. The values of this field have the following
semantics respectively:
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 29
+\f
+ Lightweight Directory Access Protocol Version 3
+
add: add values listed to the modification attribute,
creating the attribute if necessary;
- delete: delete values listed from the modification attribute,
- removing the entire attribute if no values are listed, or if
- all current values of the attribute are listed for deletion;
+ delete: delete values listed from the modification attribute.
+ If no values are listed, or if all current values of the
+ attribute are listed, the entire attribute is removed;
-
-
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 27
- Lightweight Directory Access Protocol Version 3
-
replace: replace all existing values of the modification
attribute with the new values listed, creating the attribute
if it did not already exist. A replace with no value will
been performed if the Modify Response received indicates any sort of
error, and that all requested modifications have been performed if
the Modify Response indicates successful completion of the Modify
- Operation. The result of the modification is indeterminate if the
- Modify Response is not received (e.g. the LDA exchange is terminated
- or the Modify Operation is abandoned).
-
- The Modify Operation cannot be used to remove from an entry any of
- its distinguished values, i.e. those values which form the entry's
- relative distinguished name. An attempt to do so will result in the
- server returning the notAllowedOnRDN result code. The Modify DN
- Operation described in Section 4.9 is used to rename an entry.
+ operation. Whether the modification was applied or not cannot be
+ determined by the client if the Modify Response was not received
+ (e.g. the LDAP session was terminated or the Modify operation was
+ abandoned).
+
+ Servers MUST ensure that entries conform to user and system schema
+ rules or other data model constraints. The Modify operation cannot be
+ used to remove from an entry any of its distinguished values, i.e.
+ those values which form the entry's relative distinguished name. An
+ attempt to do so will result in the server returning the
+ notAllowedOnRDN result code. The Modify DN operation described in
+ Section 4.9 is used to rename an entry.
+
+ For attribute types which specify no equality matching, the rules in
+ Section 2.5.1 of [Models] are followed.
Note that due to the simplifications made in LDAP, there is not a
direct mapping of the changes in an LDAP ModifyRequest onto the
change. If successful, the final effect of the operations on the
entry MUST be identical.
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 30
+\f
+ Lightweight Directory Access Protocol Version 3
+
4.7. Add Operation
- The Add Operation allows a client to request the addition of an entry
+ The Add operation allows a client to request the addition of an entry
into the Directory. The Add Request is defined as follows:
AddRequest ::= [APPLICATION 8] SEQUENCE {
AttributeList ::= SEQUENCE OF attribute Attribute
Fields of the Add Request are:
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 28
- Lightweight Directory Access Protocol Version 3
-
- entry: the name of the entry to be added. The server SHALL NOT
dereference any aliases in locating the entry to be added.
- attributes: the list of attributes that, along with those from the
RDN, make up the content of the entry being added. Clients MAY or
- MAY NOT include the RDN attribute in this list. Clients MUST
- include the 'objectClass' attribute, and values of any mandatory
- attributes of the listed object classes. Clients MUST NOT supply
- NO-USER-MODIFICATION attributes such as the createTimestamp or
- creatorsName attributes, since the server maintains these
- automatically.
+ MAY NOT include the RDN attribute(s) in this list. Clients MUST
+ NOT supply NO-USER-MODIFICATION attributes such as the
+ createTimestamp or creatorsName attributes, since the server
+ maintains these automatically.
+
+ Servers MUST ensure that entries conform to user and system schema
+ rules or other data model constraints. For attribute types which
+ specify no equality matching, the rules in Section 2.5.1 of [Models]
+ are followed (this applies to the naming attribute in addition to any
+ multi-valued attributes being added).
The entry named in the entry field of the AddRequest MUST NOT exist
for the AddRequest to succeed. The immediate superior (parent) of an
exist, then the server would return the noSuchObject result code with
the matchedDN field containing <DC=NET>.
- Server implementations SHOULD NOT restrict where entries can be
- located in the Directory unless DIT structure rules are in place.
- Some servers allow the administrator to restrict the classes of
- entries which can be added to the Directory.
-
Upon receipt of an Add Request, a server will attempt to add the
- requested entry. The result of the add attempt will be returned to
+ requested entry. The result of the Add attempt will be returned to
the client in the Add Response, defined as follows:
AddResponse ::= [APPLICATION 9] LDAPResult
4.8. Delete Operation
- The Delete Operation allows a client to request the removal of an
+ The Delete operation allows a client to request the removal of an
entry from the Directory. The Delete Request is defined as follows:
DelRequest ::= [APPLICATION 10] LDAPDN
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 31
+\f
+ Lightweight Directory Access Protocol Version 3
+
The Delete Request consists of the name of the entry to be deleted.
The server SHALL NOT dereference aliases while resolving the name of
the entry removal requested and return the result in the Delete
Response defined as follows:
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 29
- Lightweight Directory Access Protocol Version 3
-
DelResponse ::= [APPLICATION 11] LDAPResult
4.9. Modify DN Operation
- The Modify DN Operation allows a client to change the Relative
+ The Modify DN operation allows a client to change the Relative
Distinguished Name (RDN) of an entry in the Directory, and/or to move
a subtree of entries to a new location in the Directory. The Modify
DN Request is defined as follows:
- entry: the name of the entry to be changed. This entry may or may
not have subordinate entries.
- - newrdn: the new RDN of the entry. If the operation moves the entry
- to a new superior without changing its RDN, the value of the old
- RDN is supplied for this parameter.
- Attribute values of the new RDN not matching any attribute value
- of the entry are added to the entry and an appropriate error is
- returned if this fails.
+ - newrdn: the new RDN of the entry. The value of the old RDN is
+ supplied when moving the entry to a new superior without changing
+ its RDN. Attribute values of the new RDN not matching any
+ attribute value of the entry are added to the entry and an
+ appropriate error is returned if this fails.
- deleteoldrdn: a boolean field that controls whether the old RDN
attribute values are to be retained as attributes of the entry, or
the name change and return the result in the Modify DN Response,
defined as follows:
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 32
+\f
+ Lightweight Directory Access Protocol Version 3
+
ModifyDNResponse ::= [APPLICATION 13] LDAPResult
For example, if the entry named in the entry field was <cn=John
already an entry with that name, the operation would fail with the
entryAlreadyExists result code.
+ Servers MUST ensure that entries conform to user and system schema
+ rules or other data model constraints. For attribute types which
+ specify no equality matching, the rules in Section 2.5.1 of [Models]
+ are followed (this pertains to newrdn and deleteoldrdn).
+
The object named in newSuperior MUST exist. For example, if the
client attempted to add <CN=JS,DC=Example,DC=NET>, the
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 30
- Lightweight Directory Access Protocol Version 3
-
<DC=Example,DC=NET> entry did not exist, and the <DC=NET> entry did
exist, then the server would return the noSuchObject result code with
the matchedDN field containing <DC=NET>.
If the deleteoldrdn field is TRUE, the attribute values forming the
old RDN but not the new RDN are deleted from the entry. If the
deleteoldrdn field is FALSE, the attribute values forming the old RDN
- will be retained as non-distinguished attribute values of the entry.
- The server MUST fail the operation and return an error in the result
- code if the setting of the deleteoldrdn field would cause a schema
- inconsistency in the entry.
+ will be retained as non-distinguished attribute values of the entry.
Note that X.500 restricts the ModifyDN operation to only affect
entries that are contained within a single server. If the LDAP server
4.10. Compare Operation
- The Compare Operation allows a client to compare an assertion value
+ The Compare operation allows a client to compare an assertion value
with the values of a particular attribute in a particular entry in
the Directory. The Compare Request is defined as follows:
Upon receipt of a Compare Request, a server will attempt to perform
the requested comparison and return the result in the Compare
Response, defined as follows:
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 33
+\f
+ Lightweight Directory Access Protocol Version 3
+
CompareResponse ::= [APPLICATION 15] LDAPResult
- The resultCode field is set to compareTrue, compareFalse, or an
- appropriate error. compareTrue indicates that the assertion value in
- the ava field matches a value of the attribute or subtype according
- to the attribute's EQUALITY matching rule. compareFalse indicates
- that the assertion value in the ava field and the values of the
- attribute or subtype did not match. Other result codes indicate
- either that the result of the comparison was Undefined (Section
- 4.5.1), or that some error occurred.
+ The resultCode is set to compareTrue, compareFalse, or an appropriate
+ error. compareTrue indicates that the assertion value in the ava
+ field matches a value of the attribute or subtype according to the
+ attribute's EQUALITY matching rule. compareFalse indicates that the
+ assertion value in the ava field and the values of the attribute or
+ subtype did not match. Other result codes indicate either that the
+ result of the comparison was Undefined (Section 4.5.1), or that some
+ error occurred.
-
-
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 31
- Lightweight Directory Access Protocol Version 3
-
Note that some directory systems may establish access controls which
permit the values of certain attributes (such as userPassword) to be
compared but not interrogated by other means.
4.11. Abandon Operation
- The function of the Abandon Operation is to allow a client to request
+ The function of the Abandon operation is to allow a client to request
that the server abandon an uncompleted operation. The Abandon Request
is defined as follows:
AbandonRequest ::= [APPLICATION 16] MessageID
- The MessageID is that of an operation which was requested earlier in
- this LDAP exchange. The abandon request itself has its own MessageID.
- This is distinct from the MessageID of the earlier operation being
- abandoned.
+ The MessageID is that of an operation which was requested earlier at
+ this LDAP message layer. The Abandon request itself has its own
+ MessageID. This is distinct from the MessageID of the earlier
+ operation being abandoned.
There is no response defined in the Abandon operation. Upon receipt
of an AbandonRequest, the server MAY abandon the operation identified
Abandon, Bind, Unbind, and StartTLS operations cannot be abandoned.
In the event that a server receives an Abandon Request on a Search
- Operation in the midst of transmitting responses to the search, that
+ operation in the midst of transmitting responses to the Search, that
server MUST cease transmitting entry responses to the abandoned
- request immediately, and MUST NOT send the SearchResponseDone. Of
+ request immediately, and MUST NOT send the SearchResultDone. Of
course, the server MUST ensure that only properly encoded LDAPMessage
PDUs are transmitted.
The ability to abandon other (particularly update) operations is at
the discretion of the server.
- Clients should not send abandon requests for the same operation
+ Clients should not send Abandon requests for the same operation
multiple times, and MUST also be prepared to receive results from
operations it has abandoned (since these may have been in transit
- when the abandon was requested, or are not able to be abandoned).
+ when the Abandon was requested, or are not able to be abandoned).
- Servers MUST discard abandon requests for message IDs they do not
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 34
+\f
+ Lightweight Directory Access Protocol Version 3
+
+ Servers MUST discard Abandon requests for message IDs they do not
recognize, for operations which cannot be abandoned, and for
operations which have already been abandoned.
4.12. Extended Operation
- The extended operation allows additional operations to be defined for
- services not already available in the protocol. For example, to add
+ The Extended operation allows additional operations to be defined for
+ services not already available in the protocol. For example, to Add
operations to install transport layer security (see Section 4.14).
-
-
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 32
- Lightweight Directory Access Protocol Version 3
-
- The extended operation allows clients to make requests and receive
+ The Extended operation allows clients to make requests and receive
responses with predefined syntaxes and semantics. These may be
defined in RFCs or be private to particular implementations.
- Each extended operation consists of an extended request and an
- extended response.
+ Each Extended operation consists of an Extended request and an
+ Extended response.
ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
requestName [0] LDAPOID,
responseValue) is implicitly known and associated with the request by
the messageID.
- If the extended operation associated with the requestName is not
+ If the Extended operation associated with the requestName is not
supported by the server, the server MUST NOT provide a responseName
- nor a responseValue and MUST return a resultCode of protocolError.
+ nor a responseValue and MUST return with resultCode set to
+ protocolError.
The requestValue and responseValue fields contain any information
associated with the operation. The format of these fields is defined
- by the specification of the extended operation. Implementations MUST
+ by the specification of the Extended operation. Implementations MUST
be prepared to handle arbitrary contents of these fields, including
zero bytes. Values that are defined in terms of ASN.1 and BER encoded
- according to Section 5.2, also follow the extensibility rules in
+ according to Section 5.1, also follow the extensibility rules in
Section 4.
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 35
+\f
+ Lightweight Directory Access Protocol Version 3
+
Servers list the requestName of Extended Requests they recognize in
the 'supportedExtension' attribute in the root DSE (Section 5.1 of
[Models]).
Extended operations may be specified in other documents. The
- specification of an extended operation consists of:
+ specification of an Extended operation consists of:
- the OBJECT IDENTIFIER assigned to the requestName,
that the same OBJECT IDENTIFIER my be used for both the
requestName and responseName),
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 33
- Lightweight Directory Access Protocol Version 3
-
- the format of the contents of the requestValue and responseValue
(if any), and
4.13. IntermediateResponse Message
While the Search operation provides a mechanism to return multiple
- response messages for a single search request, other operations, by
+ response messages for a single Search request, other operations, by
nature, do not provide for multiple response messages.
The IntermediateResponse message provides a general mechanism for
defining single-request/multiple-response operations in LDAP. This
- message is intended to be used in conjunction with the extended
+ message is intended to be used in conjunction with the Extended
operation to define new single-request/multiple-response operations
or in conjunction with a control when extending existing LDAP
- operations in a way that requires them to return intermediate
+ operations in a way that requires them to return Intermediate
response information.
- It is intended that the definitions and descriptions of extended
+ It is intended that the definitions and descriptions of Extended
operations and controls that make use of the IntermediateResponse
message will define the circumstances when an IntermediateResponse
message can be sent by a server and the associated meaning of an
IntermediateResponse messages SHALL NOT be returned to the client
unless the client issues a request that specifically solicits their
- return. This document defines two forms of solicitation: extended
+ return. This document defines two forms of solicitation: Extended
operation and request control. IntermediateResponse messages are
specified in documents describing the manner in which they are
- solicited (i.e. in the extended operation or request control
+ solicited (i.e. in the Extended operation or request control
specification that uses them). These specifications include:
- the OBJECT IDENTIFIER (if any) assigned to the responseName,
- - the format of the contents of the responseValue, and
+ - the format of the contents of the responseValue (if any), and
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 36
+\f
+ Lightweight Directory Access Protocol Version 3
+
- the semantics associated with the IntermediateResponse message.
4.13.1. Usage with LDAP ExtendedRequest and ExtendedResponse
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 34
- Lightweight Directory Access Protocol Version 3
-
A single-request/multiple-response operation may be defined using a
single ExtendedRequest message to solicit zero or more
included in a request for any LDAP operation or
- one or more controls using IntermediateResponse messages are
- included in a request with an LDAP extended operation that uses
+ included in a request with an LDAP Extended operation that uses
IntermediateResponse messages.
4.14. StartTLS Operation
- The Start Transport Layer Security (StartTLS) operationÆs purpose is
+ The Start Transport Layer Security (StartTLS) operation's purpose is
to initiate installation of a TLS layer. The StartTLS operation is
- defined using the extended operation mechanism described in Section
+ defined using the Extended operation mechanism described in Section
4.12.
+
+
+
+
+
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 37
+\f
+ Lightweight Directory Access Protocol Version 3
+
4.14.1. StartTLS Request
A client requests TLS establishment by transmitting a StartTLS
of an ExtendedRequest. The requestName is "1.3.6.1.4.1.1466.20037",
and the requestValue field is always absent.
- The client MUST NOT send any PDUs on this LDAP exchange following
- this request until it receives a StartTLS extended response and, in
- the case of a successful response, completes TLS negotiations.
+ The client MUST NOT send any PDUs at this LDAP message layer
+ following this request until it receives a StartTLS Extended response
+ and, in the case of a successful response, completes TLS
+ negotiations.
- Sequencing problems (particularly those detailed in Section 3.1.1 of
- [AuthMeth] result in an operationsError being returned in the
- resultCode.
+ Detected sequencing problems (particularly those detailed in Section
+ 3.1.1 of [AuthMeth]) result in the resultCode being set to
+ operationsError.
If the server does not support TLS (whether by design or by current
- configuration), it returns the protocolError resultCode as described
- in Section 4.12.
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 35
- Lightweight Directory Access Protocol Version 3
-
+ configuration), it returns with the resultCode set to protocolError
+ as described in Section 4.12.
4.14.2. StartTLS Response
responseName, if present, is also "1.3.6.1.4.1.1466.20037". The
responseValue is absent.
- If the server is willing and able to negotiate TLS, it returns a
- success resultCode. Refer to Section 4 of [AuthMeth] for details.
+ If the server is willing and able to negotiate TLS, it returns with
+ the resultCode set to success. Refer to Section 4 of [AuthMeth] for
+ details.
If the server is otherwise unwilling or unable to perform this
operation, the server is to return an appropriate result code
indicating the nature of the problem. For example, if the TLS
- subsystem is not presently available, the server may return indicate
- so by returning the unavailable resultCode.
+ subsystem is not presently available, the server may indicate so by
+ returning with the resultCode set to unavailable.
4.14.3. Removal of the TLS Layer
- Two forms of TLS layer removal -- graceful and abrupt -- are
- provided. These do not involve LDAP PDUs, but are preformed at the
- underlying layers.
-
- If the connection is closed, uncompleted operations are handled as
- specified in Section 5.1.
-
-
-4.14.3.1. Graceful Removal
-
Either the client or server MAY remove the TLS layer and leave the
- LDAP exchange intact by sending and receiving a TLS closure alert.
+ LDAP message layer intact by sending and receiving a TLS closure
+ alert.
The initiating protocol peer sends the TLS closure alert. If it
- wishes to leave the LDAP exchange intact, it then MUST cease to send
- further PDUs and MUST ignore any received LDAP PDUs until it receives
- a TLS closure alert from the other peer.
+ wishes to leave the LDAP message layer intact, it then MUST cease to
+ send further PDUs and MUST ignore any received LDAP PDUs until it
+ receives a TLS closure alert from the other peer.
Once the initiating protocol peer receives a TLS closure alert from
the other peer it MAY send and receive LDAP PDUs.
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 38
+\f
+ Lightweight Directory Access Protocol Version 3
+
When a protocol peer receives the initial TLS closure alert, it may
- choose to allow the LDAP exchange to remain intact. In this case, it
- MUST immediately transmit a TLS closure alert. Following this, it MAY
- send and receive LDAP PDUs.
+ choose to allow the LDAP message layer to remain intact. In this
+ case, it MUST immediately transmit a TLS closure alert. Following
+ this, it MAY send and receive LDAP PDUs.
- Protocol peers MAY close the connection after sending or receiving a
- TLS closure alert.
+ Protocol peers MAY terminate the LDAP session after sending or
+ receiving a TLS closure alert.
After the TLS layer has been removed, the server MUST NOT send
responses to any request message received before the TLS closure
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 36
- Lightweight Directory Access Protocol Version 3
-
alert. Thus, clients wishing to receive responses to messages sent
while the TLS layer is intact MUST wait for those message responses
before sending the TLS closure alert.
-4.14.3.2. Abrupt Removal
-
- Either the client or server MAY abruptly remove the TLS layer by
- closing the connection. In this circumstance, a server MAY send the
- client a Notice of Disconnection before closing the connection.
-
-
5. Protocol Encoding, Connection, and Transfer
This protocol is designed to run over connection-oriented, reliable
units), with each octet and each bit being significant.
One underlying service, LDAP over TCP, is defined in Section
- 5.3. This service is generally applicable to applications providing
+ 5.2. This service is generally applicable to applications providing
or consuming X.500-based directory services on the Internet. This
specification was generally written with the TCP mapping in mind.
Specifications detailing other mappings may encounter various
obstacles.
Implementations of LDAP over TCP MUST implement the mapping as
- described in Section 5.3.
+ described in Section 5.2.
This table illustrates the relationship between the different layers
involved in an exchange between two protocol peers:
- +---------------+
- | LDAP exchange |
- +---------------+ > LDAP PDUs
- +---------------+ < data
- | SASL layer |
- +---------------+ > SASL-protected data
- +---------------+ < data
- | TLS layer |
- Application +---------------+ > TLS-protected data
- ------------+---------------+ < data
- Transport | connection |
- +---------------+
+ +----------------------+
+ | LDAP message layer |
+ +----------------------+ > LDAP PDUs
+ +----------------------+ < data
+ | SASL layer |
+ +----------------------+ > SASL-protected data
+ +----------------------+ < data
+ | TLS layer |
+ Application +----------------------+ > TLS-protected data
+ ------------+----------------------+ < data
+ Transport | transport connection |
+ +----------------------+
+
+
+
+
+
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 39
+\f
+ Lightweight Directory Access Protocol Version 3
+
+
+5.1. Protocol Encoding
-5.2. Protocol Encoding
-
The protocol elements of LDAP SHALL be encoded for exchange using the
Basic Encoding Rules [BER] of [ASN.1] with the following
restrictions:
- Only the definite form of length encoding is used.
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 37
- Lightweight Directory Access Protocol Version 3
-
- OCTET STRING values are encoded in the primitive form only.
- If the value of a BOOLEAN type is true, the encoding of the value
stated.
-5.3. Transmission Control Protocol (TCP)
+5.2. Transmission Control Protocol (TCP)
The encoded LDAPMessage PDUs are mapped directly onto the [TCP]
- bytestream using the BER-based encoding described in Section 5.2. It
+ bytestream using the BER-based encoding described in Section 5.1. It
is recommended that server implementations running over the TCP
provide a protocol listener on the Internet Assigned Numbers
Authority (IANA)-assigned LDAP port, 389 [PortReg]. Servers may
support contacting servers on any valid TCP port.
+5.3. Termination of the LDAP session
+
+ Termination of the LDAP session is typically initiated by the client
+ sending an UnbindRequst (Section 4.3), or by the server sending a
+ Notice of Disconnection (Section 4.4.1). In these cases each protocol
+ peer gracefully terminates the LDAP session by ceasing exchanges at
+ the LDAP message layer, tearing down any SASL layer, tearing down any
+ TLS layer, and closing the transport connection.
+
+ A protocol peer may determine that the continuation of any
+ communication would be pernicious, and in this case may abruptly
+ terminate the session by ceasing communication and closing the
+ transport connection.
+
+ In either case, when the LDAP session is terminated, uncompleted
+ operations are handled as specified in Section 3.1.
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 40
+\f
+ Lightweight Directory Access Protocol Version 3
+
+
+
6. Security Considerations
This version of the protocol provides facilities for simple
authentication using a cleartext password, as well as any [SASL]
- mechanism. Installing SASL layers can provide integrity and other
- data security services.
+ mechanism. Installing SASL and/or TLS layers can provide integrity
+ and other data security services.
It is also permitted that the server can return its credentials to
the client, if it chooses to do so.
It should be noted that SASL authentication exchanges do not provide
data confidentiality nor integrity protection for the version or name
- fields of the bind request nor the resultCode, diagnosticMessage, or
- referral fields of the bind response nor of any information contained
- in controls attached to bind request or responses. Thus information
+ fields of the BindRequest nor the resultCode, diagnosticMessage, or
+ referral fields of the BindResponse nor of any information contained
+ in controls attached to Bind requests or responses. Thus information
contained in these fields SHOULD NOT be relied on unless otherwise
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 38
- Lightweight Directory Access Protocol Version 3
-
protected (such as by establishing protections at the transport
layer).
Server implementors should plan for the possibility of (protocol or
external) events which alter the information used to establish
security factors (e.g., credentials, authorization identities, access
- controls) during the course of the LDAP exchange, and even during the
+ controls) during the course of the LDAP session, and even during the
performance of a particular operation, and should take steps to avoid
insecure side effects of these changes. The ways in which these
issues are addressed are application and/or implementation specific.
MUST ensure that access controls are maintained if that information
is to be provided to multiple clients, since servers may have access
control policies which prevent the return of entries or attributes in
- search results except to particular authenticated clients. For
+ Search results except to particular authenticated clients. For
example, caches could serve result information only to the client
whose request caused it to be in the cache.
- Servers may return referrals or search result references which
+ Servers may return referrals or Search result references which
redirect clients to peer servers. It is possible for a rogue
application to inject such referrals into the data stream in an
attempt to redirect a client to a rogue server. Clients are advised
to be aware of this, and possibly reject referrals when
confidentiality measures are not in place. Clients are advised to
reject referrals from the StartTLS operation.
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 41
+\f
+ Lightweight Directory Access Protocol Version 3
+
The matchedDN and diagnosticMessage fields, as well as some
resultCode values (e.g., attributeOrValueExists and
- entryAlreadyExists), could disclose the presence the specific data in
- the directory which is subject to access and other administrative
- controls. Server implementations should restrict access to protected
- information equally under both normal and error conditions.
+ entryAlreadyExists), could disclose the presence or absence of
+ specific data in the directory which is subject to access and other
+ administrative controls. Server implementations should restrict
+ access to protected information equally under both normal and error
+ conditions.
Protocol peers MUST be prepared to handle invalid and arbitrary
length protocol encodings. Invalid protocol encodings include: BER
excellent examples of these exceptions and test cases used to
discover flaws.
+ In the event that a protocol peer senses an attack which in its
+ nature could cause damage due to further communication at any layer
+ in the LDAP session, the protocol peer should abruptly terminate the
+ LDAP session as described in Section 5.3.
+
7. Acknowledgements
It is also based on RFC 3771 by Roger Harrison, and Kurt Zeilenga.
RFC 3771 was an individual submission to the IETF.
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 39
- Lightweight Directory Access Protocol Version 3
-
This document is a product of the IETF LDAPBIS Working Group.
Significant contributors of technical review and content include Kurt
Zeilenga, Steven Legg, and Hallvard Furuseth.
Level Security Mechanisms", draft-ietf-ldapbis-authmeth-
xx.txt, (a work in progress).
+
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 42
+\f
+ Lightweight Directory Access Protocol Version 3
+
[BER] ITU-T Rec. X.690 (07/2002) | ISO/IEC 8825-1:2002,
"Information technology - ASN.1 encoding rules:
Specification of Basic Encoding Rules (BER), Canonical
[SASL] Melnikov, A., "Simple Authentication and Security Layer",
draft-ietf-sasl-rfc2222bis-xx.txt (a work in progress).
-
-
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 40
- Lightweight Directory Access Protocol Version 3
-
[SASLPrep] Zeilenga, K., "Stringprep profile for user names and
passwords", draft-ietf-sasl-saslprep-xx.txt, (a work in
progress).
[TLS] Dierks, T. and C. Allen. "The TLS Protocol Version 1.1",
draft-ietf-tls-rfc2246-bis-xx.txt, a work in progress.
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 43
+\f
+ Lightweight Directory Access Protocol Version 3
+
[Unicode] The Unicode Consortium, "The Unicode Standard, Version
3.2.0" is defined by "The Unicode Standard, Version 3.0"
(Reading, MA, Addison-Wesley, 2000. ISBN 0-201-61633-5),
<http://www.unicode.org/unicode/reports/tr17/>, August
2000.
-
-
-
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 41
- Lightweight Directory Access Protocol Version 3
-
[PROTOS-LDAP] University of Oulu, "PROTOS Test-Suite: c06-ldapv3"
<http://www.ee.oulu.fi/research/ouspg/protos/testing/c06/l
dapv3/>
It is requested that the IANA update the LDAP Protocol Mechanism
registry to indicate that this document and [AuthMeth] provides the
definitive technical specification for the StartTLS
- (1.3.6.1.4.1.1466.20037) extended operation.
+ (1.3.6.1.4.1.1466.20037) Extended operation.
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 44
+\f
+ Lightweight Directory Access Protocol Version 3
+
It is requested that the IANA update the occurrence of "RFC XXXX" in
Appendix B with this RFC number at publication.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-Sermersheim Internet-Draft - Expires Apr 2005 Page 42
+Sermersheim Internet-Draft - Expires Aug 2005 Page 45
+\f
Lightweight Directory Access Protocol Version 3
Appendix A - LDAP Result Codes
[LDAPIANA]. Client implementations SHALL treat any result code which
they do not recognize as an unknown error condition.
+ Servers may substitute some result codes due to access controls which
+ prevent their disclosure.
+
A.1 Non-Error Result Codes
result codes).
The referral and saslBindInProgress result codes indicate the client
- is required to take additional action to complete the operation.
+ needs to take additional action to complete the operation.
A.2 Result Codes
success (0)
Indicates the successful completion of an operation. Note:
- this code is not used with the compare operation. See
+ this code is not used with the Compare operation. See
compareFalse (5) and compareTrue (6).
operationsError (1)
protocolError (2)
Indicates the server received data which is not well-formed.
- For bind operation only, this code is also used to indicate
- that the server does not support the requested protocol
- version.
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 43
+Sermersheim Internet-Draft - Expires Aug 2005 Page 46
+\f
Lightweight Directory Access Protocol Version 3
- For extended operations only, this code indicates that the
- server does not support (by design or configuration) the
- extended operation associated with the requestName.
+ For Bind operation only, this code is also used to indicate
+ that the server does not support the requested protocol
+ version.
+
+ For Extended operations only, this code is also used to
+ indicate that the server does not support (by design or
+ configuration) the Extended operation associated with the
+ requestName.
For request operations specifying multiple controls, this may
be used to indicate that the server cannot ignore the order
exceeded before the operation could be completed.
compareFalse (5)
- Indicates that the compare operation has successfully
+ Indicates that the Compare operation has successfully
completed and the assertion has evaluated to FALSE or
Undefined.
compareTrue (6)
- Indicates that the compare operation has successfully
+ Indicates that the Compare operation has successfully
completed and the assertion has evaluated to TRUE.
authMethodNotSupported (7)
Indicates that the authentication method or mechanism is not
supported.
- strongAuthRequired (8)
- Indicates that the server has detected that an established
- security association between the client and server has
- unexpectedly failed or been compromised, or that the server
- now requires the client to authenticate using a strong(er)
- mechanism.
+ strongerAuthRequired (8)
+ Indicates the server requires strong(er) authentication in
+ order to complete the operation.
+
+ When used with the Notice of Disconnection operation, this
+ code indicates that the server has detected that an
+ established security association between the client and
+ server has unexpectedly failed or been compromised.
referral (10)
Indicates that a referral needs to be chased to complete the
unavailableCriticalExtension (12)
Indicates a critical control is unrecognized (see Section
4.1.11).
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 47
+\f
+ Lightweight Directory Access Protocol Version 3
+
confidentialityRequired (13)
Indicates that data confidentiality protections are required.
saslBindInProgress (14)
-
-
-
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 44
- Lightweight Directory Access Protocol Version 3
-
Indicates the server requires the client to send a new bind
request, with the same SASL mechanism, to continue the
authentication process (see Section 4.2).
not conform to the required syntax or contains attribute
values which do not conform to the syntax of the attribute's
type.
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 48
+\f
+ Lightweight Directory Access Protocol Version 3
+
aliasDereferencingProblem (36)
Indicates that a problem occurred while dereferencing an
alias. Typically an alias was encountered in a situation
where it was not allowed or where access was denied.
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 45
- Lightweight Directory Access Protocol Version 3
-
inappropriateAuthentication (48)
Indicates the server requires the client which had attempted
to bind anonymously or without supplying credentials to
entryAlreadyExists (68)
Indicates that the request cannot be fulfilled (added, moved,
or renamed) as the target entry already exists.
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 49
+\f
+ Lightweight Directory Access Protocol Version 3
+
objectClassModsProhibited (69)
Indicates that an attempt to modify the object class(es) of
For example, this code is returned when a client attempts to
modify the structural object class of an entry.
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 46
- Lightweight Directory Access Protocol Version 3
-
affectsMultipleDSAs (71)
Indicates that the operation cannot be performed as it would
-
-
-
-
-
-
-
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 47
+Sermersheim Internet-Draft - Expires Aug 2005 Page 50
+\f
Lightweight Directory Access Protocol Version 3
Appendix B - Complete ASN.1 Definition
LDAPDN ::= LDAPString -- Constrained to <distinguishedName>
-- [LDAPDN]
- RelativeLDAPDN ::= LDAPString -- Constrained to <name-component>
+
-Sermersheim Internet-Draft - Expires Apr 2005 Page 48
+Sermersheim Internet-Draft - Expires Aug 2005 Page 51
+\f
Lightweight Directory Access Protocol Version 3
+ RelativeLDAPDN ::= LDAPString -- Constrained to <name-component>
-- [LDAPDN]
AttributeDescription ::= LDAPString
MatchingRuleId ::= LDAPString
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 52
+\f
+ Lightweight Directory Access Protocol Version 3
+
LDAPResult ::= SEQUENCE {
resultCode ENUMERATED {
success (0),
compareFalse (5),
compareTrue (6),
authMethodNotSupported (7),
- strongAuthRequired (8),
+ strongerAuthRequired (8),
-- 9 reserved --
referral (10),
adminLimitExceeded (11),
-- 35 reserved for undefined isLeaf --
aliasDereferencingProblem (36),
-- 37-47 unused --
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 49
- Lightweight Directory Access Protocol Version 3
-
inappropriateAuthentication (48),
invalidCredentials (49),
insufficientAccessRights (50),
referral [3] Referral OPTIONAL }
Referral ::= SEQUENCE SIZE (1..MAX) OF uri URI
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 53
+\f
+ Lightweight Directory Access Protocol Version 3
+
URI ::= LDAPString -- limited to characters permitted in
-- URIs
COMPONENTS OF LDAPResult,
serverSaslCreds [7] OCTET STRING OPTIONAL }
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 50
- Lightweight Directory Access Protocol Version 3
-
UnbindRequest ::= [APPLICATION 2] NULL
SearchRequest ::= [APPLICATION 3] SEQUENCE {
scope ENUMERATED {
baseObject (0),
singleLevel (1),
- wholeSubtree (2) },
+ wholeSubtree (2),
+ ... },
derefAliases ENUMERATED {
neverDerefAliases (0),
derefInSearching (1),
AttributeSelection ::= SEQUENCE OF selector LDAPString
-- The LDAPString is constrained to
- -- <attributeSelection> in Section 4.5.1
+ -- <attributeSelector> in Section 4.5.1.7
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 54
+\f
+ Lightweight Directory Access Protocol Version 3
+
Filter ::= CHOICE {
- and [0] SET OF filter Filter,
- or [1] SET OF filter Filter,
+ and [0] SET SIZE (1..MAX) OF filter Filter,
+ or [1] SET SIZE (1..MAX) OF filter Filter,
not [2] Filter,
equalityMatch [3] AttributeValueAssertion,
substrings [4] SubstringFilter,
lessOrEqual [6] AttributeValueAssertion,
present [7] AttributeDescription,
approxMatch [8] AttributeValueAssertion,
- extensibleMatch [9] MatchingRuleAssertion }
+ extensibleMatch [9] MatchingRuleAssertion,
+ ... }
SubstringFilter ::= SEQUENCE {
type AttributeDescription,
- -- at least one must be present,
- -- initial and final can occur at most once
substrings SEQUENCE SIZE (1..MAX) OF substring CHOICE {
- initial [0] AssertionValue,
+ initial [0] AssertionValue, -- can occur at most once
any [1] AssertionValue,
- final [2] AssertionValue } }
+ final [2] AssertionValue } -- can occur at most once
+ }
MatchingRuleAssertion ::= SEQUENCE {
matchingRule [1] MatchingRuleId OPTIONAL,
objectName LDAPDN,
attributes PartialAttributeList }
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 51
- Lightweight Directory Access Protocol Version 3
-
PartialAttributeList ::= SEQUENCE OF
partialAttribute PartialAttribute
operation ENUMERATED {
add (0),
delete (1),
- replace (2) },
+ replace (2),
+ ... },
modification PartialAttribute } }
ModifyResponse ::= [APPLICATION 7] LDAPResult
AddRequest ::= [APPLICATION 8] SEQUENCE {
entry LDAPDN,
attributes AttributeList }
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 55
+\f
+ Lightweight Directory Access Protocol Version 3
+
AttributeList ::= SEQUENCE OF attribute Attribute
ExtendedResponse ::= [APPLICATION 24] SEQUENCE {
COMPONENTS OF LDAPResult,
responseName [10] LDAPOID OPTIONAL,
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 52
- Lightweight Directory Access Protocol Version 3
-
responseValue [11] OCTET STRING OPTIONAL }
IntermediateResponse ::= [APPLICATION 25] SEQUENCE {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 53
+Sermersheim Internet-Draft - Expires Aug 2005 Page 56
+\f
Lightweight Directory Access Protocol Version 3
Appendix C - Changes
This appendix is non-normative.
- This appendix summarizes substantive changes made to RFC 2251 and RFC
- 2830.
+ This appendix summarizes substantive changes made to RFC 2251, RFC
+ 2830, and RFC 3771.
C.1 Changes made to RFC 2251:
sections.
-C.1.1 Section 1
+C.1.1 Section 1 (Status of this Memo)
- Removed IESG note. Post publication of RFC 2251, mandatory LDAP
authentication mechanisms have been standardized which are
mechanisms.
-C.1.2 Section 3.1 and others
+C.1.2 Section 3.1 (Protocol Model) and others
- Removed notes giving history between LDAP v1, v2 and v3. Instead,
added sufficient language so that this document can stand on its
own.
-C.1.3 Section 4
+C.1.3 Section 4 (Elements of Protocol)
- Clarified where the extensibility features of ASN.1 apply to the
- protocol. This change also affected various ASN.1 types.
+ protocol. This change affected various ASN.1 types by the
+ inclusion of ellipses (...) to certain elements.
- Removed the requirement that servers which implement version 3 or
later MUST provide the 'supportedLDAPVersion' attribute. This
statement provided no interoperability advantages.
-C.1.4 Section 4.1.1
+C.1.4 Section 4.1.1 (Message Envelope)
- There was a mandatory requirement for the server to return a
- Notice of Disconnection and drop the connection when a PDU is
- malformed in a certain way. This has been clarified such that the
- server SHOULD return the Notice of Disconnection, and MUST drop
- the connection.
+ Notice of Disconnection and drop the transport connection when a
+ PDU is malformed in a certain way. This has been updated such that
+ the server SHOULD return the Notice of Disconnection, and MUST
+ terminate the LDAP Session.
-C.1.5 Section 4.1.1.1
+C.1.5 Section 4.1.1.1 (Message ID)
- - Clarified that the messageID of requests MUST be non-zero.
-
-
-
+ - Required that the messageID of requests MUST be non-zero as the
+ zero is reserved for Notice of Disconnection.
-Sermersheim Internet-Draft - Expires Apr 2005 Page 54
+Sermersheim Internet-Draft - Expires Aug 2005 Page 57
+\f
Lightweight Directory Access Protocol Version 3
- - Clarified when it is and isn't appropriate to return an already
+ - Specified when it is and isn't appropriate to return an already
used message id. RFC 2251 accidentally imposed synchronous server
behavior in its wording of this.
-C.1.6 Section 4.1.2
+C.1.6 Section 4.1.2 (String Types)
- Stated that LDAPOID is constrained to <numericoid> from [Models].
-C.1.7 Section 4.1.5.1 and others
+C.1.7 Section 4.1.5.1 (Binary Option) and others
- Removed the Binary Option from the specification. There are
numerous interoperability problems associated with this method of
replacement is ongoing.
-C.1.8 Section 4.1.8
+C.1.8 Section 4.1.8 (Attribute)
- Combined the definitions of PartialAttribute and Attribute here,
and defined Attribute in terms of PartialAttribute.
-C.1.9 Section 4.1.10
+C.1.9 Section 4.1.10 (Result Message)
- Renamed "errorMessage" to "diagnosticMessage" as it is allowed to
be sent for non-error results.
- Moved some language into Appendix A, and refer the reader there.
- Allowed matchedDN to be present for other result codes than those
listed in RFC 2251.
+ - renamed the code "strongAuthRequired" to "strongerAuthRequired" to
+ clarify that this code may often be returned to indicate that a
+ stronger authentication is needed to perform a given operation.
-C.1.10 Section 4.1.11
+C.1.10 Section 4.1.11 (Referral)
- Defined referrals in terms of URIs rather than URLs.
- Removed the requirement that all referral URIs MUST be equally
- Added the requirement that clients MUST NOT loop between servers.
- Clarified the instructions for using LDAPURLs in referrals, and in
doing so added a recommendation that the scope part be present.
+ - Removed imperatives which required clients to use URLs in specific
+ ways to progress an operation. These did nothing for
+ interoperability.
-C.1.11 Section 4.1.12
+C.1.11 Section 4.1.12 (Controls)
- Specified how control values defined in terms of ASN.1 are to be
encoded.
- - Noted that the criticality field is only applied to request
- messages (except unbindRequest), and must be ignored when present
- on response messages and unbindRequest.
- - Added language regarding combinations of controls and the ordering
- of controls on a message.
-
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 55
+Sermersheim Internet-Draft - Expires Aug 2005 Page 58
+\f
Lightweight Directory Access Protocol Version 3
+ - Noted that the criticality field is only applied to request
+ messages (except UnbindRequest), and must be ignored when present
+ on response messages and UnbindRequest.
+ - Added language regarding combinations of controls and the ordering
+ of controls on a message.
- Specified that when the semantics of the combination of controls
is undefined or unknown, it results in a protocolError.
- Changed "The server MUST be prepared" to "Implementations MUST be
controls).
-C.1.12 Section 4.2
+C.1.12 Section 4.2 (Bind Operation)
- Mandated that servers return protocolError when the version is not
supported.
- - Clarified behavior when the simple authentication is used, the
+ - Disambiguated behavior when the simple authentication is used, the
name is empty and the password is non-empty.
- - Required servers to not dereference aliases for bind. This was
+ - Required servers to not dereference aliases for Bind. This was
added for consistency with other operations and to help ensure
data consistency.
- Required that textual passwords be transferred as UTF-8 encoded
different clients.
-C.1.13 Section 4.2.1
+C.1.13 Section 4.2.1 (Sequencing of the Bind Request)
- This section was largely reorganized for readability and language
was added to clarify the authentication state of failed and
- abandoned bind operations.
+ abandoned Bind operations.
- Removed: "If a SASL transfer encryption or integrity mechanism has
been negotiated, that mechanism does not support the changing of
credentials from one identity to another, then the client MUST
instead establish a new connection."
- Each SASL negotiation is, generally, independent of other SASL
- negotiations. If there were dependencies between multiple
- negotiations of a particular mechanism, the mechanism technical
- specification should detail how applications are to deal with
- them. LDAP should not require any special handling. And if an LDAP
- client had used such a mechanism, it would have the option of
- using another mechanism.
+ If there are dependencies between multiple negotiations of a
+ particular SASL mechanism, the technical specification for that
+ SASL mechanism details how applications are to deal with them.
+ LDAP should not require any special handling.
- Dropped MUST imperative in paragraph 3 to align with [Keywords].
- - Mandated that clients not send non-bind operations while a bind is
+ - Mandated that clients not send non-Bind operations while a Bind is
in progress, and suggested that servers not process them if they
are received. This is needed to ensure proper sequencing of the
- bind in relationship to other operations.
+ Bind in relationship to other operations.
-C.1.14 Section 4.2.3
+C.1.14 Section 4.2.3 (Bind Response)
- Moved most error-related text to Appendix A, and added text
- regarding certain errors used in conjunction with the bind
+ regarding certain errors used in conjunction with the Bind
operation.
- - Prohibited the server from specifying serverSaslCreds when not
- appropriate.
-
+
-Sermersheim Internet-Draft - Expires Apr 2005 Page 56
+Sermersheim Internet-Draft - Expires Aug 2005 Page 59
+\f
Lightweight Directory Access Protocol Version 3
+ - Prohibited the server from specifying serverSaslCreds when not
+ appropriate.
-C.1.15 Section 4.3
+
+C.1.15 Section 4.3 (Unbind Operation)
- - Required both peers to cease transmission and close the LDAP
- exchange for the unbind operation.
+ - Specified that both peers are to cease transmission and terminate
+ the LDAP session for the Unbind operation.
-C.1.16 Section 4.4
+C.1.16 Section 4.4 (Unsolicited Notification)
- Added instructions for future specifications of Unsolicited
Notifications.
-C.1.17 Section 4.5.1
+C.1.17 Section 4.5.1 (Search Request)
- SearchRequest attributes is now defined as an AttributeSelection
type rather than AttributeDescriptionList, and an ABNF is
are now AssertionValue rather than LDAPString. Also, added
imperatives stating that 'initial' (if present) must be listed
first, and 'final' (if present) must be listed last.
- - Clarified the semantics of the derefAliases choices.
+ - Disambiguated the semantics of the derefAliases choices. There was
+ question as to whether derefInSearching applied to the base object
+ in a wholeSubtree Search.
- Added instructions for equalityMatch, substrings, greaterOrEqual,
lessOrEqual, and approxMatch.
-C.1.18 Section 4.5.2
+C.1.18 Section 4.5.2 (Search Result)
- Recommended that servers not use attribute short names when it
knows they are ambiguous or may cause interoperability problems.
implementation.
-C.1.19 Section 4.5.3
+C.1.19 Section 4.5.3 (Continuation References in the Search Result)
- Made changes similar to those made to Section 4.1.11.
-C.1.20 Section 4.5.3.1
+
+
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 60
+\f
+ Lightweight Directory Access Protocol Version 3
+
+C.1.20 Section 4.5.3.1 (Example)
- Fixed examples to adhere to changes made to Section 4.5.3.
-C.1.21 Section 4.6
-
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 57
- Lightweight Directory Access Protocol Version 3
-
- - Removed restriction that required an EQUALITY matching rule in
- order to perform value delete modifications. It is sufficiently
- documented that in absence of an equality matching rule, octet
- equality is used.
+C.1.21 Section 4.6 (Modify Operation)
+
- Replaced AttributeTypeAndValues with Attribute as they are
equivalent.
- - Clarified what type of modification changes might temporarily
- violate schema.
+ - Specified the types of modification changes which might
+ temporarily violate schema. Some readers were under the impression
+ that any temporary schema violation was allowed.
-C.1.22 Section 4.7
+C.1.22 Section 4.7 (Add Operation)
- Aligned Add operation with X.511 in that the attributes of the RDN
are used in conjunction with the listed attributes to create the
entry. Previously, Add required that the distinguished values be
present in the listed attributes.
+ - Removed requirement that the objectClass attribute MUST be
+ specified as some DSE types do not require this attribute.
+ Instead, generic wording was added, requiring the added entry to
+ adhere to the data model.
+ - Removed recommendation regarding placement of objects. This is
+ covered in the data model document.
-C.1.23 Section 4.9
+C.1.23 Section 4.9 (Modify DN Operation)
- - Required servers to not dereference aliases for modify DN. This
+ - Required servers to not dereference aliases for Modify DN. This
was added for consistency with other operations and to help ensure
data consistency.
- - Allow modify DN to fail when moving between naming contexts.
- - Specified what happens when the attributes of the newrdn are no
+ - Allow Modify DN to fail when moving between naming contexts.
+ - Specified what happens when the attributes of the newrdn are not
present on the entry.
-C.1.24 Section 4.10
+C.1.24 Section 4.10 (Compare Operation)
- - Clarified that compareFalse means that the compare took place and
+ - Specified that compareFalse means that the Compare took place and
the result is false. There was confusion which lead people to
believe that an Undefined match resulted in compareFalse.
- - Required servers to not dereference aliases for compare. This was
+ - Required servers to not dereference aliases for Compare. This was
added for consistency with other operations and to help ensure
data consistency.
-C.1.25 Section 4.11
+C.1.25 Section 4.11 (Abandon Operation)
- - Explained that since abandon returns no response, clients should
+ - Explained that since Abandon returns no response, clients should
not use it if they need to know the outcome.
- Specified that Abandon and Unbind cannot be abandoned.
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 61
+\f
+ Lightweight Directory Access Protocol Version 3
+
-C.1.26 Section 4.12
+C.1.26 Section 4.12 (Extended Operation)
- - Specified how values of extended operations defined in terms of
+ - Specified how values of Extended operations defined in terms of
ASN.1 are to be encoded.
- - Added instructions on what extended operation specifications
+ - Added instructions on what Extended operation specifications
consist of.
- - Added a recommendation that servers advertise supported extended
+ - Added a recommendation that servers advertise supported Extended
operations.
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 58
- Lightweight Directory Access Protocol Version 3
-
-C.1.27 Section 5.2
+C.1.27 Section 5.2 (Transfer Protocols)
- Moved referral-specific instructions into referral-related
sections.
-C.1.28 Section 7
+C.1.28 Section 7 (Security Considerations)
- Reworded notes regarding SASL not protecting certain aspects of
- the LDAP bind PDU.
+ the LDAP Bind PDUs.
- Noted that Servers are encouraged to prevent directory
modifications by clients that have authenticated anonymously
[AuthMeth].
- Added a note regarding malformed and long encodings.
-C.1.29 Appendix A
+C.1.29 Appendix A (Complete ASN.1 Definition)
- Added "EXTENSIBILITY IMPLIED" to ASN.1 definition.
- Removed AttributeType. It is not used.
to other sections.
-C.2.1 Section 2.3
+C.2.1 Section 2.3 (Response other than "success")
- Removed wording indicating that referrals can be returned from
- StartTLS
+ StartTLS.
- Removed requirement that only a narrow set of result codes can be
returned. Some result codes are required in certain scenarios, but
any other may be returned if appropriate.
+
+Sermersheim Internet-Draft - Expires Aug 2005 Page 62
+\f
+ Lightweight Directory Access Protocol Version 3
+
-C.2.1 Section 4.13.3.1
+C.2.1 Section 4 (Closing a TLS Connection)
- Reworded most of this section and added the requirement that after
the TLS connection has been closed, the server MUST NOT send
responses to any request message received before the TLS closure.
+ - Removed instructions on abrupt closure as this is covered in other
+ areas of the document (specifically, Section 5.3)
C.3 Changes made to RFC 3771:
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 59
- Lightweight Directory Access Protocol Version 3
-
- - In general, all technical language was transferred in whole.
- Supporting and background language seen as redundant due to its
- presence in this document was omitted.
+ - Rewrote to fit into this document. In general, semantics were
+ preserved. Supporting and background language seen as redundant
+ due to its presence in this document was omitted.
+ - Specified that Intermediate responses to a request may be of
+ different types, and one of the response types may be specified to
+ have no response value.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 60
+Sermersheim Internet-Draft - Expires Aug 2005 Page 63
+\f
Lightweight Directory Access Protocol Version 3
-
-Sermersheim Internet-Draft - Expires Apr 2005 Page 61
\ No newline at end of file
+Sermersheim Internet-Draft - Expires Aug 2005 Page 64
+\f
\ No newline at end of file
-
Internet-Draft Kurt D. Zeilenga
Intended Category: Standard Track OpenLDAP Foundation
-Expires in six months 15 February 2004
+Expires in six months 9 February 2005
LDAP: Internationalized String Preparation
- <draft-ietf-ldapbis-strprep-03.txt>
+ <draft-ietf-ldapbis-strprep-05.txt>
-Status of this Memo
- This document is an Internet-Draft and is in full conformance with all
- provisions of Section 10 of RFC2026.
+Status of this Memo
+ This document is intended to be published as a Standard Track RFC.
Distribution of this memo is unlimited. Technical discussion of this
document will take place on the IETF LDAP Revision Working Group
mailing list <ietf-ldapbis@openldap.org>. Please send editorial
- comments directly to the author <Kurt@OpenLDAP.org>.
+ comments directly to the editor <Kurt@OpenLDAP.org>.
+
+ By submitting this Internet-Draft, I accept the provisions of Section
+ 4 of RFC 3667. By submitting this Internet-Draft, I certify that any
+ applicable patent or other IPR claims of which I am aware have been
+ disclosed, or will be disclosed, and any of which I become aware will
+ be disclosed, in accordance with RFC 3668.
Internet-Drafts are working documents of the Internet Engineering Task
- Force (IETF), its areas, and its working groups. Note that other
+ Force (IETF), its areas, and its working groups. Note that other
groups may also distribute working documents as Internet-Drafts.
+
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
- time. It is inappropriate to use Internet-Drafts as reference
- material or to cite them other than as ``work in progress.''
+ time. It is inappropriate to use Internet-Drafts as reference material
+ or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at
- <http://www.ietf.org/ietf/1id-abstracts.txt>. The list of
- Internet-Draft Shadow Directories can be accessed at
- <http://www.ietf.org/shadow.html>.
+ http://www.ietf.org/1id-abstracts.html
+
+ The list of Internet-Draft Shadow Directories can be accessed at
+ http://www.ietf.org/shadow.html
- Copyright (C) The Internet Society (2004). All Rights Reserved.
+
+ Copyright (C) The Internet Society (2005). All Rights Reserved.
Please see the Full Copyright section near the end of this document
for more information.
+
+
+
+
+Zeilenga LDAPprep [Page 1]
+\f
+Internet-Draft draft-ietf-ldapbis-strprep-05 9 February 2005
+
+
Abstract
The previous Lightweight Directory Access Protocol (LDAP) technical
algorithms for character-based matching rules defined for use in LDAP.
-
-
-
-Zeilenga LDAPprep [Page 1]
-\f
-Internet-Draft draft-ietf-ldapbis-strprep-03 15 February 2004
-
-
-Conventions
+Conventions and Terms
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
Information on the Unicode character encoding model can be found in
[CharModel].
+ The term "combining mark", as used in this specification, refers to
+ any Unicode [Unicode] code point which has a mark property (Mn, Mc,
+ Me). Appendix A provides a complete list of combining marks.
+
1. Introduction
Undefined - it cannot be determined whether the attribute contains
a matching value or not.
+
+
+Zeilenga LDAPprep [Page 2]
+\f
+Internet-Draft draft-ietf-ldapbis-strprep-05 9 February 2005
+
+
For instance, the caseIgnoreMatch matching rule may be used to compare
whether the commonName attribute contains a particular value without
regard for case and insignificant spaces.
commonly used in the Directory. These specifications are inadequate
for strings composed of Unicode [Unicode] characters.
-
-
-
-Zeilenga LDAPprep [Page 2]
-\f
-Internet-Draft draft-ietf-ldapbis-strprep-03 15 February 2004
-
-
The caseIgnoreMatch matching rule [X.520], for example, is simply
defined as being a case insensitive comparison where insignificant
spaces are ignored. For printableString, there is only one space
a) prior to applying the Unicode string preparation steps outlined in
"stringprep", the string is transcoded to Unicode;
+
+
+
+Zeilenga LDAPprep [Page 3]
+\f
+Internet-Draft draft-ietf-ldapbis-strprep-05 9 February 2005
+
+
b) after applying the Unicode string preparation steps outlined in
- "stringprep", characters insignificant to the matching rules are
- removed.
+ "stringprep", the string is modified to appropriately handle
+ characters insignificant to the matching rule.
Hence, preparation of character strings for X.500 matching involves
the following steps:
3) Normalize
4) Prohibit
5) Check Bidi (Bidirectional)
-
-
-
-Zeilenga LDAPprep [Page 3]
-\f
-Internet-Draft draft-ietf-ldapbis-strprep-03 15 February 2004
-
-
- 6) Insignificant Character Removal
+ 6) Insignificant Character Handling
These steps are described in Section 2.
2) Map
3) Normalize
4) Prohibit
- 5) Check bidi
- 6) Insignificant Character Removal
- Failure in any step causes the assertion to evaluate to Undefined.
- This process is intended to act upon non-empty character strings. If
- the string to prepare is empty, this process is not applied and the
- assertion is evaluated to Undefined.
-
- The character repertoire of this process is Unicode 3.2 [Unicode].
+Zeilenga LDAPprep [Page 4]
+\f
+Internet-Draft draft-ietf-ldapbis-strprep-05 9 February 2005
+ 5) Check bidi
+ 6) Insignificant Character Handling
+ Failure in any step causes the assertion to evaluate to Undefined.
-Zeilenga LDAPprep [Page 4]
-\f
-Internet-Draft draft-ietf-ldapbis-strprep-03 15 February 2004
+ The character repertoire of this process is Unicode 3.2 [Unicode].
2.1. Transcode
Each non-Unicode string value is transcoded to Unicode.
- TeletexString [X.680][T.61] values are transcoded to Unicode as
- described in Appendix A.
-
PrintableString [X.680] value are transcoded directly to Unicode.
UniversalString, UTF8String, and bmpString [X.680] values need not be
transcoded as they are Unicode-based strings (in the case of
bmpString, a subset of Unicode).
+ TeletexString [X.680] values are transcoded to Unicode. As there is
+ no standard for mapping TelexString values to Unicode, the mapping is
+ left a local matter.
+
+ For these and other reasons, use of TeletexString is NOT RECOMMENDED.
+
The output is the transcoded string.
SOFT HYPHEN (U+00AD) and MONGOLIAN TODO SOFT HYPHEN (U+1806) code
points are mapped to nothing. COMBINING GRAPHEME JOINER (U+034F) and
- VARIATION SELECTORs (U+180B-180D,FF00-FE0F) code points are also
+ VARIATION SELECTORs (U+180B-180D, FF00-FE0F) code points are also
mapped to nothing. The OBJECT REPLACEMENT CHARACTER (U+FFFC) is
mapped to nothing.
TABULATION (U+000B), FORM FEED (FF) (U+000C), CARRIAGE RETURN (CR)
(U+000D), and NEXT LINE (NEL) (U+0085) are mapped to SPACE (U+0020).
- All other control code points (e.g., Cc) or code points with a control
- function (e.g., Cf) are mapped to nothing.
+ All other control code (e.g., Cc) points or code points with a control
+ function (e.g., Cf) are mapped to nothing. The following is a
+ complete list of these code points: U+0000-0008, 000E-001F, 007F-0084,
+ 0086-009F, 06DD, 070F, 180E, 200C-200F, 202A-202E, 2060-2063,
+ 206A-206F, FEFF, FFF9-FFFB, 1D173-1D17A, E0001, E0020-E007F.
ZERO WIDTH SPACE (U+200B) is mapped to nothing. All other code points
with Separator (space, line, or paragraph) property (e.g, Zs, Zl, or
- Zp) are mapped to SPACE (U+0020).
+ Zp) are mapped to SPACE (U+0020). The following is a complete list of
- Appendix B provides a table detailing the above mappings.
+
+
+Zeilenga LDAPprep [Page 5]
+\f
+Internet-Draft draft-ietf-ldapbis-strprep-05 9 February 2005
+
+
+ these code points: U+0020, 00A0, 1680, 2000-200A, 2028-2029, 202F,
+ 205F, 3000.
For case ignore, numeric, and stored prefix string matching rules,
characters are case folded per B.2 of [StringPrep].
string.
-
-Zeilenga LDAPprep [Page 5]
-\f
-Internet-Draft draft-ietf-ldapbis-strprep-03 15 February 2004
-
-
2.4. Prohibit
All Unassigned code points are prohibited. Unassigned code points are
properties or are deprecated are prohibited. These characters are are
listed in Table C.8 of [StringPrep].
- Private Use (U+E000-F8FF, F0000-FFFFD, 100000-10FFFD) code points are
- prohibited.
+ Private Use code points are prohibited. These characters are listed
+ in Table C.3 of [StringPrep].
- All non-character code points (U+FDD0-FDEF, FFFE-FFFF, 1FFFE-1FFFF,
- 2FFFE-2FFFF, 3FFFE-3FFFF, 4FFFE-4FFFF, 5FFFE-5FFFF, 6FFFE-6FFFF,
- 7FFFE-7FFFF, 8FFFE-8FFFF, 9FFFE-9FFFF, AFFFE-AFFFF, BFFFE-BFFFF,
- CFFFE-CFFFF, DFFFE-DFFFF, EFFFE-EFFFF, FFFFE-FFFFF, 10FFFE-10FFFF) are
- prohibited.
+ All non-character code points are prohibited. These code points are
+ listed in Table C.4 of [StringPrep].
- Surrogate codes (U+D800-DFFFF) are prohibited.
+ Surrogate codes are prohibited. These characters are listed in Table
+ C.5 of [StringPrep].
The REPLACEMENT CHARACTER (U+FFFD) code point is prohibited.
2.5. Check bidi
- This step fails if the input string does not conform to the the
- bidirectional character restrictions detailed in 6 of [Stringprep].
- Otherwise, the output is the input string.
+ Bidirectional characters are ignored.
+
+
+2.6. Insignificant Character Handling
+
+ In this step, the string is modified to ensure proper handling of
-2.6. Insignificant Character Removal
- In this step, characters insignificant to the matching rule are to be
- removed. The characters to be removed differ from matching rule to
- matching rule.
+Zeilenga LDAPprep [Page 6]
+\f
+Internet-Draft draft-ietf-ldapbis-strprep-05 9 February 2005
+
+
+ characters insignificant to the matching rule. This modification
+ differs from matching rule to matching rule.
Section 2.6.1 applies to case ignore and exact string matching.
Section 2.6.2 applies to numericString matching.
Section 2.6.3 applies to telephoneNumber matching.
-2.6.1. Insignificant Space Removal
+2.6.1. Insignificant Space Handling
For the purposes of this section, a space is defined to be the SPACE
(U+0020) code point followed by no combining marks.
-
-
-Zeilenga LDAPprep [Page 6]
-\f
-Internet-Draft draft-ietf-ldapbis-strprep-03 15 February 2004
-
-
NOTE - The previous steps ensure that the string cannot contain any
code points in the separator class, other than SPACE (U+0020).
- If the input string consists entirely of spaces or is empty, the
- output is a string consisting of exactly one space (e.g. " ").
+ If the input string contains at least one non-space character, then
+ the string is modified such that the string starts with exactly one
+ space character, ends with exactly one SPACE character, and that any
+ inner (non-empty) sequence of space characters is replaced with
+ exactly two SPACE characters. For instance, the input strings
+ "foo<SPACE>bar<SPACE><SPACE>", results in the output
+ "<SPACE>foo<SPACE><SPACE>bar<SPACE>".
- Otherwise, the following spaces are removed:
- - leading spaces (i.e. those preceding the first character that is
- not a space);
- - trailing spaces (i.e. those following the last character that is
- not a space);
- - multiple consecutive spaces (these are taken as equivalent to a
- single space character).
+ Otherwise, if the string being prepared is an initial, any, or final
+ substring, then the output string is exactly one SPACE character, else
+ the output string is exactly two SPACEs.
- For example, removal of spaces from the Form KC string:
- "<SPACE><SPACE>foo<SPACE><SPACE>bar<SPACE><SPACE>"
- would result in the output string:
- "foo<SPACE>bar"
- and the Form KC string:
- "<SPACE><SPACE><SPACE>"
- would result in the output string:
- "<SPACE>".
+ Appendix B discusses the rationale for the behavior.
-2.6.2. numericString Insignificant Character Removal
+2.6.2. numericString Insignificant Character Handling
For the purposes of this section, a space is defined to be the SPACE
(U+0020) code point followed by no combining marks.
- All spaces are regarded as not significant. If the input string
- consists entirely of spaces or is empty, the output is a string
- consisting of exactly one space (e.g. " "). Otherwise, all spaces are
- to be removed.
+ All spaces are regarded as insignificant and are to be removed.
For example, removal of spaces from the Form KC string:
"<SPACE><SPACE>123<SPACE><SPACE>456<SPACE><SPACE>"
and the Form KC string:
"<SPACE><SPACE><SPACE>"
would result in the output string:
- "<SPACE>".
+ "" (an empty string).
-2.6.3. telephoneNumber Insignificant Character Removal
-
- For the purposes of this section, a hyphen is defined to be
- HYPHEN-MINUS (U+002D), ARMENIAN HYPHEN (U+058A), HYPHEN (U+2010),
Zeilenga LDAPprep [Page 7]
\f
-Internet-Draft draft-ietf-ldapbis-strprep-03 15 February 2004
+Internet-Draft draft-ietf-ldapbis-strprep-05 9 February 2005
+
+2.6.3. telephoneNumber Insignificant Character Handling
+ For the purposes of this section, a hyphen is defined to be
+ HYPHEN-MINUS (U+002D), ARMENIAN HYPHEN (U+058A), HYPHEN (U+2010),
NON-BREAKING HYPHEN (U+2011), MINUS SIGN (U+2212), SMALL HYPHEN-MINUS
(U+FE63), or FULLWIDTH HYPHEN-MINUS (U+FF0D) code point followed by no
combining marks and a space is defined to be the SPACE (U+0020) code
point followed by no combining marks.
- All hyphens and spaces are considered insignificant. If the string
- contains only spaces and hyphens or is empty, then the output is a
- string consisting of one space. Otherwise, all hyphens and spaces are
+ All hyphens and spaces are considered insignificant and are to be
removed.
For example, removal of hyphens and spaces from the Form KC string:
"123456"
and the Form KC string:
"<HYPHEN><HYPHEN><HYPHEN>"
- would result in the output string:
- "<SPACE>".
+ would result in the (empty) output string:
+ "".
3. Security Considerations
here.
-4. Contributors
-
- Appendix A and B of this document were authored by Howard Chu
- <hyc@symas.com> of Symas Corporation (based upon information provided
- in RFC 1345).
-
-
-5. Acknowledgments
+4. Acknowledgments
The approach used in this document is based upon design principles and
algorithms described in "Preparation of Internationalized Strings
Group.
-6. Author's Address
+5. Author's Address
+
+ Kurt D. Zeilenga
+ OpenLDAP Foundation
+
+ Email: Kurt@OpenLDAP.org
Zeilenga LDAPprep [Page 8]
\f
-Internet-Draft draft-ietf-ldapbis-strprep-03 15 February 2004
+Internet-Draft draft-ietf-ldapbis-strprep-05 9 February 2005
- Kurt D. Zeilenga
- OpenLDAP Foundation
-
- Email: Kurt@OpenLDAP.org
+6. References
+ [[Note to the RFC Editor: please replace the citation tags used in
+ referencing Internet-Drafts with tags of the form RFCnnnn where
+ possible.]]
-7. References
-7.1. Normative References
+6.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14 (also RFC 2119), March 1997.
Syntax Notation One (ASN.1) - Specification of Basic
Notation", X.680(1997) (also ISO/IEC 8824-1:1998).
- [T.61] CCITT (now ITU), "Character Repertoire and Coded
- Character Sets for the International Teletex Service",
- T.61, 1988.
-7.2. Informative References
+6.2. Informative References
+ [X.500] International Telecommunication Union -
+ Telecommunication Standardization Sector, "The Directory
+ -- Overview of concepts, models and services,"
+ X.500(1993) (also ISO/IEC 9594-1:1994).
Zeilenga LDAPprep [Page 9]
\f
-Internet-Draft draft-ietf-ldapbis-strprep-03 15 February 2004
+Internet-Draft draft-ietf-ldapbis-strprep-05 9 February 2005
- [X.500] International Telecommunication Union -
- Telecommunication Standardization Sector, "The Directory
- -- Overview of concepts, models and services,"
- X.500(1993) (also ISO/IEC 9594-1:1994).
-
[X.501] International Telecommunication Union -
Telecommunication Standardization Sector, "The Directory
-- Models," X.501(1993) (also ISO/IEC 9594-2:1994).
RFC 1345, June 1992.
-Appendix A. Teletex (T.61) to Unicode
+Appendix A. Combining Marks
+
+ This appendix is normative.
+
+ 0300-034F 0360-036F 0483-0486 0488-0489 0591-05A1 05A3-05B9 05BB-05BC
+ 05BF 05C1-05C2 05C4 064B-0655 0670 06D6-06DC 06DE-06E4 06E7-06E8
+ 06EA-06ED 0711 0730-074A 07A6-07B0 0901-0903 093C 093E-094F 0951-0954
+ 0962-0963 0981-0983 09BC 09BE-09C4 09C7-09C8 09CB-09CD 09D7 09E2-09E3
+ 0A02 0A3C 0A3E-0A42 0A47-0A48 0A4B-0A4D 0A70-0A71 0A81-0A83 0ABC
+ 0ABE-0AC5 0AC7-0AC9 0ACB-0ACD 0B01-0B03 0B3C 0B3E-0B43 0B47-0B48
+ 0B4B-0B4D 0B56-0B57 0B82 0BBE-0BC2 0BC6-0BC8 0BCA-0BCD 0BD7 0C01-0C03
+ 0C3E-0C44 0C46-0C48 0C4A-0C4D 0C55-0C56 0C82-0C83 0CBE-0CC4 0CC6-0CC8
+ 0CCA-0CCD 0CD5-0CD6 0D02-0D03 0D3E-0D43 0D46-0D48 0D4A-0D4D 0D57
+ 0D82-0D83 0DCA 0DCF-0DD4 0DD6 0DD8-0DDF 0DF2-0DF3 0E31 0E34-0E3A
+ 0E47-0E4E 0EB1 0EB4-0EB9 0EBB-0EBC 0EC8-0ECD 0F18-0F19 0F35 0F37 0F39
+ 0F3E-0F3F 0F71-0F84 0F86-0F87 0F90-0F97 0F99-0FBC 0FC6 102C-1032
+ 1036-1039 1056-1059 1712-1714 1732-1734 1752-1753 1772-1773 17B4-17D3
+ 180B-180D 18A9 20D0-20EA 302A-302F 3099-309A FB1E FE00-FE0F FE20-FE23
+ 1D165-1D169 1D16D-1D172 1D17B-1D182 1D185-1D18B 1D1AA-1D1AD
- This appendix defines an algorithm for transcoding [T.61] characters
- to [Unicode] characters for use in string preparation for LDAP
- matching rules. This appendix is normative.
- The transcoding algorithm is derived from the T.61-8bit definition
- provided in [RFC1345]. With a few exceptions, the T.61 character
- codes from x00 to x7f are equivalent to the corresponding [Unicode]
- code points, and their values are left unchanged by this algorithm.
- E.g. the T.61 code x20 is identical to (U+0020). The exceptions are
- for these T.61 codes that are undefined: x23, x24, x5c, x5e, x60, x7b,
- x7d, and x7e.
- The codes from x80 to x9f are also equivalent to the corresponding
- Unicode code points. This is specified for completeness only, as
- these codes are control characters, and will be mapped to nothing in
- the LDAP String Preparation Mapping step.
+Appendix B. Substrings Matching
Zeilenga LDAPprep [Page 10]
\f
-Internet-Draft draft-ietf-ldapbis-strprep-03 15 February 2004
-
-
- The remaining T.61 codes are mapped below in Table A.1. Table
- positions marked "??" are undefined.
-
- Input strings containing undefined T.61 codes SHALL produce an
- Undefined matching result. For diagnostic purposes, this algorithm
- does not fail for undefined input codes. Instead, undefined codes in
- the input are mapped to the Unicode REPLACEMENT CHARACTER (U+FFFD).
- As the LDAP String Preparation Prohibit step disallows the REPLACEMENT
- CHARACTER from appearing in its output, this transcoding yields the
- desired effect.
-
- Note: RFC 1345 listed the non-spacing accent codepoints as residing in
- the range starting at (U+E000). In the current Unicode
- standard, the (U+E000) range is reserved for Private Use, and
- the non-spacing accents are in the range starting at (U+0300).
- The tables here use the (U+0300) range for these accents.
-
- | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
- --+------+------+------+------+------+------+------+------+
- a0| 00a0 | 00a1 | 00a2 | 00a3 | 0024 | 00a5 | 0023 | 00a7 |
- a8| 00a8 | ?? | ?? | 00ab | ?? | ?? | ?? | ?? |
- b0| 00b0 | 00b1 | 00b2 | 00b3 | 00d7 | 00b5 | 00b6 | 00b7 |
- b8| 00f7 | ?? | ?? | 00bb | 00bc | 00bd | 00be | 00bf |
- c0| ?? | 0300 | 0301 | 0302 | 0303 | 0304 | 0306 | 0307 |
- c8| 0308 | ?? | 030a | 0327 | 0332 | 030b | 0328 | 030c |
- d0| ?? | ?? | ?? | ?? | ?? | ?? | ?? | ?? |
- d8| ?? | ?? | ?? | ?? | ?? | ?? | ?? | ?? |
- e0| 2126 | 00c6 | 00d0 | 00aa | ?? | 0126 | 0132 | 013f |
- e8| 0141 | 00d8 | 0152 | 00ba | 00de | 0166 | 014a | 0149 |
- f0| 0138 | 00e6 | 0111 | 00f0 | 0127 | 0131 | 0133 | 0140 |
- f8| 0142 | 00f8 | 0153 | 00df | 00fe | 0167 | 014b | ?? |
- --+------+------+------+------+------+------+------+------+
- Table A.1: Mapping of 8-bit T.61 codes to Unicode
-
- T.61 also defines a number of accented characters that are formed by
- combining an accent prefix followed by a base character. These
- prefixes are in the code range xc1 to xcf. If a prefix character
- appears at the end of a string, the result is undefined. Otherwise
- these sequences are mapped to Unicode by substituting the
- corresponding non-spacing accent code (as listed in Table A.1) for the
- accent prefix, and exchanging the order so that the base character
- precedes the accent.
-
-
-Appendix B. Additional Teletex (T.61) to Unicode Tables
-
- All of the accented characters in T.61 have a corresponding code point
- in Unicode. For the sake of completeness, the combined character
+Internet-Draft draft-ietf-ldapbis-strprep-05 9 February 2005
+
+
+ In absence of substrings matching, the insignificant space handling
+ for case ignore/exact matching could be simplified. Specifically,
+ the handling could be as require all sequences of one or more spaces
+ be replaced with one space and, if string contains non-space
+ characters, removal of all all leading spaces and trailing spaces.
+
+ In the presence of substrings matching, this simplified space handling
+ this simplified space handling would lead to unexpected and
+ undesirable matching behavior. For instance:
+ 1) (CN=foo\20*\20bar) would match the CN value "foobar" but not
+ "foo<SPACE>bar" nor "foo<SPACE><SPACE>bar";
+ 2) (CN=*\20foobar\20*) would match "foobar", but (CN=*\20*foobar*\20*)
+ would not;
+ 3) (CN=foo\20*\20bar) would match "foo<SPACE>X<SPACE>bar" but not
+ "foo<SPACE><SPACE>bar".
+
+ The first case illustrates that this simplified space handling would
+ cause leading and trailing spaces in substrings of the string to be
+ regarded as insignificant. However, only leading and trailing (as
+ well as multiple consecutive spaces) of the string (as a whole) are
+ insignificant.
+
+ The second case illustrates that this simplified space handling would
+ cause sub-partitioning failures. That is, if a prepared any substring
+ matches a partition of the attribute value, then an assertion
+ constructed by subdividing that substring into multiple substrings
+ should also match.
+
+ The third case illustrates that this simplified space handling causes
+ another partitioning failure. Though both the initial or final
+ strings match different portions of "foo<SPACE>X<SPACE>bar" with
+ neither matching the X portion, they don't match a string consisting
+ of the two matched portions less the unmatched X portion.
+
+ In designing an appropriate approach for space handling for substrings
+ matching, one must study key aspects of X.500 case exact/ignore
+ matching. X.520 [X.520] says:
+ The [substrings] rule returns TRUE if there is a partitioning of
+ the attribute value (into portions) such that:
+ - the specified substrings (initial, any, final) match different
+ portions of the value in the order of the strings sequence;
+ - initial, if present, matches the first portion of the value;
+ - final, if present, matches the last portion of the value;
+ - any, if present, matches some arbitrary portion of the value.
+
+ That is, the substrings assertion (CN=foo\20*\20bar) matches the
+ attribute value "foo<SPACE><SPACE>bar" as the value can be partitioned
+ into the portions "foo<SPACE>" and "<SPACE>bar" meeting the above
Zeilenga LDAPprep [Page 11]
\f
-Internet-Draft draft-ietf-ldapbis-strprep-03 15 February 2004
-
-
- codes are presented in the following tables. This is informational
- only; for matching purposes it is sufficient to map the non-spacing
- accent and exchange the order of the character pair as specified in
- Appendix A. This appendix is informative.
-
-
-B.1. Combinations with SPACE
+Internet-Draft draft-ietf-ldapbis-strprep-05 9 February 2005
+
+
+ requirements.
+
+ X.520 also says:
+ [T]he following spaces are regarded as not significant:
+ - leading spaces (i.e. those preceding the first character that is
+ not a space);
+ - trailing spaces (i.e. those following the last character that is
+ not a space);
+ - multiple consecutive spaces (these are taken as equivalent to a
+ single space character).
+
+ This statement applies to the assertion values and attribute values
+ as whole strings, and not individually to substrings of an assertion
+ value. In particular, the statements should be taken to mean that
+ if an assertion value and attribute value match without any
+ consideration to insignificant characters, then that assertion value
+ should also match any attribute value which differs only by inclusion
+ or removal of insignificant characters.
+
+ Hence, the assertion (CN=foo\20*\20bar) matches
+ "foo<SPACE><SPACE><SPACE>bar" and "foo<SPACE>bar" as these values
+ only differ from "foo<SPACE><SPACE>bar" by the inclusion or removal
+ of insignificant spaces.
+
+ Astute readers of this text will also note that there are special
+ cases where the specified space handling does not ignore spaces
+ which could be considered insignificant. For instance, the assertion
+ (CN=\20*\20*\20) does not match "<SPACE><SPACE><SPACE>"
+ (insignificant spaces present in value) nor " " (insignificant
+ spaces not present in value). However, as these cases have no
+ practical application that cannot be met by simple assertions, e.g.
+ (cn=\20), and this minor anomaly can only be fully addressed by a
+ preparation algorithm to be used in conjunction with
+ character-by-character partitioning and matching, the anomaly is
+ considered acceptable.
- Accents may be combined with a <SPACE> to generate the accent by
- itself. For each accent code, the result of combining with <SPACE> is
- listed in Table B.1.
- | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
- --+------+------+------+------+------+------+------+------+
- c0| ?? | 0060 | 00b4 | 005e | 007e | 00af | 02d8 | 02d9 |
- c8| 00a8 | ?? | 02da | 00b8 | ?? | 02dd | 02db | 02c7 |
- --+------+------+------+------+------+------+------+------+
- Table B.1: Mapping of T.61 Accents with <SPACE> to Unicode
+Intellectual Property Rights
-B.2. Combinations for xc1: (Grave accent)
-
- T.61 has predefined characters for combinations with A, E, I, O, and
- U. Unicode also defines combinations for N, W, and Y. All of these
- combinations are present in Table B.2.
-
- | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
- --+------+------+------+------+------+------+------+------+
- 40| ?? | 00c0 | ?? | ?? | ?? | 00c8 | ?? | ?? |
- 48| ?? | 00cc | ?? | ?? | ?? | ?? | 01f8 | 00d2 |
- 50| ?? | ?? | ?? | ?? | ?? | 00d9 | ?? | 1e80 |
- 58| ?? | 1ef2 | ?? | ?? | ?? | ?? | ?? | ?? |
- 60| ?? | 00e0 | ?? | ?? | ?? | 00e8 | ?? | ?? |
- 68| ?? | 00ec | ?? | ?? | ?? | ?? | 01f9 | 00f2 |
- 70| ?? | ?? | ?? | ?? | ?? | 00f9 | ?? | 1e81 |
- 78| ?? | 1ef3 | ?? | ?? | ?? | ?? | ?? | ?? |
- --+------+------+------+------+------+------+------+------+
- Table B.2: Mapping of T.61 Grave Accent Combinations
-
-
-B.3. Combinations for xc2: (Acute accent)
-
- T.61 has predefined characters for combinations with A, E, I, O, U, Y,
- C, L, N, R, S, and Z. Unicode also defines G, K, M, P, and W. All of
- these combinations are present in Table B.3.
-
- | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
- --+------+------+------+------+------+------+------+------+
+ The IETF takes no position regarding the validity or scope of any
+ Intellectual Property Rights or other rights that might be claimed
+ to pertain to the implementation or use of the technology described
+ in this document or the extent to which any license under such
+ rights might or might not be available; nor does it represent that
+ it has made any independent effort to identify any such rights.
+ Information on the procedures with respect to rights in RFC documents
+ can be found in BCP 78 and BCP 79.
Zeilenga LDAPprep [Page 12]
\f
-Internet-Draft draft-ietf-ldapbis-strprep-03 15 February 2004
-
-
- 40| ?? | 00c1 | ?? | 0106 | ?? | 00c9 | ?? | 01f4 |
- 48| ?? | 00cd | ?? | 1e30 | 0139 | 1e3e | 0143 | 00d3 |
- 50| 1e54 | ?? | 0154 | 015a | ?? | 00da | ?? | 1e82 |
- 58| ?? | 00dd | 0179 | ?? | ?? | ?? | ?? | ?? |
- 60| ?? | 00e1 | ?? | 0107 | ?? | 00e9 | ?? | 01f5 |
- 68| ?? | 00ed | ?? | 1e31 | 013a | 1e3f | 0144 | 00f3 |
- 70| 1e55 | ?? | 0155 | 015b | ?? | 00fa | ?? | 1e83 |
- 78| ?? | 00fd | 017a | ?? | ?? | ?? | ?? | ?? |
- --+------+------+------+------+------+------+------+------+
- Table B.3: Mapping of T.61 Acute Accent Combinations
-
-
-B.4. Combinations for xc3: (Circumflex)
-
- T.61 has predefined characters for combinations with A, E, I, O, U, Y,
- C, G, H, J, S, and W. Unicode also defines the combination for Z.
- All of these combinations are present in Table B.4.
-
- | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
- --+------+------+------+------+------+------+------+------+
- 40| ?? | 00c2 | ?? | 0108 | ?? | 00ca | ?? | 011c |
- 48| 0124 | 00ce | 0134 | ?? | ?? | ?? | ?? | 00d4 |
- 50| ?? | ?? | ?? | 015c | ?? | 00db | ?? | 0174 |
- 58| ?? | 0176 | 1e90 | ?? | ?? | ?? | ?? | ?? |
- 60| ?? | 00e2 | ?? | 0109 | ?? | 00ea | ?? | 011d |
- 68| 0125 | 00ee | 0135 | ?? | ?? | ?? | ?? | 00f4 |
- 70| ?? | ?? | ?? | 015d | ?? | 00fb | ?? | 0175 |
- 78| ?? | 0177 | 1e91 | ?? | ?? | ?? | ?? | ?? |
- --+------+------+------+------+------+------+------+------+
- Table B.4: Mapping of T.61 Circumflex Accent Combinations
-
-
-B.5. Combinations for xc4: (Tilde)
-
- T.61 has predefined characters for combinations with A, I, O, U, and
- N. Unicode also defines E, V, and Y. All of these combinations are
- present in Table B.5.
-
- | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
- --+------+------+------+------+------+------+------+------+
- 40| ?? | 00c3 | ?? | ?? | ?? | 1ebc | ?? | ?? |
- 48| ?? | 0128 | ?? | ?? | ?? | ?? | 00d1 | 00d5 |
- 50| ?? | ?? | ?? | ?? | ?? | 0168 | 1e7c | ?? |
- 58| ?? | 1ef8 | ?? | ?? | ?? | ?? | ?? | ?? |
- 60| ?? | 00e3 | ?? | ?? | ?? | 1ebd | ?? | ?? |
- 68| ?? | 0129 | ?? | ?? | ?? | ?? | 00f1 | 00f5 |
- 70| ?? | ?? | ?? | ?? | ?? | 0169 | 1e7d | ?? |
- 78| ?? | 1ef9 | ?? | ?? | ?? | ?? | ?? | ?? |
-
-
-
-Zeilenga LDAPprep [Page 13]
-\f
-Internet-Draft draft-ietf-ldapbis-strprep-03 15 February 2004
-
-
- --+------+------+------+------+------+------+------+------+
- Table B.5: Mapping of T.61 Tilde Accent Combinations
-
-
-B.6. Combinations for xc5: (Macron)
-
- T.61 has predefined characters for combinations with A, E, I, O, and
- U. Unicode also defines Y, G, and AE. All of these combinations are
- present in Table B.6.
-
- | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
- --+------+------+------+------+------+------+------+------+
- 40| ?? | 0100 | ?? | ?? | ?? | 0112 | ?? | 1e20 |
- 48| ?? | 012a | ?? | ?? | ?? | ?? | ?? | 014c |
- 50| ?? | ?? | ?? | ?? | ?? | 016a | ?? | ?? |
- 58| ?? | 0232 | ?? | ?? | ?? | ?? | ?? | ?? |
- 60| ?? | 0101 | ?? | ?? | ?? | 0113 | ?? | 1e21 |
- 68| ?? | 012b | ?? | ?? | ?? | ?? | ?? | 014d |
- 70| ?? | ?? | ?? | ?? | ?? | 016b | ?? | ?? |
- 78| ?? | 0233 | ?? | ?? | ?? | ?? | ?? | ?? |
- e0| ?? | 01e2 | ?? | ?? | ?? | ?? | ?? | ?? |
- f0| ?? | 01e3 | ?? | ?? | ?? | ?? | ?? | ?? |
- --+------+------+------+------+------+------+------+------+
- Table B.6: Mapping of T.61 Macron Accent Combinations
-
-
-B.7. Combinations for xc6: (Breve)
-
- T.61 has predefined characters for combinations with A, U, and G.
- Unicode also defines E, I, and O. All of these combinations are
- present in Table B.7.
-
- | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
- --+------+------+------+------+------+------+------+------+
- 40| ?? | 0102 | ?? | ?? | ?? | 0114 | ?? | 011e |
- 48| ?? | 012c | ?? | ?? | ?? | ?? | ?? | 014e |
- 50| ?? | ?? | ?? | ?? | ?? | 016c | ?? | ?? |
- 58| ?? | ?? | ?? | ?? | ?? | ?? | ?? | ?? |
- 60| ?? | 0103 | ?? | ?? | ?? | 0115 | ?? | 011f |
- 68| ?? | 012d | ?? | ?? | ?? | ?? | 00f1 | 014f |
- 70| ?? | ?? | ?? | ?? | ?? | 016d | ?? | ?? |
- 78| ?? | ?? | ?? | ?? | ?? | ?? | ?? | ?? |
- --+------+------+------+------+------+------+------+------+
- Table B.7: Mapping of T.61 Breve Accent Combinations
-
-
-B.8. Combinations for xc7: (Dot Above)
-
-
-
-
-Zeilenga LDAPprep [Page 14]
-\f
-Internet-Draft draft-ietf-ldapbis-strprep-03 15 February 2004
-
-
- T.61 has predefined characters for C, E, G, I, and Z. Unicode also
- defines A, O, B, D, F, H, M, N, P, R, S, T, W, X, and Y. All of these
- combinations are present in Table B.8.
-
- | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
- --+------+------+------+------+------+------+------+------+
- 40| ?? | 0226 | 1e02 | 010a | 1e0a | 0116 | 1e1e | 0120 |
- 48| 1e22 | 0130 | ?? | ?? | ?? | 1e40 | 1e44 | 022e |
- 50| 1e56 | ?? | 1e58 | 1e60 | 1e6a | ?? | ?? | 1e86 |
- 58| 1e8a | 1e8e | 017b | ?? | ?? | ?? | ?? | ?? |
- 60| ?? | 0227 | 1e03 | 010b | 1e0b | 0117 | 1e1f | 0121 |
- 68| 1e23 | ?? | ?? | ?? | ?? | 1e41 | 1e45 | 022f |
- 70| 1e57 | ?? | 1e59 | 1e61 | 1e6b | ?? | ?? | 1e87 |
- 78| 1e8b | 1e8f | 017c | ?? | ?? | ?? | ?? | ?? |
- --+------+------+------+------+------+------+------+------+
- Table B.8: Mapping of T.61 Dot Above Accent Combinations
-
-
-B.9. Combinations for xc8: (Diaeresis)
+Internet-Draft draft-ietf-ldapbis-strprep-05 9 February 2005
- T.61 has predefined characters for A, E, I, O, U, and Y. Unicode also
- defines H, W, X, and t. All of these combinations are present in
- Table B.9.
- | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
- --+------+------+------+------+------+------+------+------+
- 40| ?? | 00c4 | ?? | ?? | ?? | 00cb | ?? | ?? |
- 48| 1e26 | 00cf | ?? | ?? | ?? | ?? | ?? | 00d6 |
- 50| ?? | ?? | ?? | ?? | ?? | 00dc | ?? | 1e84 |
- 58| 1e8c | 0178 | ?? | ?? | ?? | ?? | ?? | ?? |
- 60| ?? | 00e4 | ?? | ?? | ?? | 00eb | ?? | ?? |
- 68| 1e27 | 00ef | ?? | ?? | ?? | ?? | ?? | 00f6 |
- 70| ?? | ?? | ?? | ?? | 1e97 | 00fc | ?? | 1e85 |
- 78| 1e8d | 00ff | ?? | ?? | ?? | ?? | ?? | ?? |
- --+------+------+------+------+------+------+------+------+
- Table B.8: Mapping of T.61 Diaeresis Accent Combinations
-
-
-B.10. Combinations for xca: (Ring Above)
-
- T.61 has predefined characters for A, and U. Unicode also defines w
- and y. All of these combinations are present in Table B.10.
-
- | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
- --+------+------+------+------+------+------+------+------+
- 40| ?? | 00c5 | ?? | ?? | ?? | ?? | ?? | ?? |
- 48| ?? | ?? | ?? | ?? | ?? | ?? | ?? | ?? |
- 50| ?? | ?? | ?? | ?? | ?? | 016e | ?? | ?? |
-
-
-
-Zeilenga LDAPprep [Page 15]
-\f
-Internet-Draft draft-ietf-ldapbis-strprep-03 15 February 2004
-
-
- 58| ?? | ?? | ?? | ?? | ?? | ?? | ?? | ?? |
- 60| ?? | 00e5 | ?? | ?? | ?? | ?? | ?? | ?? |
- 68| ?? | ?? | ?? | ?? | ?? | ?? | ?? | ?? |
- 70| ?? | ?? | ?? | ?? | ?? | 016f | ?? | 1e98 |
- 78| ?? | 1e99 | ?? | ?? | ?? | ?? | ?? | ?? |
- --+------+------+------+------+------+------+------+------+
- Table B.10: Mapping of T.61 Ring Above Accent Combinations
-
-
-B.11. Combinations for xcb: (Cedilla)
-
- T.61 has predefined characters for C, G, K, L, N, R, S, and T.
- Unicode also defines E, D, and H. All of these combinations are
- present in Table B.11.
-
- | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
- --+------+------+------+------+------+------+------+------+
- 40| ?? | ?? | ?? | 00c7 | 1e10 | 0228 | ?? | 0122 |
- 48| 1e28 | ?? | ?? | 0136 | 013b | ?? | 0145 | ?? |
- 50| ?? | ?? | 0156 | 015e | 0162 | ?? | ?? | ?? |
- 58| ?? | ?? | ?? | ?? | ?? | ?? | ?? | ?? |
- 60| ?? | ?? | ?? | 00e7 | 1e11 | 0229 | ?? | 0123 |
- 68| 1e29 | ?? | ?? | 0137 | 013c | ?? | 0146 | ?? |
- 70| ?? | ?? | 0157 | 015f | 0163 | ?? | ?? | ?? |
- 78| ?? | ?? | ?? | ?? | ?? | ?? | ?? | ?? |
- --+------+------+------+------+------+------+------+------+
- Table B.11: Mapping of T.61 Cedilla Accent Combinations
-
-
-B.12. Combinations for xcd: (Double Acute Accent)
-
- T.61 has predefined characters for O, and U. These combinations are
- present in Table B.12.
-
- | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
- --+------+------+------+------+------+------+------+------+
- 48| ?? | ?? | ?? | ?? | ?? | ?? | ?? | 0150 |
- 50| ?? | ?? | ?? | ?? | ?? | 0170 | ?? | ?? |
- 68| ?? | ?? | ?? | ?? | ?? | ?? | ?? | 0151 |
- 70| ?? | ?? | ?? | ?? | ?? | 0171 | ?? | ?? |
- --+------+------+------+------+------+------+------+------+
- Table B.12: Mapping of T.61 Double Acute Accent Combinations
-
-
-B.13. Combinations for xce: (Ogonek)
-
- T.61 has predefined characters for A, E, I, and U. Unicode also
- defines the combination for O. All of these combinations are present
-
-
-
-Zeilenga LDAPprep [Page 16]
-\f
-Internet-Draft draft-ietf-ldapbis-strprep-03 15 February 2004
-
-
- in Table B.13.
-
- | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
- --+------+------+------+------+------+------+------+------+
- 40| ?? | 0104 | ?? | ?? | ?? | 0118 | ?? | ?? |
- 48| ?? | 012e | ?? | ?? | ?? | ?? | ?? | 01ea |
- 50| ?? | ?? | ?? | ?? | ?? | 0172 | ?? | ?? |
- 58| ?? | ?? | ?? | ?? | ?? | ?? | ?? | ?? |
- 60| ?? | 0105 | ?? | ?? | ?? | 0119 | ?? | ?? |
- 68| ?? | 012f | ?? | ?? | ?? | ?? | ?? | 01eb |
- 70| ?? | ?? | ?? | ?? | ?? | 0173 | ?? | ?? |
- 78| ?? | ?? | ?? | ?? | ?? | ?? | ?? | ?? |
- --+------+------+------+------+------+------+------+------+
- Table B.13: Mapping of T.61 Ogonek Accent Combinations
-
-
-B.14. Combinations for xcf: (Caron)
-
- T.61 has predefined characters for C, D, E, L, N, R, S, T, and Z.
- Unicode also defines A, I, O, U, G, H, j,and K. All of these
- combinations are present in Table B.14.
-
- | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
- --+------+------+------+------+------+------+------+------+
- 40| ?? | 01cd | ?? | 010c | 010e | 011a | ?? | 01e6 |
- 48| 021e | 01cf | ?? | 01e8 | 013d | ?? | 0147 | 01d1 |
- 50| ?? | ?? | 0158 | 0160 | 0164 | 01d3 | ?? | ?? |
- 58| ?? | ?? | 017d | ?? | ?? | ?? | ?? | ?? |
- 60| ?? | 01ce | ?? | 010d | 010f | 011b | ?? | 01e7 |
- 68| 021f | 01d0 | 01f0 | 01e9 | 013e | ?? | 0148 | 01d2 |
- 70| ?? | ?? | 0159 | 0161 | 0165 | 01d4 | ?? | ?? |
- 78| ?? | ?? | 017e | ?? | ?? | ?? | ?? | ?? |
- --+------+------+------+------+------+------+------+------+
- Table B.14: Mapping of T.61 Caron Accent Combinations
-
-
- Appendix B -- Mapping Table
-
- Input Output
- ----- ------
- 0000-0008
- 0009-000D 0020
- 000E-001F
- 007F-009F
- 0085 0020
- 00A0 0020
- 00AD
- 034F
-
-
-
-Zeilenga LDAPprep [Page 17]
-\f
-Internet-Draft draft-ietf-ldapbis-strprep-03 15 February 2004
-
-
- 06DD
- 070F
- 1680 0020
- 1806
- 180B-180E
- 2000-200A 0020
- 200B-200F
- 2028-2029 0020
- 202A-202E
- 202F 0020
- 205F 0020
- 2060-2063
- 206A-206F
- 3000 0020
- FEFF
- FF00-FE0F
- FFF9-FFFC
- 1D173-1D17A
- E0001
- E0020-E007F
-
-
-
-Intellectual Property Rights
-
- The IETF takes no position regarding the validity or scope of any
- intellectual property or other rights that might be claimed to pertain
- to the implementation or use of the technology described in this
- document or the extent to which any license under such rights might or
- might not be available; neither does it represent that it has made any
- effort to identify any such rights. Information on the IETF's
- procedures with respect to rights in standards-track and
- standards-related documentation can be found in BCP-11. Copies of
- claims of rights made available for publication and any assurances of
- licenses to be made available, or the result of an attempt made to
- obtain a general license or permission for the use of such proprietary
- rights by implementors or users of this specification can be obtained
- from the IETF Secretariat.
+ Copies of IPR disclosures made to the IETF Secretariat and any
+ assurances of licenses to be made available, or the result of an
+ attempt made to obtain a general license or permission for the use
+ of such proprietary rights by implementers or users of this
+ specification can be obtained from the IETF on-line IPR repository
+ at http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
- rights which may cover technology that may be required to practice
- this standard. Please address the information to the IETF Executive
- Director.
+ rights that may cover technology that may be required to implement
+ this standard. Please address the information to the IETF at
+ ietf-ipr@ietf.org.
Full Copyright
+ Copyright (C) The Internet Society (2005). This document is subject
+ to the rights, licenses and restrictions contained in BCP 78, and
+ except as set forth therein, the authors retain all their rights.
-
-Zeilenga LDAPprep [Page 18]
-\f
-Internet-Draft draft-ietf-ldapbis-strprep-03 15 February 2004
-
-
- Copyright (C) The Internet Society (2004). All Rights Reserved.
-
- This document and translations of it may be copied and furnished to
- others, and derivative works that comment on or otherwise explain it
- or assist in its implementation may be prepared, copied, published and
- distributed, in whole or in part, without restriction of any kind,
- provided that the above copyright notice and this paragraph are
- included on all such copies and derivative works. However, this
- document itself may not be modified in any way, such as by removing
- the copyright notice or references to the Internet Society or other
- Internet organizations, except as needed for the purpose of
- developing Internet standards in which case the procedures for
- copyrights defined in the Internet Standards process must be followed,
- or as required to translate it into languages other than English.
-
-
+ This document and the information contained herein are provided on an
+ "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE
+ REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE
+ INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
+ THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
+ WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-
-
-
-
-
-
-
-
-
-
-
-
-Zeilenga LDAPprep [Page 19]
+Zeilenga LDAPprep [Page 13]
\f
+
-
Application Working Group M. Ansari
-INTERNET-DRAFT Sun Microsystems, Inc.
-Expires Febuary 2003 L. Howard
+INTERNET-DRAFT Infoblox
+Expires January 2005 L. Howard
PADL Software Pty. Ltd.
- B. Joslin [ed.]
+ B. Neal-Joslin [ed.]
Hewlett-Packard Company
- September 15th, 2003
+ August 17th, 2004
Intended Category: Informational
A Configuration Schema for LDAP Based
Directory User Agents
- <draft-joslin-config-schema-07.txt>
+ <draft-joslin-config-schema-08.txt>
Status of this Memo
-Joslin [Page 1]
+Neal-Joslin [Page 1]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 2]
+Neal-Joslin [Page 2]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 3]
+Neal-Joslin [Page 3]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 4]
+Neal-Joslin [Page 4]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 5]
+Neal-Joslin [Page 5]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 6]
+Neal-Joslin [Page 6]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 7]
+Neal-Joslin [Page 7]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 8]
+Neal-Joslin [Page 8]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 9]
+Neal-Joslin [Page 9]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 10]
+Neal-Joslin [Page 10]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 11]
+Neal-Joslin [Page 11]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 12]
+Neal-Joslin [Page 12]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 13]
+Neal-Joslin [Page 13]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 14]
+Neal-Joslin [Page 14]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 15]
+Neal-Joslin [Page 15]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 16]
+Neal-Joslin [Page 16]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 17]
+Neal-Joslin [Page 17]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 18]
+Neal-Joslin [Page 18]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 19]
+Neal-Joslin [Page 19]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 20]
+Neal-Joslin [Page 20]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 21]
+Neal-Joslin [Page 21]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 22]
+Neal-Joslin [Page 22]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 23]
+Neal-Joslin [Page 23]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 24]
+Neal-Joslin [Page 24]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 25]
+Neal-Joslin [Page 25]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 26]
+Neal-Joslin [Page 26]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 27]
+Neal-Joslin [Page 27]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 28]
+Neal-Joslin [Page 28]
\f
Internet-Draft DUA Configuration Schema October 2002
EMail: lukeh@padl.com
- Bob Joslin
+ Bob Neal-Joslin
Hewlett-Packard Company
19420 Homestead RD MS43-LF
Cupertino, CA 95014
Morteza Ansari
- Sun Microsystems, Inc.
- 901 San Antonio RD MS MPK17-203
- Palo Alto, CA 94303
+ Infoblox
+ 1313 Geneva Drive
+ Sunnyvale, CA 94089
USA
- Phone: +1 650 786-6178
- EMail: morteza.ansari@sun.com
+ Phone: +1 408-716-4300
+ EMail: morteza@infoblox.com
-Joslin [Page 29]
+Neal-Joslin [Page 29]
\f
Internet-Draft DUA Configuration Schema October 2002
-Joslin [Page 30]
-\f
+Neal-Joslin [Page 30]
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.\" $OpenLDAP$
.SH NAME
-slapd-bdb \- BDB backend to slapd
+slapd-bdb, slapd-hdb \- BDB backends to slapd
.SH SYNOPSIS
ETCDIR/slapd.conf
.SH DESCRIPTION
It uses the Sleepycat Berkeley DB (BDB) package to store data.
It makes extensive use of indexing and caching to speed data access.
.LP
+"hdb" is a variant of the BDB backend that uses a hierarchical database
+layout which supports subtree renames. It is otherwise identical to
+the "bdb" behavior, and all the same configuration options apply.
+.LP
It is noted that these options are intended to complement
Berkeley DB configuration options set in the environment's
.B DB_CONFIG
These
.B slapd.conf
options apply to the BDB backend database.
-That is, they must follow a "database bdb" line and come before any
-subsequent "backend" or "database" lines.
+That is, they must follow a "database bdb" or "database hdb" line and
+come before any subsequent "backend" or "database" lines.
Other database options are described in the
.BR slapd.conf (5)
manual page.
.TP
.B cachesize <integer>
-Specify the size in entries of the in-memory cache maintained
+Specify the size in entries of the in-memory entry cache maintained
by the BDB backend database instance.
The default is 1000 entries.
.TP
.B idlcachesize <integer>
Specify the size of the in-memory index cache, in index slots. The
default is zero. A larger value will speed up frequent searches of
-indexed entries.
+indexed entries. An hdb database needs a large idlcachesize
+for good search performance, typically three times the entry cache size
+or larger.
.TP
.B
index {<attrlist>|default} [pres,eq,approx,sub,<special>]
--- /dev/null
+slapd-hdb.5
their usage.
.TP
.B idassert-passwd <password>
-Password used with the proxy authzDN above.
+Password used with the
+.B idassert-authcdn
+above.
.TP
.B idassert-mode <mode> [<flags>]
defines what type of
.RE
.LP
-.B start-tls
+.B tls-start
+.br
+.B tls-try-start
+.br
+.B tls-propagate
.br
-.B try-start-tls
+.B tls-try-propagate
.RS
-execute the start TLS extended operation when the connection is initialized.
-\fBtry-start-tls\fP continues operations if start TLS fails.
+execute the start TLS extended operation when the connection is initialized;
+only works if the URI directive protocol scheme is not \fBldaps://\fP.
+The \fBtls-propagate\fP version issues the Start TLS exop only if the original
+connection did.
+\fBtry-start-tls\fP and \fBtry-propagate-tls\fP continue operations
+if start TLS failed.
.RE
--- /dev/null
+.TH SLAPO-TRANSLUCENT 5 "RELEASEDATE" "OpenLDAP LDVERSION"
+.\" Copyright 2004 The OpenLDAP Foundation All Rights Reserved.
+.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
+.\" $OpenLDAP$
+.SH NAME
+slapo-translucent \- Translucent Proxy overlay
+.SH SYNOPSIS
+ETCDIR/slapd.conf
+.SH DESCRIPTION
+The Translucent Proxy overlay can be used with a backend database such as
+.BR slapd-bdb (5)
+to create a "translucent proxy". Entries retrieved from a remote LDAP
+server may have some or all attributes overridden, or new attributes
+added, by entries in the local database before being presented to the
+client.
+.LP
+A
+.BR search
+operation is first populated with entries from the remote LDAP server, the
+attributes of which are then overridden with any attributes defined in the
+local database. Local overrides may be populated with the
+.BR add ,
+.B modify ,
+and
+.B modrdn
+operations, the use of which is restricted to the root user.
+.LP
+A
+.BR compare
+operation will perform a comparison with attributes defined in the local
+database record (if any) before any comparison is made with data in the
+remote database.
+.SH CONFIGURATION
+The Translucent Proxy overlay uses a remote LDAP server which is configured
+with the options shown in
+.BR slapd-ldap (5).
+These
+.B slapd.conf
+options are specific to the Translucent Proxy overlay; they may appear anywhere
+after the
+.B overlay
+directive and before any subsequent
+.B database
+directive.
+.TP
+.B translucent_strict
+By default, attempts to delete attributes in either the local or remote
+databases will be silently ignored. The
+.B translucent_strict
+directive causes these modifications to fail with a Constraint Violation.
+.TP
+.B translucent_no_glue
+This configuration option disables the automatic creation of "glue" records
+for an
+.B add
+or
+.B modrdn
+operation, such that all parents of an entry added to the local database
+must be created by hand. Glue records are always created for a
+.B modify
+operation.
+.SH CAVEATS
+.LP
+The Translucent Proxy overlay will disable schema checking in the local database,
+so that an entry consisting of overlay attributes need not adhere to the
+complete schema.
+.LP
+Because the translucent overlay does not perform any DN rewrites, the local
+and remote database instances must have the same suffix. Other configurations
+will probably fail with No Such Object and other errors.
+.SH FILES
+.TP
+ETCDIR/slapd.conf
+default slapd configuration file
+.SH SEE ALSO
+.BR slapd.conf (5),
+.BR slapd-ldap (5).
.B [\-v]
.B [\-c]
.B [\-u]
+.B [\-q]
.B [\-w]
.B [\-d level]
.B [\-b suffix]
.B \-u
enable dry-run (don't write to backend) mode.
.TP
+.B \-q
+enable quick (fewer integrity checks) mode. Does fewer consistency checks
+on the input data, and no consistency checks when writing the database.
+Improves the load time but if any errors or interruptions occur the resulting
+database will be unusable.
+.TP
.BI \-w
write syncrepl context information.
After all entries are added, the contextCSN
and LDAP over IPC (Unix domain sockets). Host 0.0.0.0 represents
INADDR_ANY (any interface).
A space separated list of URLs is expected. The URLs should be of
-LDAP (ldap://) or LDAP over TLS (ldaps://) or LDAP over IPC (ldapi://)
-scheme without a DN or other optional parameters, except an experimental
-extension to indicate the permissions of the underlying listeners.
+the LDAP, LDAPS, or LDAPI schemes, and generally
+without a DN or other optional parameters (excepting as discussed below).
Support for the latter two schemes depends on selected configuration
options. Hosts may be specified by name or IPv4 and IPv6 address formats.
Ports, if specified, must be numeric. The default ldap:// port is 389
.B SBINDIR/slapindex
.B [\-v]
.B [\-c]
+.B [\-q]
.B [\-d level]
.B [\-b suffix]
.B [\-n dbnum]
.B \-c
enable continue (ignore errors) mode.
.TP
+.B \-q
+enable quick (fewer integrity checks) mode. Performs no consistency checks
+when writing the database. Improves indexing time, but if any errors or
+interruptions occur the database will most likely be unusable.
+.TP
.BI \-d " level"
enable debugging messages as defined by the specified
.IR level .
rfc3876.txt Returning Matched Values with LDAP (PS)
rfc3909.txt LDAP Cancel Operation (PS)
rfc3928.txt LDAP Client Update Protocol (PS)
+rfc4013.txt SASLprep (PS)
Legend:
STD Standard
--- /dev/null
+
+
+
+
+
+
+Network Working Group K. Zeilenga
+Request for Comments: 4013 OpenLDAP Foundation
+Category: Standards Track February 2005
+
+
+ SASLprep: Stringprep Profile for User Names and Passwords
+
+Status of This Memo
+
+ This document specifies an Internet standards track protocol for the
+ Internet community, and requests discussion and suggestions for
+ improvements. Please refer to the current edition of the "Internet
+ Official Protocol Standards" (STD 1) for the standardization state
+ and status of this protocol. Distribution of this memo is unlimited.
+
+Copyright Notice
+
+ Copyright (C) The Internet Society (2005).
+
+Abstract
+
+ This document describes how to prepare Unicode strings representing
+ user names and passwords for comparison. The document defines the
+ "SASLprep" profile of the "stringprep" algorithm to be used for both
+ user names and passwords. This profile is intended to be used by
+ Simple Authentication and Security Layer (SASL) mechanisms (such as
+ PLAIN, CRAM-MD5, and DIGEST-MD5), as well as other protocols
+ exchanging simple user names and/or passwords.
+
+1. Introduction
+
+ The use of simple user names and passwords in authentication and
+ authorization is pervasive on the Internet. To increase the
+ likelihood that user name and password input and comparison work in
+ ways that make sense for typical users throughout the world, this
+ document defines rules for preparing internationalized user names and
+ passwords for comparison. For simplicity and implementation ease, a
+ single algorithm is defined for both user names and passwords.
+
+ The algorithm assumes all strings are comprised of characters from
+ the Unicode [Unicode] character set.
+
+ This document defines the "SASLprep" profile of the "stringprep"
+ algorithm [StringPrep].
+
+ The profile is designed for use in Simple Authentication and Security
+ Layer ([SASL]) mechanisms, such as [PLAIN], [CRAM-MD5], and
+ [DIGEST-MD5]. It may be applicable where simple user names and
+
+
+
+Zeilenga Standards Track [Page 1]
+\f
+RFC 4013 SASLprep February 2005
+
+
+ passwords are used. This profile is not intended for use in
+ preparing identity strings that are not simple user names (e.g.,
+ email addresses, domain names, distinguished names), or where
+ identity or password strings that are not character data, or require
+ different handling (e.g., case folding).
+
+ This document does not alter the technical specification of any
+ existing protocols. Any specification that wishes to use the
+ algorithm described in this document needs to explicitly incorporate
+ this document and provide precise details as to where and how this
+ algorithm is used by implementations of that specification.
+
+2. The SASLprep Profile
+
+ This section defines the "SASLprep" profile of the "stringprep"
+ algorithm [StringPrep]. This profile is intended for use in
+ preparing strings representing simple user names and passwords.
+
+ This profile uses Unicode 3.2 [Unicode].
+
+ Character names in this document use the notation for code points and
+ names from the Unicode Standard [Unicode]. For example, the letter
+ "a" may be represented as either <U+0061> or <LATIN SMALL LETTER A>.
+ In the lists of mappings and the prohibited characters, the "U+" is
+ left off to make the lists easier to read. The comments for
+ character ranges are shown in square brackets (such as "[CONTROL
+ CHARACTERS]") and do not come from the standard.
+
+ Note: A glossary of terms used in Unicode can be found in [Glossary].
+ Information on the Unicode character encoding model can be found in
+ [CharModel].
+
+2.1. Mapping
+
+ This profile specifies:
+
+ - non-ASCII space characters [StringPrep, C.1.2] that can be
+ mapped to SPACE (U+0020), and
+
+ - the "commonly mapped to nothing" characters [StringPrep, B.1]
+ that can be mapped to nothing.
+
+2.2. Normalization
+
+ This profile specifies using Unicode normalization form KC, as
+ described in Section 4 of [StringPrep].
+
+
+
+
+
+Zeilenga Standards Track [Page 2]
+\f
+RFC 4013 SASLprep February 2005
+
+
+2.3. Prohibited Output
+
+ This profile specifies the following characters as prohibited input:
+
+ - Non-ASCII space characters [StringPrep, C.1.2]
+ - ASCII control characters [StringPrep, C.2.1]
+ - Non-ASCII control characters [StringPrep, C.2.2]
+ - Private Use characters [StringPrep, C.3]
+ - Non-character code points [StringPrep, C.4]
+ - Surrogate code points [StringPrep, C.5]
+ - Inappropriate for plain text characters [StringPrep, C.6]
+ - Inappropriate for canonical representation characters
+ [StringPrep, C.7]
+ - Change display properties or deprecated characters
+ [StringPrep, C.8]
+ - Tagging characters [StringPrep, C.9]
+
+2.4. Bidirectional Characters
+
+ This profile specifies checking bidirectional strings as described in
+ [StringPrep, Section 6].
+
+2.5. Unassigned Code Points
+
+ This profile specifies the [StringPrep, A.1] table as its list of
+ unassigned code points.
+
+3. Examples
+
+ The following table provides examples of how various character data
+ is transformed by the SASLprep string preparation algorithm
+
+ # Input Output Comments
+ - ----- ------ --------
+ 1 I<U+00AD>X IX SOFT HYPHEN mapped to nothing
+ 2 user user no transformation
+ 3 USER USER case preserved, will not match #2
+ 4 <U+00AA> a output is NFKC, input in ISO 8859-1
+ 5 <U+2168> IX output is NFKC, will match #1
+ 6 <U+0007> Error - prohibited character
+ 7 <U+0627><U+0031> Error - bidirectional check
+
+4. Security Considerations
+
+ This profile is intended to prepare simple user name and password
+ strings for comparison or use in cryptographic functions (e.g.,
+ message digests). The preparation algorithm was specifically
+ designed such that its output is canonical, and it is well-formed.
+
+
+
+Zeilenga Standards Track [Page 3]
+\f
+RFC 4013 SASLprep February 2005
+
+
+ However, due to an anomaly [PR29] in the specification of Unicode
+ normalization, canonical equivalence is not guaranteed for a select
+ few character sequences. These sequences, however, do not appear in
+ well-formed text. This specification was published despite this
+ known technical problem. It is expected that this specification will
+ be revised before further progression on the Standards Track (after
+ [Unicode] and/or [StringPrep] specifications have been updated to
+ address this problem).
+
+ It is not intended for preparing identity strings that are not simple
+ user names (e.g., distinguished names, domain names), nor is the
+ profile intended for use of simple user names that require different
+ handling (such as case folding). Protocols (or applications of those
+ protocols) that have application-specific identity forms and/or
+ comparison algorithms should use mechanisms specifically designed for
+ these forms and algorithms.
+
+ Application of string preparation may have an impact upon the
+ feasibility of brute force and dictionary attacks. While the number
+ of possible prepared strings is less than the number of possible
+ Unicode strings, the number of usable names and passwords is greater
+ than as if only ASCII was used. Though SASLprep eliminates some
+ Unicode code point sequences as possible prepared strings, that
+ elimination generally makes the (canonical) output forms practicable
+ and prohibits nonsensical inputs.
+
+ User names and passwords should be protected from eavesdropping.
+
+ General "stringprep" and Unicode security considerations apply. Both
+ are discussed in [StringPrep].
+
+5. IANA Considerations
+
+ This document details the "SASLprep" profile of the [StringPrep]
+ protocol. This profile has been registered in the stringprep profile
+ registry.
+
+ Name of this profile: SASLprep
+ RFC in which the profile is defined: RFC 4013
+ Indicator whether or not this is the newest version of the
+ profile: This is the first version of the SASPprep profile.
+
+6. Acknowledgement
+
+ This document borrows text from "Preparation of Internationalized
+ Strings ('stringprep')" and "Nameprep: A Stringprep Profile for
+ Internationalized Domain Names", both by Paul Hoffman and Marc
+ Blanchet. This document is a product of the IETF SASL WG.
+
+
+
+Zeilenga Standards Track [Page 4]
+\f
+RFC 4013 SASLprep February 2005
+
+
+7. Normative References
+
+ [StringPrep] Hoffman, P. and M. Blanchet, "Preparation of
+ Internationalized Strings ("stringprep")", RFC 3454,
+ December 2002.
+
+ [Unicode] The Unicode Consortium, "The Unicode Standard, Version
+ 3.2.0" is defined by "The Unicode Standard, Version
+ 3.0" (Reading, MA, Addison-Wesley, 2000. ISBN 0-201-
+ 61633-5), as amended by the "Unicode Standard Annex
+ #27: Unicode 3.1"
+ (http://www.unicode.org/reports/tr27/) and by the
+ "Unicode Standard Annex #28: Unicode 3.2"
+ (http://www.unicode.org/reports/tr28/).
+
+8. Informative References
+
+ [Glossary] The Unicode Consortium, "Unicode Glossary",
+ <http://www.unicode.org/glossary/>.
+
+ [CharModel] Whistler, K. and M. Davis, "Unicode Technical Report
+ #17, Character Encoding Model", UTR17,
+ <http://www.unicode.org/unicode/reports/tr17/>, August
+ 2000.
+
+ [SASL] Melnikov, A., Ed., "Simple Authentication and Security
+ Layer (SASL)", Work in Progress.
+
+ [CRAM-MD5] Nerenberg, L., "The CRAM-MD5 SASL Mechanism", Work in
+ Progress.
+
+ [DIGEST-MD5] Leach, P., Newman, C., and A. Melnikov, "Using Digest
+ Authentication as a SASL Mechanism", Work in Progress.
+
+ [PLAIN] Zeilenga, K., Ed., "The Plain SASL Mechanism", Work in
+ Progress.
+
+ [PR29] "Public Review Issue #29: Normalization Issue",
+ <http://www.unicode.org/review/pr-29.html>, February
+ 2004.
+
+Author's Address
+
+ Kurt D. Zeilenga
+ OpenLDAP Foundation
+
+ EMail: Kurt@OpenLDAP.org
+
+
+
+
+Zeilenga Standards Track [Page 5]
+\f
+RFC 4013 SASLprep February 2005
+
+
+Full Copyright Statement
+
+ Copyright (C) The Internet Society (2005).
+
+ This document is subject to the rights, licenses and restrictions
+ contained in BCP 78, and except as set forth therein, the authors
+ retain all their rights.
+
+ This document and the information contained herein are provided on an
+ "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
+ OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
+ ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
+ INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
+ INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
+ WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+Intellectual Property
+
+ The IETF takes no position regarding the validity or scope of any
+ Intellectual Property Rights or other rights that might be claimed to
+ pertain to the implementation or use of the technology described in
+ this document or the extent to which any license under such rights
+ might or might not be available; nor does it represent that it has
+ made any independent effort to identify any such rights. Information
+ on the IETF's procedures with respect to rights in IETF Documents can
+ be found in BCP 78 and BCP 79.
+
+ Copies of IPR disclosures made to the IETF Secretariat and any
+ assurances of licenses to be made available, or the result of an
+ attempt made to obtain a general license or permission for the use of
+ such proprietary rights by implementers or users of this
+ specification can be obtained from the IETF on-line IPR repository at
+ http://www.ietf.org/ipr.
+
+ The IETF invites any interested party to bring to its attention any
+ copyrights, patents or patent applications, or other proprietary
+ rights that may cover technology that may be required to implement
+ this standard. Please address the information to the IETF at ietf-
+ ipr@ietf.org.
+
+
+Acknowledgement
+
+ Funding for the RFC Editor function is currently provided by the
+ Internet Society.
+
+
+
+
+
+
+Zeilenga Standards Track [Page 6]
+\f
else AC_MEMCPY( (d), (s), (n) ); \
} while(0)
+#ifdef NEED_MEMCMP_REPLACEMENT
+ int (lutil_memcmp)(const void *b1, const void *b2, size_t len);
+#define memcmp lutil_memcmp
+#endif
+
#define STRLENOF(s) (sizeof(s)-1)
#if defined( HAVE_NONPOSIX_STRERROR_R )
LDAP **ldp,
LDAP_CONST char *url ));
+/*
+ * in tls.c
+ */
+
+LDAP_F( int )
+ldap_start_tls LDAP_P((
+ LDAP *ld,
+ LDAPControl **serverctrls,
+ LDAPControl **clientctrls,
+ int *msgidp ));
+
+LDAP_F( int )
+ldap_install_tls LDAP_P((
+ LDAP *ld ));
+
LDAP_F( int )
ldap_start_tls_s LDAP_P((
LDAP *ld,
LDAP_F (int) ldap_pvt_sasl_secprops LDAP_P((
const char *in,
struct sasl_security_properties *secprops ));
+LDAP_F (void) ldap_pvt_sasl_secprops_unparse LDAP_P((
+ struct sasl_security_properties *secprops,
+ struct berval *out ));
LDAP_F (void *) ldap_pvt_sasl_mutex_new LDAP_P((void));
LDAP_F (int) ldap_pvt_sasl_mutex_lock LDAP_P((void *mutex));
ldap_pvt_thread_pool_backload LDAP_P((
ldap_pvt_thread_pool_t *pool ));
+LDAP_F( int )
+ldap_pvt_thread_pool_pause LDAP_P((
+ ldap_pvt_thread_pool_t *pool ));
+
+LDAP_F( int )
+ldap_pvt_thread_pool_resume LDAP_P((
+ ldap_pvt_thread_pool_t *pool ));
+
LDAP_F( int )
ldap_pvt_thread_pool_destroy LDAP_P((
ldap_pvt_thread_pool_t *pool,
/* The number of bytes in type wchar_t */
#undef SIZEOF_WCHAR_T
+/* define if memcmp is not 8-bit clean or is otherwise broken */
+#undef NEED_MEMCMP_REPLACEMENT
+
/* define to you inet_aton(3) is available */
#undef HAVE_INET_ATON
/* define to support SQL backend */
#undef SLAPD_SQL
-/* define for Dynamic Group overlay */
-#undef SLAPD_OVER_CHAIN
-
/* define for Dynamic Group overlay */
#undef SLAPD_OVER_DENYOP
/* define for Syncrepl Provider overlay */
#undef SLAPD_OVER_SYNCPROV
+/* define for Translucent Proxy overlay */
+#undef SLAPD_OVER_TRANSLUCENT
+
/* define for Attribute Uniqueness overlay */
#undef SLAPD_OVER_UNIQUE
}
+#define GOT_MINSSF 1
+#define GOT_MAXSSF 2
+#define GOT_MAXBUF 4
+
+static struct {
+ struct berval key;
+ int sflag;
+ int ival;
+ int idef;
+} sprops[] = {
+ { BER_BVC("none"), 0, 0, 0 },
+ { BER_BVC("nodict"), SASL_SEC_NODICTIONARY, 0, 0 },
+ { BER_BVC("noplain"), SASL_SEC_NOPLAINTEXT, 0, 0 },
+ { BER_BVC("noactive"), SASL_SEC_NOACTIVE, 0, 0 },
+ { BER_BVC("passcred"), SASL_SEC_PASS_CREDENTIALS, 0, 0 },
+ { BER_BVC("forwardsec"), SASL_SEC_FORWARD_SECRECY, 0, 0 },
+ { BER_BVC("noanonymous"), SASL_SEC_NOANONYMOUS, 0, 0 },
+ { BER_BVC("minssf="), 0, GOT_MINSSF, 0 },
+ { BER_BVC("maxssf="), 0, GOT_MAXSSF, INT_MAX },
+ { BER_BVC("maxbufsize="), 0, GOT_MAXBUF, 65536 },
+ { BER_BVNULL, 0, 0 }
+};
+
+void ldap_pvt_sasl_secprops_unparse(
+ sasl_security_properties_t *secprops,
+ struct berval *out )
+{
+ int i, l = 0;
+ int comma;
+ char *ptr;
+
+ if ( secprops == NULL || out == NULL ) {
+ return;
+ }
+
+ comma = 0;
+ for ( i=0; !BER_BVISNULL( &sprops[i].key ); i++ ) {
+ if ( sprops[i].ival ) {
+ int v;
+
+ switch( sprops[i].ival ) {
+ case GOT_MINSSF: v = secprops->min_ssf; break;
+ case GOT_MAXSSF: v = secprops->max_ssf; break;
+ case GOT_MAXBUF: v = secprops->maxbufsize; break;
+ }
+ /* It is the default, ignore it */
+ if ( v == sprops[i].idef ) continue;
+
+ l += sprops[i].key.bv_len + 24;
+ } else if ( sprops[i].sflag ) {
+ if ( sprops[i].sflag & secprops->security_flags ) {
+ l += sprops[i].key.bv_len;
+ }
+ } else if ( secprops->security_flags == 0 ) {
+ l += sprops[i].key.bv_len;
+ }
+ if ( comma ) l++;
+ comma = 1;
+ }
+ l++;
+
+ out->bv_val = LDAP_MALLOC( l );
+ if ( out->bv_val == NULL ) {
+ out->bv_len = 0;
+ return;
+ }
+
+ ptr = out->bv_val;
+ comma = 0;
+ for ( i=0; !BER_BVISNULL( &sprops[i].key ); i++ ) {
+ if ( sprops[i].ival ) {
+ int v;
+
+ switch( sprops[i].ival ) {
+ case GOT_MINSSF: v = secprops->min_ssf; break;
+ case GOT_MAXSSF: v = secprops->max_ssf; break;
+ case GOT_MAXBUF: v = secprops->maxbufsize; break;
+ }
+ /* It is the default, ignore it */
+ if ( v == sprops[i].idef ) continue;
+
+ if ( comma ) *ptr++ = ',';
+ ptr += sprintf(ptr, "%s%d", sprops[i].key.bv_val, v );
+ comma = 1;
+ } else if ( sprops[i].sflag ) {
+ if ( sprops[i].sflag & secprops->security_flags ) {
+ if ( comma ) *ptr++ = ',';
+ ptr += sprintf(ptr, "%s", sprops[i].key.bv_val );
+ comma = 1;
+ }
+ } else if ( secprops->security_flags == 0 ) {
+ if ( comma ) *ptr++ = ',';
+ ptr += sprintf(ptr, "%s", sprops[i].key.bv_val );
+ comma = 1;
+ }
+ }
+ out->bv_len = ptr - out->bv_val;
+}
+
int ldap_pvt_sasl_secprops(
const char *in,
sasl_security_properties_t *secprops )
{
- int i;
+ int i, j, l;
char **props = ldap_str2charray( in, "," );
unsigned sflags = 0;
int got_sflags = 0;
}
for( i=0; props[i]; i++ ) {
- if( !strcasecmp(props[i], "none") ) {
- got_sflags++;
-
- } else if( !strcasecmp(props[i], "noplain") ) {
- got_sflags++;
- sflags |= SASL_SEC_NOPLAINTEXT;
-
- } else if( !strcasecmp(props[i], "noactive") ) {
- got_sflags++;
- sflags |= SASL_SEC_NOACTIVE;
-
- } else if( !strcasecmp(props[i], "nodict") ) {
- got_sflags++;
- sflags |= SASL_SEC_NODICTIONARY;
-
- } else if( !strcasecmp(props[i], "forwardsec") ) {
- got_sflags++;
- sflags |= SASL_SEC_FORWARD_SECRECY;
-
- } else if( !strcasecmp(props[i], "noanonymous")) {
- got_sflags++;
- sflags |= SASL_SEC_NOANONYMOUS;
-
- } else if( !strcasecmp(props[i], "passcred") ) {
- got_sflags++;
- sflags |= SASL_SEC_PASS_CREDENTIALS;
-
- } else if( !strncasecmp(props[i],
- "minssf=", sizeof("minssf")) )
- {
- if( isdigit( (unsigned char) props[i][sizeof("minssf")] ) ) {
- got_min_ssf++;
- min_ssf = atoi( &props[i][sizeof("minssf")] );
- } else {
- return LDAP_NOT_SUPPORTED;
- }
-
- } else if( !strncasecmp(props[i],
- "maxssf=", sizeof("maxssf")) )
- {
- if( isdigit( (unsigned char) props[i][sizeof("maxssf")] ) ) {
- got_max_ssf++;
- max_ssf = atoi( &props[i][sizeof("maxssf")] );
+ l = strlen( props[i] );
+ for ( j=0; !BER_BVISNULL( &sprops[j].key ); j++ ) {
+ if ( l < sprops[j].key.bv_len ) continue;
+ if ( strncasecmp( props[i], sprops[j].key.bv_val,
+ sprops[j].key.bv_len )) continue;
+ if ( sprops[j].ival ) {
+ int v;
+ if ( props[i][sprops[j].key.bv_len] != '=' ) continue;
+ if ( !isdigit( props[i][sprops[j].key.bv_len+1] )) continue;
+ v = atoi( props[i]+sprops[j].key.bv_len+1 );
+ switch( sprops[j].ival ) {
+ case GOT_MINSSF:
+ min_ssf = v; got_min_ssf++; break;
+ case GOT_MAXSSF:
+ max_ssf = v; got_max_ssf++; break;
+ case GOT_MAXBUF:
+ maxbufsize = v; got_maxbufsize++; break;
+ }
} else {
- return LDAP_NOT_SUPPORTED;
+ if ( props[i][sprops[j].key.bv_len] ) continue;
+ if ( sprops[j].sflag )
+ sflags |= sprops[j].sflag;
+ else
+ sflags = 0;
+ got_sflags++;
}
-
- } else if( !strncasecmp(props[i],
- "maxbufsize=", sizeof("maxbufsize")) )
- {
- if( isdigit( (unsigned char) props[i][sizeof("maxbufsize")] ) ) {
- got_maxbufsize++;
- maxbufsize = atoi( &props[i][sizeof("maxbufsize")] );
- } else {
- return LDAP_NOT_SUPPORTED;
- }
-
- if( maxbufsize && (( maxbufsize < SASL_MIN_BUFF_SIZE )
- || (maxbufsize > SASL_MAX_BUFF_SIZE )))
- {
- /* bad maxbufsize */
- return LDAP_PARAM_ERROR;
- }
-
- } else {
+ break;
+ }
+ if ( BER_BVISNULL( &sprops[j].key )) {
return LDAP_NOT_SUPPORTED;
}
}
assert( ld != NULL );
assert( LDAP_VALID( ld ) );
- assert( reqoid != NULL || *reqoid == '\0' );
+ assert( reqoid != NULL && *reqoid != '\0' );
assert( msgidp != NULL );
/* must be version 3 (or greater) */
assert( ld != NULL );
assert( LDAP_VALID( ld ) );
- assert( reqoid != NULL || *reqoid == '\0' );
- assert( retoidp != NULL || retdatap != NULL );
+ assert( reqoid != NULL && *reqoid != '\0' );
rc = ldap_extended_operation( ld, reqoid, reqdata,
sctrls, cctrls, &msgid );
#endif
}
+int
+ldap_start_tls( LDAP *ld,
+ LDAPControl **serverctrls,
+ LDAPControl **clientctrls,
+ int *msgidp )
+{
+ return ldap_extended_operation( ld, LDAP_EXOP_START_TLS,
+ NULL, serverctrls, clientctrls, msgidp );
+}
+
+int
+ldap_install_tls( LDAP *ld )
+{
+#ifndef HAVE_TLS
+ return LDAP_NOT_SUPPORTED;
+#else
+ if ( ld->ld_sb != NULL && ldap_pvt_tls_inplace( ld->ld_sb ) != 0 ) {
+ return LDAP_LOCAL_ERROR;
+ }
+
+ return ldap_int_tls_start( ld, ld->ld_defconn, NULL );
+#endif
+}
+
int
ldap_start_tls_s ( LDAP *ld,
LDAPControl **serverctrls,
LDAPControl **clientctrls )
{
+#ifndef HAVE_TLS
+ return LDAP_NOT_SUPPORTED;
+#else
int rc;
-
-#ifdef HAVE_TLS
char *rspoid = NULL;
struct berval *rspdata = NULL;
rc = ldap_int_tls_start( ld, ld->ld_defconn, NULL );
}
-#else
- rc = LDAP_NOT_SUPPORTED;
-#endif
return rc;
+#endif
}
enum ldap_int_thread_pool_state {
LDAP_INT_THREAD_POOL_RUNNING,
LDAP_INT_THREAD_POOL_FINISHING,
- LDAP_INT_THREAD_POOL_STOPPING
+ LDAP_INT_THREAD_POOL_STOPPING,
+ LDAP_INT_THREAD_POOL_PAUSING,
};
typedef struct ldap_int_thread_key_s {
LDAP_STAILQ_ENTRY(ldap_int_thread_pool_s) ltp_next;
ldap_pvt_thread_mutex_t ltp_mutex;
ldap_pvt_thread_cond_t ltp_cond;
+ ldap_pvt_thread_cond_t ltp_pcond;
LDAP_STAILQ_HEAD(tcq, ldap_int_thread_ctx_s) ltp_pending_list;
LDAP_SLIST_HEAD(tcl, ldap_int_thread_ctx_s) ltp_free_list;
LDAP_SLIST_HEAD(tclq, ldap_int_thread_ctx_s) ltp_active_list;
if (rc != 0)
return(rc);
rc = ldap_pvt_thread_cond_init(&pool->ltp_cond);
+ if (rc != 0)
+ return(rc);
+ rc = ldap_pvt_thread_cond_init(&pool->ltp_pcond);
if (rc != 0)
return(rc);
pool->ltp_state = LDAP_INT_THREAD_POOL_RUNNING;
LDAP_STAILQ_REMOVE(ldap_int_thread_pool_list, pool,
ldap_int_thread_pool_s, ltp_next);
ldap_pvt_thread_mutex_unlock(&ldap_pvt_thread_pool_mutex);
+ ldap_pvt_thread_cond_destroy(&pool->ltp_pcond);
ldap_pvt_thread_cond_destroy(&pool->ltp_cond);
ldap_pvt_thread_mutex_destroy(&pool->ltp_mutex);
LDAP_FREE(pool);
return(-1);
ldap_pvt_thread_mutex_lock(&pool->ltp_mutex);
- if (pool->ltp_state != LDAP_INT_THREAD_POOL_RUNNING
+ if ((pool->ltp_state != LDAP_INT_THREAD_POOL_RUNNING &&
+ pool->ltp_state != LDAP_INT_THREAD_POOL_PAUSING)
|| (pool->ltp_max_pending > 0
&& pool->ltp_pending_count >= pool->ltp_max_pending))
{
pool->ltp_pending_count++;
LDAP_STAILQ_INSERT_TAIL(&pool->ltp_pending_list, ctx, ltc_next.q);
+ if (pool->ltp_state == LDAP_INT_THREAD_POOL_PAUSING) {
+ ldap_pvt_thread_mutex_unlock(&pool->ltp_mutex);
+ return(0);
+ }
ldap_pvt_thread_cond_signal(&pool->ltp_cond);
if ((pool->ltp_open_count <= 0
#if 0
LDAP_FREE(ctx);
}
+ ldap_pvt_thread_cond_destroy(&pool->ltp_pcond);
ldap_pvt_thread_cond_destroy(&pool->ltp_cond);
ldap_pvt_thread_mutex_destroy(&pool->ltp_mutex);
LDAP_FREE(pool);
ldap_int_thread_ctx_s, ltc_next.al);
LDAP_SLIST_INSERT_HEAD(&pool->ltp_free_list, ctx, ltc_next.l);
pool->ltp_active_count--;
+
+ if (pool->ltp_state == LDAP_INT_THREAD_POOL_PAUSING) {
+ if (pool->ltp_active_count < 2) {
+ ldap_pvt_thread_cond_signal(&pool->ltp_pcond);
+ }
+ ldap_pvt_thread_cond_wait(&pool->ltp_cond, &pool->ltp_mutex);
+ }
ldap_pvt_thread_mutex_unlock(&pool->ltp_mutex);
ldap_pvt_thread_yield();
return(NULL);
}
+int
+ldap_pvt_thread_pool_pause (
+ ldap_pvt_thread_pool_t *tpool )
+{
+ struct ldap_int_thread_pool_s *pool;
+
+ if (tpool == NULL)
+ return(-1);
+
+ pool = *tpool;
+
+ if (pool == NULL)
+ return(0);
+
+ ldap_pvt_thread_mutex_lock(&pool->ltp_mutex);
+
+ /* If someone else has already requested a pause, we have to wait */
+ if (pool->ltp_state == LDAP_INT_THREAD_POOL_PAUSING) {
+ pool->ltp_pending_count++;
+ pool->ltp_active_count--;
+ ldap_pvt_thread_cond_wait(&pool->ltp_cond, &pool->ltp_mutex);
+ pool->ltp_pending_count--;
+ pool->ltp_active_count++;
+ }
+ /* Wait for everyone else to finish */
+ pool->ltp_state = LDAP_INT_THREAD_POOL_PAUSING;
+ while (pool->ltp_active_count > 1) {
+ ldap_pvt_thread_cond_wait(&pool->ltp_pcond, &pool->ltp_mutex);
+ }
+ ldap_pvt_thread_mutex_unlock(&pool->ltp_mutex);
+ return(0);
+}
+
+int
+ldap_pvt_thread_pool_resume (
+ ldap_pvt_thread_pool_t *tpool )
+{
+ struct ldap_int_thread_pool_s *pool;
+
+ if (tpool == NULL)
+ return(-1);
+
+ pool = *tpool;
+
+ if (pool == NULL)
+ return(0);
+
+ ldap_pvt_thread_mutex_lock(&pool->ltp_mutex);
+
+ pool->ltp_state = LDAP_INT_THREAD_POOL_RUNNING;
+ ldap_pvt_thread_cond_broadcast(&pool->ltp_cond);
+ ldap_pvt_thread_mutex_unlock(&pool->ltp_mutex);
+ return(0);
+}
+
int ldap_pvt_thread_pool_getkey(
void *xctx,
void *key,
void*
avl_find( Avlnode *root, const void* data, AVL_CMP fcmp )
{
- root = avl_find2( root, data, fcmp );
+ int cmp;
+
+ while ( root != 0 && (cmp = (*fcmp)( data, root->avl_data )) != 0 ) {
+ if ( cmp < 0 )
+ root = root->avl_left;
+ else
+ root = root->avl_right;
+ }
return( root ? root->avl_data : 0 );
}
#include <sys/stat.h>
#endif
+#include <stdlib.h>
+
+
int getpeereid( int s, uid_t *euid, gid_t *egid )
{
#ifdef LDAP_PF_LOCAL
return 0;
}
}
+#elif defined(SOCKCREDSIZE)
+ struct msghdr msg;
+ socklen_t crmsgsize;
+ void *crmsg;
+ struct cmsghdr *cmp;
+ struct sockcred *sc;
+
+ memset(&msg, 0, sizeof msg);
+ crmsgsize = CMSG_SPACE(SOCKCREDSIZE(NGROUPS));
+ if (crmsgsize == 0)
+ goto sc_err;
+ crmsg = malloc(crmsgsize);
+ if (crmsg == NULL)
+ goto sc_err;
+ memset(crmsg, 0, crmsgsize);
+
+ msg.msg_control = crmsg;
+ msg.msg_controllen = crmsgsize;
+
+ if (recvmsg(s, &msg, 0) < 0) {
+ free(crmsg);
+ goto sc_err;
+ }
+
+ if (msg.msg_controllen == 0 || (msg.msg_flags & MSG_CTRUNC) != 0) {
+ free(crmsg);
+ goto sc_err;
+ }
+
+ cmp = CMSG_FIRSTHDR(&msg);
+ if (cmp->cmsg_level != SOL_SOCKET || cmp->cmsg_type != SCM_CREDS) {
+ printf("nocreds\n");
+ goto sc_err;
+ }
+
+ sc = (struct sockcred *)(void *)CMSG_DATA(cmp);
+
+ *euid = sc->sc_euid;
+ *egid = sc->sc_egid;
+
+ free(crmsg);
+ return 0;
+ sc_err:
#endif
#endif /* LDAP_PF_LOCAL */
* Memory Compare
*/
int
-(memcmp)(const void *v1, const void *v2, int n)
+(lutil_memcmp)(const void *v1, const void *v2, size_t n)
{
if (n != 0) {
const unsigned char *s1=v1, *s2=v2;
do {
- if (*s1++ != *s2++)
- return (*--s1 - *--s2);
+ if (*s1++ != *s2++) return *--s1 - *--s2;
} while (--n != 0);
}
- return (0);
+ return 0;
}
NT_SRCS = nt_svc.c
NT_OBJS = nt_svc.o ../../libraries/liblutil/slapdmsg.res
-SRCS = main.c globals.c config.c daemon.c \
+SRCS = main.c globals.c bconfig.c config.c daemon.c \
connection.c search.c filter.c add.c cr.c \
attr.c entry.c backend.c result.c operation.c \
dn.c compare.c modify.c delete.c modrdn.c ch_malloc.c \
slappasswd.c slaptest.c slapauth.c slapacl.c component.c \
$(@PLAT@_SRCS)
-OBJS = main.o globals.o config.o daemon.o \
+OBJS = main.o globals.o bconfig.o config.o daemon.o \
connection.o search.o filter.o add.o cr.o \
attr.o entry.o backend.o result.o operation.o \
dn.o compare.o modify.o delete.o modrdn.o ch_malloc.o \
LDAP_STAILQ_FOREACH( o, &op->o_conn->c_ops, o_next ) {
if ( o->o_msgid == id ) {
o->o_abandon = 1;
- goto done;
+ break;
}
}
- LDAP_STAILQ_FOREACH( o, &op->o_conn->c_pending_ops, o_next ) {
- if ( o->o_msgid == id ) {
- LDAP_STAILQ_REMOVE( &op->o_conn->c_pending_ops,
- o, slap_op, o_next );
- LDAP_STAILQ_NEXT(o, o_next) = NULL;
- op->o_conn->c_n_ops_pending--;
- slap_op_free( o );
- goto done;
+ if ( o ) {
+ op->orn_msgid = id;
+
+ op->o_bd = frontendDB;
+ rs->sr_err = frontendDB->be_abandon( op, rs );
+
+ } else {
+ LDAP_STAILQ_FOREACH( o, &op->o_conn->c_pending_ops, o_next ) {
+ if ( o->o_msgid == id ) {
+ LDAP_STAILQ_REMOVE( &op->o_conn->c_pending_ops,
+ o, slap_op, o_next );
+ LDAP_STAILQ_NEXT(o, o_next) = NULL;
+ op->o_conn->c_n_ops_pending--;
+ slap_op_free( o );
+ break;
+ }
}
}
-done:
- op->orn_msgid = id;
-
- op->o_bd = frontendDB;
- rs->sr_err = frontendDB->be_abandon( op, rs );
-
ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
Debug( LDAP_DEBUG_TRACE, "do_abandon: op=%ld %sfound\n",
"=> access_allowed: %s access %s by %s\n",
access2str( access ),
ACL_GRANT(mask, access) ? "granted" : "denied",
- accessmask2str( mask, accessmaskbuf ) );
+ accessmask2str( mask, accessmaskbuf, 1 ) );
ret = ACL_GRANT(mask, access);
"=> acl_mask: to %s by \"%s\", (%s) \n",
val ? "value" : "all values",
op->o_ndn.bv_val ? op->o_ndn.bv_val : "",
- accessmask2str( *mask, accessmaskbuf ) );
+ accessmask2str( *mask, accessmaskbuf, 1) );
if( state && ( state->as_recorded & ACL_STATE_RECORDED_VD )
}
}
Debug(LDAP_DEBUG_ACL, "<= aci_mask grant %s deny %s\n",
- accessmask2str(tgrant,accessmaskbuf),
- accessmask2str(tdeny, accessmaskbuf1), 0);
+ accessmask2str(tgrant,accessmaskbuf, 1),
+ accessmask2str(tdeny, accessmaskbuf1, 1), 0);
}
/* If the entry level aci didn't contain anything valid for the
}
}
Debug(LDAP_DEBUG_ACL, "<= aci_mask grant %s deny %s\n",
- accessmask2str(tgrant,accessmaskbuf),
- accessmask2str(tdeny, accessmaskbuf1), 0);
+ accessmask2str(tgrant,accessmaskbuf, 1),
+ accessmask2str(tdeny, accessmaskbuf1, 1), 0);
}
break;
Debug( LDAP_DEBUG_ACL,
"<= acl_mask: [%d] applying %s (%s)\n",
- i, accessmask2str( modmask, accessmaskbuf ),
+ i, accessmask2str( modmask, accessmaskbuf, 1 ),
b->a_type == ACL_CONTINUE
? "continue"
: b->a_type == ACL_BREAK
Debug( LDAP_DEBUG_ACL,
"<= acl_mask: [%d] mask: %s\n",
- i, accessmask2str(*mask, accessmaskbuf), 0 );
+ i, accessmask2str(*mask, accessmaskbuf, 1), 0 );
if( b->a_type == ACL_CONTINUE ) {
continue;
Debug( LDAP_DEBUG_ACL,
"<= acl_mask: no more <who> clauses, returning %s (stop)\n",
- accessmask2str(*mask, accessmaskbuf), 0, 0 );
+ accessmask2str(*mask, accessmaskbuf, 1), 0, 0 );
return ACL_STOP;
}
}
static int
-dynacl_aci_print( void *priv )
+dynacl_aci_unparse( void *priv, struct berval *bv )
{
AttributeDescription *ad = ( AttributeDescription * )priv;
+ char *ptr;
assert( ad );
- fprintf( stderr, " aci=%s", ad->ad_cname.bv_val );
+ bv->bv_val = ch_malloc( STRLENOF(" aci=") + ad->ad_cname.bv_len + 1 );
+ ptr = lutil_strcopy( bv->bv_val, " aci=" );
+ ptr = lutil_strcopy( ptr, ad->ad_cname.bv_val );
+ bv->bv_len = ptr - bv->bv_val;
return 0;
}
}
Debug( LDAP_DEBUG_ACL, "<= aci_mask grant %s deny %s\n",
- accessmask2str( tgrant, accessmaskbuf ),
- accessmask2str( tdeny, accessmaskbuf1 ), 0 );
+ accessmask2str( tgrant, accessmaskbuf, 1 ),
+ accessmask2str( tdeny, accessmaskbuf1, 1 ), 0 );
}
/* If the entry level aci didn't contain anything valid for the
}
}
Debug( LDAP_DEBUG_ACL, "<= aci_mask grant %s deny %s\n",
- accessmask2str( tgrant, accessmaskbuf ),
- accessmask2str( tdeny, accessmaskbuf1 ), 0 );
+ accessmask2str( tgrant, accessmaskbuf, 1 ),
+ accessmask2str( tdeny, accessmaskbuf1, 1 ), 0 );
}
break;
static slap_dynacl_t dynacl_aci = {
"aci",
dynacl_aci_parse,
- dynacl_aci_print,
+ dynacl_aci_unparse,
dynacl_aci_mask,
NULL,
NULL,
}
char *
-accessmask2str( slap_mask_t mask, char *buf )
+accessmask2str( slap_mask_t mask, char *buf, int debug )
{
int none = 1;
char *ptr = buf;
ptr = lutil_strcopy( ptr, "unknown" );
}
+ if ( !debug ) {
+ *ptr = '\0';
+ return buf;
+ }
*ptr++ = '(';
}
}
if ( none ) {
- *ptr++ = '0';
+ ptr = buf;
}
if ( ACL_IS_LEVEL( mask ) ) {
return( ACL_INVALID_ACCESS );
}
-#ifdef LDAP_DEBUG
+#define ACLBUF_MAXLEN 8192
-static void
-print_access( Access *b )
+static char aclbuf[ACLBUF_MAXLEN];
+
+static char *
+access2text( Access *b, char *ptr )
{
char maskbuf[ACCESSMASK_MAXLEN];
- fprintf( stderr, "\tby" );
+ ptr = lutil_strcopy( ptr, "\tby" );
if ( !BER_BVISEMPTY( &b->a_dn_pat ) ) {
+ *ptr++ = ' ';
if ( ber_bvccmp( &b->a_dn_pat, '*' ) ||
- b->a_dn_style == ACL_STYLE_ANONYMOUS /* strcmp( b->a_dn_pat.bv_val, "anonymous" ) == 0 */ ||
- b->a_dn_style == ACL_STYLE_USERS /* strcmp( b->a_dn_pat.bv_val, "users" ) == 0 */ ||
- b->a_dn_style == ACL_STYLE_SELF /* strcmp( b->a_dn_pat.bv_val, "self" ) == 0 */ )
+ b->a_dn_style == ACL_STYLE_ANONYMOUS ||
+ b->a_dn_style == ACL_STYLE_USERS ||
+ b->a_dn_style == ACL_STYLE_SELF )
{
- fprintf( stderr, " %s", b->a_dn_pat.bv_val );
+ ptr = lutil_strcopy( ptr, b->a_dn_pat.bv_val );
} else {
- fprintf( stderr, " dn.%s=\"%s\"",
- style_strings[b->a_dn_style], b->a_dn_pat.bv_val );
+ ptr = lutil_strcopy( ptr, "dn." );
+ ptr = lutil_strcopy( ptr, style_strings[b->a_dn_style] );
+ *ptr++ = '=';
+ *ptr++ = '"';
+ ptr = lutil_strcopy( ptr, b->a_dn_pat.bv_val );
+ *ptr++ = '"';
}
}
if ( b->a_dn_at != NULL ) {
- fprintf( stderr, " dnattr=%s", b->a_dn_at->ad_cname.bv_val );
+ ptr = lutil_strcopy( ptr, " dnattr=" );
+ ptr = lutil_strcopy( ptr, b->a_dn_at->ad_cname.bv_val );
}
if ( !BER_BVISEMPTY( &b->a_group_pat ) ) {
- fprintf( stderr, " group/%s/%s.%s=\"%s\"",
- b->a_group_oc ? b->a_group_oc->soc_cname.bv_val : "groupOfNames",
- b->a_group_at ? b->a_group_at->ad_cname.bv_val : "member",
- style_strings[b->a_group_style],
- b->a_group_pat.bv_val );
+ ptr = lutil_strcopy( ptr, " group/" );
+ ptr = lutil_strcopy( ptr, b->a_group_oc ?
+ b->a_group_oc->soc_cname.bv_val : "groupOfNames" );
+ *ptr++ = '/';
+ ptr = lutil_strcopy( ptr, b->a_group_at ?
+ b->a_group_at->ad_cname.bv_val : "member" );
+ *ptr++ = '.';
+ ptr = lutil_strcopy( ptr, style_strings[b->a_group_style] );
+ *ptr++ = '=';
+ *ptr++ = '"';
+ ptr = lutil_strcopy( ptr, b->a_group_pat.bv_val );
+ *ptr++ = '"';
}
if ( !BER_BVISEMPTY( &b->a_peername_pat ) ) {
- fprintf( stderr, " peername=\"%s\"", b->a_peername_pat.bv_val );
+ ptr = lutil_strcopy( ptr, " peername=\"" );
+ ptr = lutil_strcopy( ptr, b->a_peername_pat.bv_val );
+ *ptr++ = '"';
}
if ( !BER_BVISEMPTY( &b->a_sockname_pat ) ) {
- fprintf( stderr, " sockname=\"%s\"", b->a_sockname_pat.bv_val );
+ ptr = lutil_strcopy( ptr, " sockname=\"" );
+ ptr = lutil_strcopy( ptr, b->a_sockname_pat.bv_val );
+ *ptr++ = '"';
}
if ( !BER_BVISEMPTY( &b->a_domain_pat ) ) {
- fprintf( stderr, " domain=%s", b->a_domain_pat.bv_val );
+ ptr = lutil_strcopy( ptr, " domain=" );
+ ptr = lutil_strcopy( ptr, b->a_domain_pat.bv_val );
}
if ( !BER_BVISEMPTY( &b->a_sockurl_pat ) ) {
- fprintf( stderr, " sockurl=\"%s\"", b->a_sockurl_pat.bv_val );
+ ptr = lutil_strcopy( ptr, " sockurl=\"" );
+ ptr = lutil_strcopy( ptr, b->a_sockurl_pat.bv_val );
+ *ptr++ = '"';
}
if ( !BER_BVISEMPTY( &b->a_set_pat ) ) {
- fprintf( stderr, " set=\"%s\"", b->a_set_pat.bv_val );
+ ptr = lutil_strcopy( ptr, " set=\"" );
+ ptr = lutil_strcopy( ptr, b->a_set_pat.bv_val );
+ *ptr++ = '"';
}
#ifdef SLAP_DYNACL
slap_dynacl_t *da;
for ( da = b->a_dynacl; da; da = da->da_next ) {
- if ( da->da_print ) {
- (void)( *da->da_print )( da->da_private );
+ if ( da->da_unparse ) {
+ struct berval bv;
+ (void)( *da->da_unparse )( da->da_private, &bv );
+ ptr = lutil_strcopy( ptr, bv.bv_val );
+ ch_free( bv.bv_val );
}
}
}
#else /* ! SLAP_DYNACL */
#ifdef SLAPD_ACI_ENABLED
if ( b->a_aci_at != NULL ) {
- fprintf( stderr, " aci=%s", b->a_aci_at->ad_cname.bv_val );
+ ptr = lutil_strcopy( ptr, " aci=" );
+ ptr = lutil_strcopy( ptr, b->a_aci_at->ad_cname.bv_val );
}
#endif
#endif /* SLAP_DYNACL */
/* Security Strength Factors */
if ( b->a_authz.sai_ssf ) {
- fprintf( stderr, " ssf=%u",
+ ptr += sprintf( ptr, " ssf=%u",
b->a_authz.sai_ssf );
}
if ( b->a_authz.sai_transport_ssf ) {
- fprintf( stderr, " transport_ssf=%u",
+ ptr += sprintf( ptr, " transport_ssf=%u",
b->a_authz.sai_transport_ssf );
}
if ( b->a_authz.sai_tls_ssf ) {
- fprintf( stderr, " tls_ssf=%u",
+ ptr += sprintf( ptr, " tls_ssf=%u",
b->a_authz.sai_tls_ssf );
}
if ( b->a_authz.sai_sasl_ssf ) {
- fprintf( stderr, " sasl_ssf=%u",
+ ptr += sprintf( ptr, " sasl_ssf=%u",
b->a_authz.sai_sasl_ssf );
}
- fprintf( stderr, " %s%s",
- b->a_dn_self ? "self" : "",
- accessmask2str( b->a_access_mask, maskbuf ) );
+ *ptr++ = ' ';
+ if ( b->a_dn_self ) ptr = lutil_strcopy( ptr, "self" );
+ ptr = lutil_strcopy( ptr, accessmask2str( b->a_access_mask, maskbuf, 0 ));
+ if ( !maskbuf[0] ) ptr--;
if( b->a_type == ACL_BREAK ) {
- fprintf( stderr, " break" );
+ ptr = lutil_strcopy( ptr, " break" );
} else if( b->a_type == ACL_CONTINUE ) {
- fprintf( stderr, " continue" );
+ ptr = lutil_strcopy( ptr, " continue" );
} else if( b->a_type != ACL_STOP ) {
- fprintf( stderr, " unknown-control" );
+ ptr = lutil_strcopy( ptr, " unknown-control" );
+ } else {
+ if ( !maskbuf[0] ) ptr = lutil_strcopy( ptr, " stop" );
}
+ *ptr++ = '\n';
- fprintf( stderr, "\n" );
+ return ptr;
}
-
-static void
-print_acl( Backend *be, AccessControl *a )
+void
+acl_unparse( AccessControl *a, struct berval *bv )
{
+ Access *b;
+ char *ptr;
int to = 0;
- Access *b;
+ struct berval abv;
- fprintf( stderr, "%s ACL: access to",
- be == NULL ? "Global" : "Backend" );
+ bv->bv_val = aclbuf;
+ bv->bv_len = 0;
- if ( !BER_BVISEMPTY( &a->acl_dn_pat ) ) {
+ ptr = bv->bv_val;
+
+ ptr = lutil_strcopy( ptr, "to" );
+ if ( !BER_BVISNULL( &a->acl_dn_pat ) ) {
to++;
- fprintf( stderr, " dn.%s=\"%s\"\n",
- style_strings[a->acl_dn_style], a->acl_dn_pat.bv_val );
+ ptr = lutil_strcopy( ptr, " dn." );
+ ptr = lutil_strcopy( ptr, style_strings[a->acl_dn_style] );
+ *ptr++ = '=';
+ *ptr++ = '"';
+ ptr = lutil_strcopy( ptr, a->acl_dn_pat.bv_val );
+ ptr = lutil_strcopy( ptr, "\"\n" );
}
if ( a->acl_filter != NULL ) {
to++;
filter2bv( a->acl_filter, &bv );
- fprintf( stderr, " filter=%s\n", bv.bv_val );
+ ptr = lutil_strcopy( ptr, " filter=\"" );
+ ptr = lutil_strcopy( ptr, bv.bv_val );
+ *ptr++ = '"';
+ *ptr++ = '\n';
ch_free( bv.bv_val );
}
AttributeName *an;
to++;
- fprintf( stderr, " attrs=" );
+ ptr = lutil_strcopy( ptr, " attrs=" );
for ( an = a->acl_attrs; an && !BER_BVISNULL( &an->an_name ); an++ ) {
- if ( ! first ) fprintf( stderr, "," );
+ if ( ! first ) *ptr++ = ',';
if (an->an_oc) {
- fputc( an->an_oc_exclude ? '!' : '@', stderr);
- fputs( an->an_oc->soc_cname.bv_val, stderr );
+ *ptr++ = an->an_oc_exclude ? '!' : '@';
+ ptr = lutil_strcopy( ptr, an->an_oc->soc_cname.bv_val );
} else {
- fputs( an->an_name.bv_val, stderr );
+ ptr = lutil_strcopy( ptr, an->an_name.bv_val );
}
first = 0;
}
- fprintf( stderr, "\n" );
+ *ptr++ = '\n';
}
if ( !BER_BVISEMPTY( &a->acl_attrval ) ) {
to++;
- fprintf( stderr, " val.%s=\"%s\"\n",
- style_strings[a->acl_attrval_style], a->acl_attrval.bv_val );
-
+ ptr = lutil_strcopy( ptr, " val." );
+ ptr = lutil_strcopy( ptr, style_strings[a->acl_attrval_style] );
+ *ptr++ = '=';
+ *ptr++ = '"';
+ ptr = lutil_strcopy( ptr, a->acl_attrval.bv_val );
+ *ptr++ = '"';
+ *ptr++ = '\n';
}
- if( !to ) fprintf( stderr, " *\n" );
+ if( !to ) {
+ ptr = lutil_strcopy( ptr, " *\n" );
+ }
for ( b = a->acl_access; b != NULL; b = b->a_next ) {
- print_access( b );
+ ptr = access2text( b, ptr );
}
+ *ptr = '\0';
+ bv->bv_len = ptr - bv->bv_val;
+}
+
+#ifdef LDAP_DEBUG
+
+static void
+print_acl( Backend *be, AccessControl *a )
+{
+ int to = 0;
+ Access *b;
+ struct berval bv;
- fprintf( stderr, "\n" );
+ acl_unparse( a, &bv );
+ fprintf( stderr, "%s ACL: access %s\n",
+ be == NULL ? "Global" : "Backend", bv.bv_val );
}
#endif /* LDAP_DEBUG */
#include "slap.h"
+#ifdef LDAP_COMP_MATCH
+#include "component.h"
+#endif
void
ava_free(
ber_tag_t rtag;
struct berval type, value;
AttributeAssertion *aa;
+#ifdef LDAP_COMP_MATCH
+ AttributeAliasing* a_alias = NULL;
+#endif
rtag = ber_scanf( ber, "{mm}", &type, &value );
aa = op->o_tmpalloc( sizeof( AttributeAssertion ), op->o_tmpmemctx );
aa->aa_desc = NULL;
aa->aa_value.bv_val = NULL;
+#ifdef LDAP_COMP_MATCH
+ aa->aa_cf = NULL;
+#endif
rc = slap_bv2ad( &type, &aa->aa_desc, text );
return rc;
}
+#ifdef LDAP_COMP_MATCH
+ if( is_aliased_attribute ) {
+ a_alias = is_aliased_attribute ( aa->aa_desc );
+ if ( a_alias ) {
+ rc = get_aliased_filter_aa ( op, aa, a_alias, text );
+ if( rc != LDAP_SUCCESS ) {
+ Debug( LDAP_DEBUG_FILTER,
+ "get_ava:Invalid Attribute Aliasing\n", 0, 0, 0 );
+ return rc;
+ }
+ }
+ }
+#endif
*ava = aa;
return LDAP_SUCCESS;
}
int num_retries = 0;
- Operation* ps_list;
- int rc;
- EntryInfo *suffix_ei = NULL;
- Entry *ctxcsn_e;
- int ctxcsn_added = 0;
-
LDAPControl **postread_ctrl = NULL;
LDAPControl *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
int num_ctrls = 0;
bdb_cache_add( bdb, ei, e, &nrdn, locker );
- if ( suffix_ei == NULL ) {
- suffix_ei = BEI(e);
- }
-
if(( rs->sr_err=TXN_COMMIT( ltid, 0 )) != 0 ) {
rs->sr_text = "txn_commit failed";
} else {
#include "slap.h"
#include "back-bdb.h"
+#include "lutil.h"
/* for the cache of attribute information (which are indexed, etc.) */
typedef struct bdb_attrinfo {
*indexmask = a->ai_indexmask;
*cr = a->ai_cr;
} else {
- *indexmask = NULL;
+ *indexmask = 0;
*cr = NULL;
}
}
return LDAP_SUCCESS;
}
+static int
+bdb_attr_index_unparser( void *v1, void *v2 )
+{
+ AttrInfo *ai = v1;
+ BerVarray *bva = v2;
+ struct berval bv;
+ char *ptr;
+
+ slap_index2bvlen( ai->ai_indexmask, &bv );
+ if ( bv.bv_len ) {
+ bv.bv_len += ai->ai_desc->ad_cname.bv_len + 1;
+ ptr = ch_malloc( bv.bv_len+1 );
+ bv.bv_val = lutil_strcopy( ptr, ai->ai_desc->ad_cname.bv_val );
+ *bv.bv_val++ = ' ';
+ slap_index2bv( ai->ai_indexmask, &bv );
+ bv.bv_val = ptr;
+ ber_bvarray_add( bva, &bv );
+ }
+}
+
+static AttributeDescription addef = { NULL, NULL, BER_BVC("default") };
+static AttrInfo aidef = { &addef };
+
+void
+bdb_attr_index_unparse( struct bdb_info *bdb, BerVarray *bva )
+{
+ if ( bdb->bi_defaultmask ) {
+ aidef.ai_indexmask = bdb->bi_defaultmask;
+ bdb_attr_index_unparser( &aidef, bva );
+ }
+ avl_apply( bdb->bi_attrs, bdb_attr_index_unparser, bva, -1, AVL_INORDER );
+}
+
void
bdb_attr_index_destroy( Avlnode *tree )
{
{
struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
EntryInfo ei, eip, *ei2 = NULL, *ein = NULL, *eir = NULL;
- char ndn[SLAP_LDAPDN_MAXLEN];
- ID parent;
int rc;
int addlru = 1;
static int
bdb_txn_get( Operation *op, DB_ENV *env, DB_TXN **txn, int reset )
{
- int i, rc, lockid;
+ int i, rc;
void *ctx, *data = NULL;
/* If no op was provided, try to find the ctx anyway... */
#include "back-bdb.h"
+#include "config.h"
+
#ifdef DB_DIRTY_READ
# define SLAP_BDB_ALLOW_DIRTY_READ
#endif
-int
-bdb_db_config(
- BackendDB *be,
- const char *fname,
- int lineno,
- int argc,
- char **argv )
-{
- struct bdb_info *bdb = (struct bdb_info *) be->be_private;
+static ObjectClass *bdb_oc;
- if ( bdb == NULL ) {
- fprintf( stderr, "%s: line %d: "
- "bdb database info is null!\n",
- fname, lineno );
- return 1;
- }
+static ConfigDriver bdb_cf_oc, bdb_cf_gen;
- /* directory is the DB_HOME */
- 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;
- }
- if ( bdb->bi_dbenv_home ) {
- free( bdb->bi_dbenv_home );
- }
- bdb->bi_dbenv_home = ch_strdup( argv[1] );
+enum {
+ BDB_CHKPT = 1,
+ BDB_NOSYNC,
+ BDB_DIRTYR,
+ BDB_INDEX,
+ BDB_LOCKD,
+ BDB_SSTACK
+};
+static ConfigTable bdbcfg[] = {
+ { "", "", 0, 0, 0, ARG_MAGIC,
+ bdb_cf_oc, NULL, NULL, NULL },
+ { "directory", "dir", 2, 2, 0, ARG_STRING|ARG_OFFSET,
+ (void *)offsetof(struct bdb_info, bi_dbenv_home),
+ "( OLcfgAt:1.1 NAME 'dbDirectory' "
+ "DESC 'Directory for database content' "
+ "EQUALITY caseIgnoreMatch "
+ "SYNTAX OMsDirectoryString )", NULL, NULL },
+ { "cachesize", "size", 2, 2, 0, ARG_INT|ARG_OFFSET,
+ (void *)offsetof(struct bdb_info, bi_cache.c_maxsize),
+ "( OLcfgAt:1.2 NAME 'dbCacheSize' "
+ "DESC 'Entry cache size in entries' "
+ "SYNTAX OMsInteger )", NULL, NULL },
+ { "checkpoint", "kbyte> <min", 3, 3, 0, ARG_MAGIC|BDB_CHKPT,
+ bdb_cf_gen, "( OLcfgAt:1.3 NAME 'dbCheckpoint' "
+ "DESC 'Database checkpoint interval in kbytes and minutes' "
+ "SYNTAX OMsDirectoryString )",NULL, NULL },
+ { "dbnosync", NULL, 1, 2, 0, ARG_ON_OFF|ARG_MAGIC|BDB_NOSYNC,
+ bdb_cf_gen, "( OLcfgAt:1.4 NAME 'dbNoSync' "
+ "DESC 'Disable synchronous database writes' "
+ "SYNTAX OMsBoolean )", NULL, NULL },
+ { "dirtyread", NULL, 1, 2, 0,
#ifdef SLAP_BDB_ALLOW_DIRTY_READ
- } else if ( strcasecmp( argv[0], "dirtyread" ) == 0 ) {
- bdb->bi_db_opflags |= DB_DIRTY_READ;
+ ARG_ON_OFF|ARG_MAGIC|BDB_DIRTYR, bdb_cf_gen,
+#else
+ ARG_IGNORED, NULL,
#endif
- /* transaction logging configuration */
- } else if ( strcasecmp( argv[0], "dbnosync" ) == 0 ) {
- bdb->bi_dbenv_xflags |= DB_TXN_NOSYNC;
-
- /* slapindex algorithm tuning */
- } else if ( strcasecmp( argv[0], "linearindex" ) == 0 ) {
- bdb->bi_linear_index = 1;
-
- /* transaction checkpoint configuration */
- } else if ( strcasecmp( argv[0], "checkpoint" ) == 0 ) {
- if ( argc < 3 ) {
- fprintf( stderr, "%s: line %d: "
- "missing parameters in \"checkpoint <kbyte> <min>\" line\n",
- fname, lineno );
- return 1;
- }
- bdb->bi_txn_cp = 1;
- bdb->bi_txn_cp_kbyte = strtol( argv[1], NULL, 0 );
- bdb->bi_txn_cp_min = strtol( argv[2], NULL, 0 );
-
- /* lock detect configuration */
- } else if ( strcasecmp( argv[0], "lockdetect" ) == 0 ) {
- if ( argc < 2 ) {
- fprintf( stderr, "%s: line %d: "
- "missing parameters in \"lockDetect <policy>\" line\n",
- fname, lineno );
- return 1;
- }
+ "( OLcfgAt:1.5 NAME 'dbDirtyRead' "
+ "DESC 'Allow reads of uncommitted data' "
+ "SYNTAX OMsBoolean )", NULL, NULL },
+ { "idlcachesize", "size", 2, 2, 0, ARG_INT|ARG_OFFSET,
+ (void *)offsetof(struct bdb_info,bi_idl_cache_max_size),
+ "( OLcfgAt:1.6 NAME 'dbIDLcacheSize' "
+ "DESC 'IDL cache size in IDLs' "
+ "SYNTAX OMsInteger )", NULL, NULL },
+ { "index", "attr> <[pres,eq,approx,sub]", 3, 3, 0, ARG_MAGIC|BDB_INDEX,
+ bdb_cf_gen, "( OLcfgAt:1.7 NAME 'dbIndex' "
+ "DESC 'Attribute index parameters' "
+ "SYNTAX OMsDirectoryString )", NULL, NULL },
+ { "linearindex", NULL, 1, 2, 0, ARG_ON_OFF|ARG_OFFSET,
+ (void *)offsetof(struct bdb_info, bi_linear_index),
+ "( OLcfgAt:1.8 NAME 'dbLinearIndex' "
+ "DESC 'Index attributes one at a time' "
+ "SYNTAX OMsBoolean )", NULL, NULL },
+ { "lockdetect", "policy", 2, 2, 0, ARG_MAGIC|BDB_LOCKD,
+ bdb_cf_gen, "( OLcfgAt:1.9 NAME 'dbLockDetect' "
+ "DESC 'Deadlock detection algorithm' "
+ "SYNTAX OMsDirectoryString )", NULL, NULL },
+ { "mode", "mode", 2, 2, 0, ARG_LONG|ARG_OFFSET,
+ (void *)offsetof(struct bdb_info, bi_dbenv_mode),
+ "( OLcfgAt:1.10 NAME 'dbMode' "
+ "DESC 'Unix permissions of database files' "
+ "SYNTAX OMsInteger )", NULL, NULL },
+ { "searchstack", "depth", 2, 2, 0, ARG_INT|ARG_MAGIC|BDB_SSTACK,
+ bdb_cf_gen, "( OLcfgAt:1.11 NAME 'dbSearchStack' "
+ "DESC 'Depth of search stack in IDLs' "
+ "SYNTAX OMsInteger )", NULL, NULL },
+ { "shm_key", "key", 2, 2, 0, ARG_INT|ARG_NONZERO|ARG_OFFSET,
+ (void *)offsetof(struct bdb_info, bi_shm_key),
+ "( OLcfgAt:1.12 NAME 'dbShmKey' "
+ "DESC 'Key for shared memory region' "
+ "SYNTAX OMsInteger )", NULL, NULL },
+ { NULL, NULL, 0, 0, 0, ARG_IGNORED,
+ NULL, NULL, NULL, NULL }
+};
- if( strcasecmp( argv[1], "default" ) == 0 ) {
- bdb->bi_lock_detect = DB_LOCK_DEFAULT;
+static ConfigOCs bdbocs[] = {
+ { "( OLcfgOc:1.1 "
+ "NAME 'bdbConfig' "
+ "DESC 'BDB backend configuration' "
+ "AUXILIARY "
+ "MAY ( dbDirectory $ dbCacheSize $ dbCheckpoint $ dbNoSync $ "
+ "dbDirtyRead $ dbIDLcacheSize $ dbIndex $ dbLinearIndex $ "
+ "dbLockDetect $ dbMode $ dbSearchStack $ dbShmKey ) )",
+ &bdb_oc },
+ { NULL, NULL }
+};
- } else if( strcasecmp( argv[1], "oldest" ) == 0 ) {
- bdb->bi_lock_detect = DB_LOCK_OLDEST;
+static int
+bdb_cf_oc(ConfigArgs *c)
+{
+ if ( c->emit ) {
+ value_add_one( &c->rvalue_vals, &bdb_oc->soc_cname );
+ return 0;
+ }
+ return 1;
+}
- } else if( strcasecmp( argv[1], "random" ) == 0 ) {
- bdb->bi_lock_detect = DB_LOCK_RANDOM;
+static slap_verbmasks bdb_lockd[] = {
+ { BER_BVC("default"), DB_LOCK_DEFAULT },
+ { BER_BVC("oldest"), DB_LOCK_OLDEST },
+ { BER_BVC("random"), DB_LOCK_RANDOM },
+ { BER_BVC("youngest"), DB_LOCK_YOUNGEST },
+ { BER_BVC("fewest"), DB_LOCK_MINLOCKS },
+ { BER_BVNULL, 0 }
+};
- } else if( strcasecmp( argv[1], "youngest" ) == 0 ) {
- bdb->bi_lock_detect = DB_LOCK_YOUNGEST;
+static int
+bdb_cf_gen(ConfigArgs *c)
+{
+ struct bdb_info *bdb = c->be->be_private;
+ int rc;
- } else if( strcasecmp( argv[1], "fewest" ) == 0 ) {
- bdb->bi_lock_detect = DB_LOCK_MINLOCKS;
+ if ( c->emit ) {
+ rc = 0;
+ switch( c->type ) {
+ case BDB_CHKPT:
+ if (bdb->bi_txn_cp ) {
+ char buf[64];
+ struct berval bv;
+ bv.bv_len = sprintf( buf, "%d %d", bdb->bi_txn_cp_kbyte,
+ bdb->bi_txn_cp_min );
+ bv.bv_val = buf;
+ value_add_one( &c->rvalue_vals, &bv );
+ } else{
+ rc = 1;
+ }
+ break;
- } else {
- fprintf( stderr, "%s: line %d: "
- "bad policy (%s) in \"lockDetect <policy>\" line\n",
- fname, lineno, argv[1] );
- return 1;
- }
+ case BDB_NOSYNC:
+ if ( bdb->bi_dbenv_xflags & DB_TXN_NOSYNC )
+ c->value_int = 1;
+ break;
+
+ case BDB_INDEX:
+ bdb_attr_index_unparse( bdb, &c->rvalue_vals );
+ if ( !c->rvalue_vals ) rc = 1;
+ break;
- /* 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;
- }
- bdb->bi_dbenv_mode = strtol( argv[1], NULL, 0 );
-
- /* attribute to index */
- } else if ( strcasecmp( argv[0], "index" ) == 0 ) {
- int rc;
- 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 );
+ case BDB_LOCKD:
+ rc = 1;
+ if ( bdb->bi_lock_detect != DB_LOCK_DEFAULT ) {
+ int i;
+ for (i=0; !BER_BVISNULL(&bdb_lockd[i].word); i++) {
+ if ( bdb->bi_lock_detect == bdb_lockd[i].mask ) {
+ value_add_one( &c->rvalue_vals, &bdb_lockd[i].word );
+ rc = 0;
+ break;
+ }
+ }
+ }
+ break;
+
+ case BDB_SSTACK:
+ c->value_int = bdb->bi_search_stack_depth;
+ break;
}
- rc = bdb_attr_index_config( bdb, fname, lineno, argc - 1, &argv[1] );
+ return rc;
+ }
+ switch( c->type ) {
+ case BDB_CHKPT:
+ bdb->bi_txn_cp = 1;
+ bdb->bi_txn_cp_kbyte = strtol( c->argv[1], NULL, 0 );
+ bdb->bi_txn_cp_min = strtol( c->argv[2], NULL, 0 );
+ break;
+
+ case BDB_NOSYNC:
+ if ( c->value_int )
+ bdb->bi_dbenv_xflags |= DB_TXN_NOSYNC;
+ else
+ bdb->bi_dbenv_xflags &= ~DB_TXN_NOSYNC;
+ break;
+
+ case BDB_INDEX:
+ rc = bdb_attr_index_config( bdb, c->fname, c->lineno,
+ c->argc - 1, &c->argv[1] );
if( rc != LDAP_SUCCESS ) return 1;
+ break;
- /* unique key for shared memory regions */
- } else if ( strcasecmp( argv[0], "shm_key" ) == 0 ) {
- if ( argc < 2 ) {
- fprintf( stderr,
- "%s: line %d: missing key in \"shm_key <key>\" line\n",
- fname, lineno );
- return( 1 );
+ case BDB_LOCKD:
+ rc = verb_to_mask( c->argv[1], bdb_lockd );
+ if ( BER_BVISNULL(&bdb_lockd[rc].word) ) {
+ fprintf( stderr, "%s: "
+ "bad policy (%s) in \"lockDetect <policy>\" line\n",
+ c->log, c->argv[1] );
+ return 1;
}
- bdb->bi_shm_key = atoi( argv[1] );
+ bdb->bi_lock_detect = rc;
+ break;
- /* size of the cache in entries */
- } else if ( strcasecmp( argv[0], "cachesize" ) == 0 ) {
- if ( argc < 2 ) {
+ case BDB_SSTACK:
+ if ( c->value_int < MINIMUM_SEARCH_STACK_DEPTH ) {
fprintf( stderr,
- "%s: line %d: missing size in \"cachesize <size>\" line\n",
- fname, lineno );
- return( 1 );
+ "%s: depth %d too small, using %d\n",
+ c->log, c->value_int, MINIMUM_SEARCH_STACK_DEPTH );
+ c->value_int = MINIMUM_SEARCH_STACK_DEPTH;
}
- bdb->bi_cache.c_maxsize = atoi( argv[1] );
+ bdb->bi_search_stack_depth = c->value_int;
+ break;
+ }
+ return 0;
+}
- /* depth of search stack cache in units of (IDL)s */
- } else if ( strcasecmp( argv[0], "searchstack" ) == 0 ) {
- if ( argc < 2 ) {
- fprintf( stderr,
- "%s: line %d: missing depth in \"searchstack <depth>\" line\n",
- fname, lineno );
- return( 1 );
- }
- bdb->bi_search_stack_depth = atoi( argv[1] );
- if ( bdb->bi_search_stack_depth < MINIMUM_SEARCH_STACK_DEPTH ) {
- fprintf( stderr,
- "%s: line %d: depth %d too small, using %d\n",
- fname, lineno, bdb->bi_search_stack_depth,
- MINIMUM_SEARCH_STACK_DEPTH );
- bdb->bi_search_stack_depth = MINIMUM_SEARCH_STACK_DEPTH;
- }
+int bdb_back_init_cf( BackendInfo *bi )
+{
+ int rc;
+ bi->bi_cf_table = bdbcfg;
- /* size of the IDL cache in entries */
- } else if ( strcasecmp( argv[0], "idlcachesize" ) == 0 ) {
- if ( argc < 2 ) {
- fprintf( stderr,
- "%s: line %d: missing size in \"idlcachesize <size>\" line\n",
- fname, lineno );
- return( 1 );
- }
- if ( !( slapMode & SLAP_TOOL_MODE ) )
- bdb->bi_idl_cache_max_size = atoi( argv[1] );
+ rc = init_config_attrs( bdbcfg );
+ if ( rc ) return rc;
+ bdbcfg[0].ad = slap_schema.si_ad_objectClass;
+ rc = init_config_ocs( bdbocs );
+ return rc;
+}
- /* anything else */
- } else {
- return SLAP_CONF_UNKNOWN;
- }
+int bdb_db_config( Backend *be, const char *fname, int lineno, int argc,
+ char **argv )
+{
+ ConfigArgs c = { 0 };
+ int rc;
- return 0;
+ c.be = be;
+ c.fname = fname;
+ c.lineno = lineno;
+ c.argc = argc;
+ c.argv = argv;
+ sprintf( c.log, "%s: line %lu", fname, lineno );
+
+ rc = parse_config_table( bdbcfg, &c );
+ if ( rc == ARG_UNKNOWN )
+ rc = SLAP_CONF_UNKNOWN;
+ return rc;
}
int num_retries = 0;
- Operation* ps_list;
int rc;
- EntryInfo *suffix_ei;
- Entry *ctxcsn_e;
- int ctxcsn_added = 0;
LDAPControl **preread_ctrl = NULL;
LDAPControl *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
struct dn2id_cookie *cx
)
{
+ BDB_IDL_ZERO( cx->tmp );
+
+ if ( !cx->ei ) {
+ cx->ei = bdb_cache_find_info( cx->bdb, cx->id );
+ if ( !cx->ei ) {
+ cx->rc = DB_NOTFOUND;
+ goto saveit;
+ }
+ }
+
if ( cx->bdb->bi_idl_cache_size ) {
cx->key.data = &cx->id;
cx->rc = bdb_idl_cache_get(cx->bdb, cx->db, &cx->key, cx->tmp);
goto gotit;
}
}
- BDB_IDL_ZERO( cx->tmp );
-
- if ( !cx->ei ) {
- cx->ei = bdb_cache_find_info( cx->bdb, cx->id );
- if ( !cx->ei ) {
- cx->rc = DB_NOTFOUND;
- goto saveit;
- }
- }
bdb_cache_entryinfo_lock( cx->ei );
#include "back-bdb.h"
#include "idl.h"
+#ifdef LDAP_COMP_MATCH
+#include <component.h>
+#endif
static int presence_candidates(
Operation *op,
ID *ids,
ID *tmp,
ID *stack);
+
+static int
+ava_comp_candidates (
+ Operation *op,
+ AttributeAssertion *ava,
+ AttributeAliasing *aa,
+ ID *ids,
+ ID *tmp,
+ ID *stack);
#endif
int
ID *stack )
{
int rc = 0;
+#ifdef LDAP_COMP_MATCH
+ AttributeAliasing *aa;
+#endif
Debug( LDAP_DEBUG_FILTER, "=> bdb_filter_candidates\n", 0, 0, 0 );
switch ( f->f_choice ) {
case LDAP_FILTER_EQUALITY:
Debug( LDAP_DEBUG_FILTER, "\tEQUALITY\n", 0, 0, 0 );
- rc = equality_candidates( op, f->f_ava, ids, tmp );
+#ifdef LDAP_COMP_MATCH
+ if ( is_aliased_attribute && ( aa = is_aliased_attribute ( f->f_ava->aa_desc ) ) ) {
+ rc = ava_comp_candidates ( op, f->f_ava, aa, ids, tmp, stack );
+ }
+ else
+#endif
+ {
+ rc = equality_candidates( op, f->f_ava, ids, tmp );
+ }
break;
case LDAP_FILTER_APPROX:
ID *tmp,
ID *save )
{
- struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
int rc = 0;
ComponentFilter *f;
return( rc );
}
+static int
+ava_comp_candidates (
+ Operation *op,
+ AttributeAssertion *ava,
+ AttributeAliasing *aa,
+ ID *ids,
+ ID *tmp,
+ ID *stack )
+{
+ MatchingRuleAssertion mra;
+
+ mra.ma_rule = ava->aa_desc->ad_type->sat_equality;
+ if ( !mra.ma_rule ) {
+ struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
+ BDB_IDL_ALL( bdb, ids );
+ return 0;
+ }
+ mra.ma_desc = aa->aa_aliased_ad;
+ mra.ma_rule = ava->aa_desc->ad_type->sat_equality;
+
+ return comp_candidates ( op, &mra, ava->aa_cf, ids, tmp, stack );
+}
+
static int
comp_candidates (
Operation *op,
ID *tmp,
ID *save )
{
- struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
int rc = 0;
Filter *f;
DB *db = bdb->bi_id2entry->bdi_db;
DBT key, data;
struct berval bv;
- int rc = 0, ret = 0;
+ int rc = 0;
ID nid;
*e = NULL;
DBT *key,
char *buf )
{
- if ( key->size == sizeof( ID ) ) {
+ if ( key->size == 4 /* LUTIL_HASH_BYTES */ ) {
unsigned char *c = key->data;
sprintf( buf, "[%02x%02x%02x%02x]", c[0], c[1], c[2], c[3] );
return buf;
int rc;
DBT data;
DBC *cursor;
- ID lo, hi, tmp, nlo, nhi, nid;
+ ID lo, hi, nlo, nhi, nid;
char *err;
{
slap_mask_t mask )
{
int rc, i;
- const char *text;
DB *db;
struct berval *keys;
{
int rc;
slap_mask_t mask = 0;
-#ifdef LDAP_COMP_MATCH
- ComponentReference* cr_list, *cr;
- AttributeDescription *comp_ad;
-#endif
if( type->sat_sup ) {
/* recurse */
if( type->sat_ad ) {
#ifdef LDAP_COMP_MATCH
/* component indexing */
+ ComponentReference* cr_list, *cr;
+
bdb_attr_mask_cr( op->o_bd->be_private, type->sat_ad, &mask, &cr_list );
if ( cr_list ) {
for( cr = cr_list ; cr ; cr = cr->cr_next ) {
{ NULL, NULL, 0, 0 }
};
-struct berval bdb_uuid = BER_BVNULL;
-
typedef void * db_malloc(size_t);
typedef void * db_realloc(void *, size_t);
ldap_pvt_thread_rdwr_init ( &bdb->bi_cache.c_rwlock );
be->be_private = bdb;
+ be->be_cf_table = be->bd_info->bi_cf_table;
return 0;
}
{
int rc;
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
- Operation *ps = NULL;
- Operation *psn = NULL;
- void *saved_tmpmemctx = NULL;
/* close db environment */
if( bdb->bi_dbenv ) {
bdb_back_initialize(
BackendInfo *bi )
{
+ int rc;
+
static char *controls[] = {
LDAP_CONTROL_ASSERT,
LDAP_CONTROL_MANAGEDSAIT,
" got %s\n", version, 0, 0 );
}
- Debug( LDAP_DEBUG_ANY, LDAP_XSTRING(bdb_back_initialize)
+ Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_back_initialize)
": %s\n", version, 0, 0 );
}
db_env_set_func_yield( ldap_pvt_thread_yield );
#endif
- {
- static char uuidbuf[ LDAP_LUTIL_UUIDSTR_BUFSIZE ];
-
- bdb_uuid.bv_len = lutil_uuidstr( uuidbuf, sizeof( uuidbuf ));
- bdb_uuid.bv_val = uuidbuf;
- }
-
bi->bi_open = 0;
bi->bi_close = 0;
bi->bi_config = 0;
bi->bi_connection_init = 0;
bi->bi_connection_destroy = 0;
- return 0;
+ rc = bdb_back_init_cf(bi);
+
+ return rc;
}
#if (SLAPD_BDB == SLAPD_MOD_DYNAMIC && !defined(BDB_HIER)) || \
LDAPControl *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
int num_ctrls = 0;
- Operation* ps_list;
- struct psid_entry *pm_list, *pm_prev;
int rc;
- EntryInfo *suffix_ei;
- Entry *ctxcsn_e;
- int ctxcsn_added = 0;
Debug( LDAP_DEBUG_ARGS, LDAP_XSTRING(bdb_modify) ": %s\n",
op->o_req_dn.bv_val, 0, 0 );
struct bdb_op_info opinfo = {0};
Entry dummy = {0};
- ID id;
-
Entry *np = NULL; /* newSuperior Entry */
struct berval *np_dn = NULL; /* newSuperior dn */
struct berval *np_ndn = NULL; /* newSuperior ndn */
LDAPControl *ctrls[SLAP_MAX_RESPONSE_CONTROLS];
int num_ctrls = 0;
- Operation *ps_list;
- struct psid_entry *pm_list, *pm_prev;
int rc;
- EntryInfo *suffix_ei;
- Entry *ctxcsn_e;
- int ctxcsn_added = 0;
int parent_is_glue = 0;
int parent_is_leaf = 0;
int bdb_last_id( BackendDB *be, DB_TXN *tid )
{
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
- int i, rc;
+ int rc;
ID id = 0;
unsigned char idbuf[sizeof(ID)];
DBT key, data;
#define bdb_attr_mask BDB_SYMBOL(attr_mask)
#define bdb_attr_index_config BDB_SYMBOL(attr_index_config)
#define bdb_attr_index_destroy BDB_SYMBOL(attr_index_destroy)
+#define bdb_attr_index_unparse BDB_SYMBOL(attr_index_unparse)
#ifdef LDAP_COMP_MATCH
#define bdb_attr_comp_ref BDB_SYMBOL(attr_comp_ref)
const char *fname, int lineno,
int argc, char **argv ));
+void bdb_attr_index_unparse LDAP_P(( struct bdb_info *bdb, BerVarray *bva ));
void bdb_attr_index_destroy LDAP_P(( Avlnode *tree ));
+/*
+ * config.c
+ */
+
+#define bdb_back_init_cf BDB_SYMBOL(back_init_cf)
+
+int bdb_back_init_cf( BackendInfo *bi );
+
/*
* dbcache.c
*/
#define bdb_index_entry_del(op,t,e) \
bdb_index_entry((op),(t),SLAP_INDEX_DELETE_OP,(e))
-/*
- * init.c
- */
-#define bdb_uuid BDB_SYMBOL(uuid)
-
-extern struct berval bdb_uuid;
-
/*
* key.c
*/
ID *lastid,
int tentries );
-static int bdb_pfid_cmp( const void *v_id1, const void *v_id2 );
-static ID* bdb_id_dup( Operation *op, ID *id );
-
/* Dereference aliases for a single alias entry. Return the final
* dereferenced entry on success, NULL on any failure.
*/
Entry *matched, *a;
EntryInfo *ei;
struct berval bv_alias = BER_BVC( "alias" );
- AttributeAssertion aa_alias;
+ AttributeAssertion aa_alias = { NULL, BER_BVNULL, NULL };
Filter af;
DB_LOCK locka, lockr;
int first = 1;
goto loop_begin;
}
-loop_start:
-
for ( id = bdb_idl_first( candidates, &cursor );
id != NOID ; id = bdb_idl_next( candidates, &cursor ) )
{
int scopeok = 0;
- ID* idhole = NULL;
loop_begin:
/* check for abandon */
if ( op->o_abandon ) {
- rs->sr_err = LDAP_SUCCESS;
+ rs->sr_err = SLAPD_ABANDON;
goto done;
}
int rc, depth = 1;
Filter f, rf, xf, nf;
ID *stack;
- AttributeAssertion aa_ref;
+ AttributeAssertion aa_ref = { NULL, BER_BVNULL, NULL };
#ifdef BDB_SUBENTRIES
Filter sf;
- AttributeAssertion aa_subentry;
+ AttributeAssertion aa_subentry = { NULL, BER_BVNULL, NULL };
#endif
/*
(void) ber_free_buf( ber );
}
-static int
-bdb_pfid_cmp( const void *v_id1, const void *v_id2 )
-{
- const ID *p1 = v_id1, *p2 = v_id2;
- return *p1 - *p2;
-}
-
-static ID*
-bdb_id_dup( Operation *op, ID *id )
-{
- ID *new;
- new = ch_malloc( sizeof(ID) );
- *new = *id;
- return new;
-}
struct berval *text,
int hole )
{
- struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
struct berval dn = e->e_name;
struct berval ndn = e->e_nname;
struct berval pdn, npdn;
int nBackendDB = 0;
BackendDB *backendDB = NULL;
-ldap_pvt_thread_pool_t syncrepl_pool;
-int syncrepl_pool_max = SLAP_MAX_SYNCREPL_THREADS;
-
static int
backend_init_controls( BackendInfo *bi )
{
{
int rc = -1;
- ldap_pvt_thread_pool_init( &syncrepl_pool, syncrepl_pool_max, 0 );
-
if((nBackendInfo != 0) || (backendInfo != NULL)) {
/* already initialized */
Debug( LDAP_DEBUG_ANY,
BackendDB *bd;
struct slap_csn_entry *csne;
- ldap_pvt_thread_pool_destroy( &syncrepl_pool, 1 );
-
/* destroy each backend database */
for( i = 0, bd = backendDB; i < nBackendDB; i++, bd++ ) {
if ( rc == SLAP_CB_CONTINUE ) {
rc = op_rc[ which ];
}
+
+ /* The underlying backend didn't handle the request, make sure
+ * overlay cleanup is processed.
+ */
+ if ( rc == LDAP_UNWILLING_TO_PERFORM ) {
+ slap_callback *sc_next;
+ for ( ; op->o_callback && op->o_callback != cb.sc_next;
+ op->o_callback = sc_next ) {
+ sc_next = op->o_callback->sc_next;
+ if ( op->o_callback->sc_cleanup ) {
+ op->o_callback->sc_cleanup( op, rs );
+ }
+ }
+ }
op->o_bd = be;
op->o_callback = cb.sc_next;
return rc;
--- /dev/null
+/* bconfig.c - the config backend */
+/* $OpenLDAP$ */
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 2005 The OpenLDAP Foundation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
+ */
+/* ACKNOWLEDGEMENTS:
+ * This work was originally developed by Howard Chu for inclusion
+ * in OpenLDAP Software.
+ */
+
+#include "portable.h"
+
+#include <stdio.h>
+#include <ac/string.h>
+#include <ac/ctype.h>
+#include <ac/errno.h>
+
+#include "slap.h"
+
+#ifdef LDAP_SLAPI
+#include "slapi/slapi.h"
+#endif
+
+#include <lutil.h>
+
+#include "config.h"
+
+static struct berval config_rdn = BER_BVC("cn=config");
+static struct berval access_rdn = BER_BVC("cn=access");
+
+#ifdef SLAPD_MODULES
+typedef struct modpath_s {
+ struct modpath_s *mp_next;
+ struct berval mp_path;
+ BerVarray mp_loads;
+} ModPaths;
+#endif
+
+typedef struct ConfigFile {
+ struct ConfigFile *c_sibs;
+ struct ConfigFile *c_kids;
+ struct berval c_file;
+#ifdef SLAPD_MODULES
+ ModPaths c_modpaths;
+ ModPaths *c_modlast;
+#endif
+ BerVarray c_dseFiles;
+} ConfigFile;
+
+typedef struct CfEntryInfo {
+ struct CfEntryInfo *ce_sibs;
+ struct CfEntryInfo *ce_kids;
+ Entry *ce_entry;
+ BackendInfo *ce_bi;
+ BackendDB *ce_be;
+} CfEntryInfo;
+
+typedef struct {
+ ConfigFile *cb_config;
+ CfEntryInfo *cb_root;
+} CfBackInfo;
+
+/* These do nothing in slapd, they're kept only to make them
+ * editable here.
+ */
+static char *replica_pidFile, *replica_argsFile;
+static int replicationInterval;
+
+static char *passwd_salt;
+static char *logfileName;
+static BerVarray authz_rewrites;
+
+static AttributeDescription *cfAd_backend, *cfAd_database, *cfAd_overlay,
+ *cfAd_include;
+
+static ObjectClass *cfOc_global, *cfOc_backend, *cfOc_database,
+ *cfOc_include, *cfOc_overlay, *cfOc_access;
+
+static ConfigFile cf_prv, *cfn = &cf_prv;
+
+static int add_syncrepl LDAP_P(( Backend *, char **, int ));
+static int parse_syncrepl_line LDAP_P(( char **, int, syncinfo_t *));
+static void syncrepl_unparse LDAP_P (( syncinfo_t *, struct berval *));
+
+static ConfigDriver config_fname;
+static ConfigDriver config_generic;
+static ConfigDriver config_search_base;
+static ConfigDriver config_passwd_hash;
+static ConfigDriver config_schema_dn;
+static ConfigDriver config_sizelimit;
+static ConfigDriver config_timelimit;
+static ConfigDriver config_limits;
+static ConfigDriver config_overlay;
+static ConfigDriver config_suffix;
+static ConfigDriver config_deref_depth;
+static ConfigDriver config_rootdn;
+static ConfigDriver config_rootpw;
+static ConfigDriver config_restrict;
+static ConfigDriver config_allows;
+static ConfigDriver config_disallows;
+static ConfigDriver config_requires;
+static ConfigDriver config_security;
+static ConfigDriver config_referral;
+static ConfigDriver config_loglevel;
+static ConfigDriver config_syncrepl;
+static ConfigDriver config_replica;
+static ConfigDriver config_updatedn;
+static ConfigDriver config_updateref;
+static ConfigDriver config_include;
+#ifdef HAVE_TLS
+static ConfigDriver config_tls_option;
+static ConfigDriver config_tls_config;
+#endif
+
+enum {
+ CFG_ACL = 1,
+ CFG_BACKEND,
+ CFG_DATABASE,
+ CFG_TLS_RAND,
+ CFG_TLS_CIPHER,
+ CFG_TLS_CERT_FILE,
+ CFG_TLS_CERT_KEY,
+ CFG_TLS_CA_PATH,
+ CFG_TLS_CA_FILE,
+ CFG_TLS_VERIFY,
+ CFG_TLS_CRLCHECK,
+ CFG_SIZE,
+ CFG_TIME,
+ CFG_CONCUR,
+ CFG_THREADS,
+ CFG_SALT,
+ CFG_LIMITS,
+ CFG_RO,
+ CFG_REWRITE,
+ CFG_DEPTH,
+ CFG_OID,
+ CFG_OC,
+ CFG_DIT,
+ CFG_ATTR,
+ CFG_ATOPT,
+ CFG_CHECK,
+ CFG_AUDITLOG,
+ CFG_REPLOG,
+ CFG_ROOTDSE,
+ CFG_LOGFILE,
+ CFG_PLUGIN,
+ CFG_MODLOAD,
+ CFG_MODPATH,
+ CFG_LASTMOD,
+ CFG_AZPOLICY,
+ CFG_AZREGEXP,
+ CFG_SASLSECP,
+ CFG_SSTR_IF_MAX,
+ CFG_SSTR_IF_MIN,
+};
+
+typedef struct {
+ char *name, *oid;
+} OidRec;
+
+static OidRec OidMacros[] = {
+ /* OpenLDAProot:666.11.1 */
+ { "OLcfg", "1.3.6.1.4.1.4203.666.11.1" },
+ { "OLcfgAt", "OLcfg:3" },
+ { "OLcfgOc", "OLcfg:4" },
+ { "OMsyn", "1.3.6.1.4.1.1466.115.121.1" },
+ { "OMsInteger", "OMsyn:2" },
+ { "OMsBoolean", "OMsyn:7" },
+ { "OMsDN", "OMsyn:12" },
+ { "OMsDirectoryString", "OMsyn:15" },
+ { "OMsOctetString", "OMsyn:40" },
+ { NULL, NULL }
+};
+
+/* alphabetical ordering */
+
+ConfigTable config_back_cf_table[] = {
+ /* This attr is read-only */
+ { "", "", 0, 0, 0, ARG_MAGIC,
+ &config_fname, "( OLcfgAt:78 NAME 'olcConfigFile' "
+ "DESC 'File for slapd configuration directives' "
+ "EQUALITY caseIgnoreMatch "
+ "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "access", NULL, 0, 0, 0, ARG_MAY_DB|ARG_MAGIC|CFG_ACL,
+ &config_generic, "( OLcfgAt:1 NAME 'olcAccess' "
+ "DESC 'Access Control List' "
+ "EQUALITY caseIgnoreMatch "
+ "SYNTAX OMsDirectoryString X-ORDERED 'VALUES' )", NULL, NULL },
+ { "allows", "features", 2, 0, 5, ARG_PRE_DB|ARG_MAGIC,
+ &config_allows, "( OLcfgAt:2 NAME 'olcAllows' "
+ "DESC 'Allowed set of deprecated features' "
+ "EQUALITY caseIgnoreMatch "
+ "SYNTAX OMsDirectoryString )", NULL, NULL },
+ { "argsfile", "file", 2, 2, 0, ARG_STRING,
+ &slapd_args_file, "( OLcfgAt:3 NAME 'olcArgsFile' "
+ "DESC 'File for slapd command line options' "
+ "EQUALITY caseIgnoreMatch "
+ "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ /* Use standard 'attributeTypes' attr */
+ { "attribute", "attribute", 2, 0, 9, ARG_PAREN|ARG_MAGIC|CFG_ATTR,
+ &config_generic, NULL, NULL, NULL },
+ { "attributeoptions", NULL, 0, 0, 0, ARG_MAGIC|CFG_ATOPT,
+ &config_generic, "( OLcfgAt:5 NAME 'olcAttributeOptions' "
+ "EQUALITY caseIgnoreMatch "
+ "SYNTAX OMsDirectoryString )", NULL, NULL },
+ { "authid-rewrite", NULL, 2, 0, 0,
+#ifdef SLAP_AUTH_REWRITE
+ ARG_MAGIC|CFG_REWRITE, &config_generic,
+#else
+ ARG_IGNORED, NULL,
+#endif
+ "( OLcfgAt:6 NAME 'olcAuthIDRewrite' "
+ "EQUALITY caseIgnoreMatch "
+ "SYNTAX OMsDirectoryString X-ORDERED 'VALUES' )", NULL, NULL },
+ { "authz-policy", "policy", 2, 2, 0, ARG_STRING|ARG_MAGIC|CFG_AZPOLICY,
+ &config_generic, "( OLcfgAt:7 NAME 'olcAuthzPolicy' "
+ "EQUALITY caseIgnoreMatch "
+ "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "authz-regexp", NULL, 3, 3, 0, ARG_MAGIC|CFG_AZREGEXP,
+ &config_generic, "( OLcfgAt:8 NAME 'olcAuthzRegexp' "
+ "EQUALITY caseIgnoreMatch "
+ "SYNTAX OMsDirectoryString X-ORDERED 'VALUES' )", NULL, NULL },
+ { "backend", "type", 2, 2, 0, ARG_PRE_DB|ARG_MAGIC|CFG_BACKEND,
+ &config_generic, "( OLcfgAt:9 NAME 'olcBackend' "
+ "DESC 'A type of backend' "
+ "EQUALITY caseIgnoreMatch "
+ "SYNTAX OMsDirectoryString )", NULL, NULL },
+ { "concurrency", "level", 2, 2, 0, ARG_INT|ARG_NONZERO|ARG_MAGIC|CFG_CONCUR,
+ &config_generic, "( OLcfgAt:10 NAME 'olcConcurrency' "
+ "SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
+ { "conn_max_pending", "max", 2, 2, 0, ARG_LONG,
+ &slap_conn_max_pending, "( OLcfgAt:11 NAME 'olcConnMaxPending' "
+ "SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
+ { "conn_max_pending_auth", "max", 2, 2, 0, ARG_LONG,
+ &slap_conn_max_pending_auth, "( OLcfgAt:12 NAME 'olcConnMaxPendingAuth' "
+ "SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
+ { "database", "type", 2, 2, 0, ARG_MAGIC|CFG_DATABASE,
+ &config_generic, "( OLcfgAt:13 NAME 'olcDatabase' "
+ "DESC 'The backend type for a database instance' "
+ "SUP olcBackend )", NULL, NULL },
+ { "defaultSearchBase", "dn", 2, 2, 0, ARG_PRE_BI|ARG_PRE_DB|ARG_DN|ARG_MAGIC,
+ &config_search_base, "( OLcfgAt:14 NAME 'olcDefaultSearchBase' "
+ "SYNTAX OMsDN SINGLE-VALUE )", NULL, NULL },
+ { "disallows", "features", 2, 0, 8, ARG_PRE_DB|ARG_MAGIC,
+ &config_disallows, "( OLcfgAt:15 NAME 'olcDisallows' "
+ "EQUALITY caseIgnoreMatch "
+ "SYNTAX OMsDirectoryString )", NULL, NULL },
+ /* use standard schema */
+ { "ditcontentrule", NULL, 0, 0, 0, ARG_MAGIC|CFG_DIT,
+ &config_generic, NULL, NULL, NULL },
+ { "gentlehup", "on|off", 2, 2, 0,
+#ifdef SIGHUP
+ ARG_ON_OFF, &global_gentlehup,
+#else
+ ARG_IGNORED, NULL,
+#endif
+ "( OLcfgAt:17 NAME 'olcGentleHUP' "
+ "SYNTAX OMsBoolean SINGLE-VALUE )", NULL, NULL },
+ { "idletimeout", "timeout", 2, 2, 0, ARG_INT,
+ &global_idletimeout, "( OLcfgAt:18 NAME 'olcIdleTimeout' "
+ "SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
+/* XXX -- special case? */
+ { "include", "file", 2, 2, 0, ARG_MAGIC,
+ &config_include, "( OLcfgAt:19 NAME 'olcInclude' "
+ "SUP labeledURI )", NULL, NULL },
+ { "index_substr_if_minlen", "min", 2, 2, 0, ARG_INT|ARG_NONZERO|ARG_MAGIC|CFG_SSTR_IF_MIN,
+ &config_generic, "( OLcfgAt:20 NAME 'olcIndexSubstrIfMinLen' "
+ "SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
+ { "index_substr_if_maxlen", "max", 2, 2, 0, ARG_INT|ARG_NONZERO|ARG_MAGIC|CFG_SSTR_IF_MAX,
+ &config_generic, "( OLcfgAt:21 NAME 'olcIndexSubstrIfMaxLen' "
+ "SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
+ { "index_substr_any_len", "len", 2, 2, 0, ARG_INT|ARG_NONZERO,
+ &index_substr_any_len, "( OLcfgAt:22 NAME 'olcIndexSubstrAnyLen' "
+ "SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
+ { "index_substr_step", "step", 2, 2, 0, ARG_INT|ARG_NONZERO,
+ &index_substr_any_step, "( OLcfgAt:23 NAME 'olcIndexSubstrAnyStep' "
+ "SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
+ { "lastmod", "on|off", 2, 2, 0, ARG_DB|ARG_ON_OFF|ARG_MAGIC|CFG_LASTMOD,
+ &config_generic, "( OLcfgAt:24 NAME 'olcLastMod' "
+ "SYNTAX OMsBoolean SINGLE-VALUE )", NULL, NULL },
+ { "limits", "limits", 2, 0, 0, ARG_DB|ARG_MAGIC|CFG_LIMITS,
+ &config_generic, "( OLcfgAt:25 NAME 'olcLimits' "
+ "SYNTAX OMsDirectoryString )", NULL, NULL },
+ { "localSSF", "ssf", 2, 2, 0, ARG_LONG,
+ &local_ssf, "( OLcfgAt:26 NAME 'olcLocalSSF' "
+ "SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
+ { "logfile", "file", 2, 2, 0, ARG_STRING|ARG_MAGIC|CFG_LOGFILE,
+ &config_generic, "( OLcfgAt:27 NAME 'olcLogFile' "
+ "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "loglevel", "level", 2, 0, 0, ARG_MAGIC,
+ &config_loglevel, "( OLcfgAt:28 NAME 'olcLogLevel' "
+ "SYNTAX OMsDirectoryString )", NULL, NULL },
+ { "maxDerefDepth", "depth", 2, 2, 0, ARG_DB|ARG_INT|ARG_MAGIC|CFG_DEPTH,
+ &config_generic, "( OLcfgAt:29 NAME 'olcMaxDerefDepth' "
+ "SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
+ { "moduleload", "file", 2, 0, 0,
+#ifdef SLAPD_MODULES
+ ARG_MAGIC|CFG_MODLOAD, &config_generic,
+#else
+ ARG_IGNORED, NULL,
+#endif
+ "( OLcfgAt:30 NAME 'olcModuleLoad' "
+ "SYNTAX OMsDirectoryString X-ORDERED 'VALUES' )", NULL, NULL },
+ { "modulepath", "path", 2, 2, 0,
+#ifdef SLAPD_MODULES
+ ARG_MAGIC|CFG_MODPATH, &config_generic,
+#else
+ ARG_IGNORED, NULL,
+#endif
+ "( OLcfgAt:31 NAME 'olcModulePath' "
+ "SYNTAX OMsDirectoryString X-ORDERED 'VALUES' )", NULL, NULL },
+ /* use standard schema */
+ { "objectclass", "objectclass", 2, 0, 0, ARG_PAREN|ARG_MAGIC|CFG_OC,
+ &config_generic, NULL, NULL, NULL },
+ { "objectidentifier", NULL, 0, 0, 0, ARG_MAGIC|CFG_OID,
+ &config_generic, "( OLcfgAt:33 NAME 'olcObjectIdentifier' "
+ "SYNTAX OMsDirectoryString X-ORDERED 'VALUES' )", NULL, NULL },
+ { "overlay", "overlay", 2, 2, 0, ARG_MAGIC,
+ &config_overlay, "( OLcfgAt:34 NAME 'olcOverlay' "
+ "SUP olcDatabase )", NULL, NULL },
+ { "password-crypt-salt-format", "salt", 2, 2, 0, ARG_STRING|ARG_MAGIC|CFG_SALT,
+ &config_generic, "( OLcfgAt:35 NAME 'olcPasswordCryptSaltFormat' "
+ "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "password-hash", "hash", 2, 2, 0, ARG_MAGIC,
+ &config_passwd_hash, "( OLcfgAt:36 NAME 'olcPasswordHash' "
+ "SYNTAX OMsDirectoryString )", NULL, NULL },
+ { "pidfile", "file", 2, 2, 0, ARG_STRING,
+ &slapd_pid_file, "( OLcfgAt:37 NAME 'olcPidFile' "
+ "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "plugin", NULL, 0, 0, 0,
+#ifdef LDAP_SLAPI
+ ARG_MAGIC|CFG_PLUGIN, &config_generic,
+#else
+ ARG_IGNORED, NULL,
+#endif
+ "( OLcfgAt:38 NAME 'olcPlugin' "
+ "SYNTAX OMsDirectoryString )", NULL, NULL },
+ { "pluginlog", "filename", 2, 2, 0,
+#ifdef LDAP_SLAPI
+ ARG_STRING, &slapi_log_file,
+#else
+ ARG_IGNORED, NULL,
+#endif
+ "( OLcfgAt:39 NAME 'olcPluginLogFile' "
+ "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "readonly", "on|off", 2, 2, 0, ARG_MAY_DB|ARG_ON_OFF|ARG_MAGIC|CFG_RO,
+ &config_generic, "( OLcfgAt:40 NAME 'olcReadOnly' "
+ "SYNTAX OMsBoolean SINGLE-VALUE )", NULL, NULL },
+ { "referral", "url", 2, 2, 0, ARG_MAGIC,
+ &config_referral, "( OLcfgAt:41 NAME 'olcReferral' "
+ "SUP labeledURI SINGLE-VALUE )", NULL, NULL },
+ { "replica", "host or uri", 2, 0, 0, ARG_DB|ARG_MAGIC,
+ &config_replica, "( OLcfgAt:42 NAME 'olcReplica' "
+ "SUP labeledURI )", NULL, NULL },
+ { "replica-argsfile", NULL, 0, 0, 0, ARG_STRING,
+ &replica_argsFile, "( OLcfgAt:43 NAME 'olcReplicaArgsFile' "
+ "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "replica-pidfile", NULL, 0, 0, 0, ARG_STRING,
+ &replica_pidFile, "( OLcfgAt:44 NAME 'olcReplicaPidFile' "
+ "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "replicationInterval", NULL, 0, 0, 0, ARG_INT,
+ &replicationInterval, "( OLcfgAt:45 NAME 'olcReplicationInterval' "
+ "SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
+ { "replogfile", "filename", 2, 2, 0, ARG_MAY_DB|ARG_MAGIC|ARG_STRING|CFG_REPLOG,
+ &config_generic, "( OLcfgAt:46 NAME 'olcReplogFile' "
+ "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "require", "features", 2, 0, 7, ARG_MAY_DB|ARG_MAGIC,
+ &config_requires, "( OLcfgAt:47 NAME 'olcRequires' "
+ "SYNTAX OMsDirectoryString )", NULL, NULL },
+ { "restrict", "op_list", 2, 0, 0, ARG_MAY_DB|ARG_MAGIC,
+ &config_restrict, "( OLcfgAt:48 NAME 'olcRestrict' "
+ "SYNTAX OMsDirectoryString )", NULL, NULL },
+ { "reverse-lookup", "on|off", 2, 2, 0,
+#ifdef SLAPD_RLOOKUPS
+ ARG_ON_OFF, &use_reverse_lookup,
+#else
+ ARG_IGNORED, NULL,
+#endif
+ "( OLcfgAt:49 NAME 'olcReverseLookup' "
+ "SYNTAX OMsBoolean SINGLE-VALUE )", NULL, NULL },
+ { "rootdn", "dn", 2, 2, 0, ARG_DB|ARG_DN|ARG_MAGIC,
+ &config_rootdn, "( OLcfgAt:50 NAME 'olcRootDN' "
+ "SYNTAX OMsDN SINGLE-VALUE )", NULL, NULL },
+ { "rootDSE", "file", 2, 2, 0, ARG_MAGIC|CFG_ROOTDSE,
+ &config_generic, "( OLcfgAt:51 NAME 'olcRootDSE' "
+ "SYNTAX OMsDirectoryString )", NULL, NULL },
+ { "rootpw", "password", 2, 2, 0, ARG_STRING|ARG_DB|ARG_MAGIC,
+ &config_rootpw, "( OLcfgAt:52 NAME 'olcRootPW' "
+ "SYNTAX OMsOctetString SINGLE-VALUE )", NULL, NULL },
+ { "sasl-authz-policy", NULL, 2, 2, 0, ARG_MAGIC|CFG_AZPOLICY,
+ &config_generic, NULL, NULL, NULL },
+ { "sasl-host", "host", 2, 2, 0,
+#ifdef HAVE_CYRUS_SASL
+ ARG_STRING|ARG_UNIQUE, &global_host,
+#else
+ ARG_IGNORED, NULL,
+#endif
+ "( OLcfgAt:53 NAME 'olcSaslHost' "
+ "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "sasl-realm", "realm", 2, 2, 0,
+#ifdef HAVE_CYRUS_SASL
+ ARG_STRING|ARG_UNIQUE, &global_realm,
+#else
+ ARG_IGNORED, NULL,
+#endif
+ "( OLcfgAt:54 NAME 'olcSaslRealm' "
+ "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "sasl-regexp", NULL, 3, 3, 0, ARG_MAGIC|CFG_AZREGEXP,
+ &config_generic, NULL, NULL, NULL },
+ { "sasl-secprops", "properties", 2, 2, 0,
+#ifdef HAVE_CYRUS_SASL
+ ARG_MAGIC|CFG_SASLSECP, &config_generic,
+#else
+ ARG_IGNORED, NULL,
+#endif
+ "( OLcfgAt:56 NAME 'olcSaslSecProps' "
+ "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "saslRegexp", NULL, 3, 3, 0, ARG_MAGIC|CFG_AZREGEXP,
+ &config_generic, NULL, NULL, NULL },
+ { "schemacheck", "on|off", 2, 2, 0, ARG_ON_OFF|ARG_MAGIC|CFG_CHECK,
+ &config_generic, "( OLcfgAt:57 NAME 'olcSchemaCheck' "
+ "SYNTAX OMsBoolean SINGLE-VALUE )", NULL, NULL },
+ { "schemadn", "dn", 2, 2, 0, ARG_MAY_DB|ARG_DN|ARG_MAGIC,
+ &config_schema_dn, "( OLcfgAt:58 NAME 'olcSchemaDN' "
+ "SYNTAX OMsDN SINGLE-VALUE )", NULL, NULL },
+ { "security", "factors", 2, 0, 0, ARG_MAY_DB|ARG_MAGIC,
+ &config_security, "( OLcfgAt:59 NAME 'olcSecurity' "
+ "SYNTAX OMsDirectoryString )", NULL, NULL },
+ { "sizelimit", "limit", 2, 0, 0, ARG_MAY_DB|ARG_MAGIC|CFG_SIZE,
+ &config_sizelimit, "( OLcfgAt:60 NAME 'olcSizeLimit' "
+ "SYNTAX OMsInteger )", NULL, NULL },
+ { "sockbuf_max_incoming", "max", 2, 2, 0, ARG_LONG,
+ &sockbuf_max_incoming, "( OLcfgAt:61 NAME 'olcSockbufMaxIncoming' "
+ "SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
+ { "sockbuf_max_incoming_auth", "max", 2, 2, 0, ARG_LONG,
+ &sockbuf_max_incoming_auth, "( OLcfgAt:62 NAME 'olcSockbufMaxIncomingAuth' "
+ "SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
+ { "srvtab", "file", 2, 2, 0,
+#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
+ ARG_STRING, &ldap_srvtab,
+#else
+ ARG_IGNORED, NULL,
+#endif
+ "( OLcfgAt:63 NAME 'olcSrvtab' "
+ "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "suffix", "suffix", 2, 2, 0, ARG_DB|ARG_DN|ARG_MAGIC,
+ &config_suffix, "( OLcfgAt:64 NAME 'olcSuffix' "
+ "SYNTAX OMsDN )", NULL, NULL },
+ { "syncrepl", NULL, 0, 0, 0, ARG_DB|ARG_MAGIC,
+ &config_syncrepl, "( OLcfgAt:65 NAME 'olcSyncrepl' "
+ "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "threads", "count", 2, 2, 0, ARG_INT|ARG_MAGIC|CFG_THREADS,
+ &config_generic, "( OLcfgAt:66 NAME 'olcThreads' "
+ "SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
+ { "timelimit", "limit", 2, 0, 0, ARG_MAY_DB|ARG_MAGIC|CFG_TIME,
+ &config_timelimit, "( OLcfgAt:67 NAME 'olcTimeLimit' "
+ "SYNTAX OMsInteger )", NULL, NULL },
+ { "TLSCACertificateFile", NULL, 0, 0, 0,
+#ifdef HAVE_TLS
+ CFG_TLS_CA_FILE|ARG_STRING|ARG_MAGIC, &config_tls_option,
+#else
+ ARG_IGNORED, NULL,
+#endif
+ "( OLcfgAt:68 NAME 'olcTLSCACertificateFile' "
+ "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "TLSCACertificatePath", NULL, 0, 0, 0,
+#ifdef HAVE_TLS
+ CFG_TLS_CA_PATH|ARG_STRING|ARG_MAGIC, &config_tls_option,
+#else
+ ARG_IGNORED, NULL,
+#endif
+ "( OLcfgAt:69 NAME 'olcTLSCACertificatePath' "
+ "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "TLSCertificateFile", NULL, 0, 0, 0,
+#ifdef HAVE_TLS
+ CFG_TLS_CERT_FILE|ARG_STRING|ARG_MAGIC, &config_tls_option,
+#else
+ ARG_IGNORED, NULL,
+#endif
+ "( OLcfgAt:70 NAME 'olcTLSCertificateFile' "
+ "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "TLSCertificateKeyFile", NULL, 0, 0, 0,
+#ifdef HAVE_TLS
+ CFG_TLS_CERT_KEY|ARG_STRING|ARG_MAGIC, &config_tls_option,
+#else
+ ARG_IGNORED, NULL,
+#endif
+ "( OLcfgAt:71 NAME 'olcTLSCertificateKeyFile' "
+ "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "TLSCipherSuite", NULL, 0, 0, 0,
+#ifdef HAVE_TLS
+ CFG_TLS_CIPHER|ARG_STRING|ARG_MAGIC, &config_tls_option,
+#else
+ ARG_IGNORED, NULL,
+#endif
+ "( OLcfgAt:72 NAME 'olcTLSCipherSuite' "
+ "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "TLSCRLCheck", NULL, 0, 0, 0,
+#ifdef HAVE_TLS
+ CFG_TLS_CRLCHECK|ARG_STRING|ARG_MAGIC, &config_tls_config,
+#else
+ ARG_IGNORED, NULL,
+#endif
+ "( OLcfgAt:73 NAME 'olcTLSCRLCheck' "
+ "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "TLSRandFile", NULL, 0, 0, 0,
+#ifdef HAVE_TLS
+ CFG_TLS_RAND|ARG_STRING|ARG_MAGIC, &config_tls_option,
+#else
+ ARG_IGNORED, NULL,
+#endif
+ "( OLcfgAt:74 NAME 'olcTLSRandFile' "
+ "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "TLSVerifyClient", NULL, 0, 0, 0,
+#ifdef HAVE_TLS
+ CFG_TLS_VERIFY|ARG_STRING|ARG_MAGIC, &config_tls_config,
+#else
+ ARG_IGNORED, NULL,
+#endif
+ "( OLcfgAt:75 NAME 'olcTLSVerifyClient' "
+ "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "ucdata-path", "path", 2, 2, 0, ARG_IGNORED,
+ NULL, NULL, NULL, NULL },
+ { "updatedn", "dn", 2, 2, 0, ARG_DB|ARG_MAGIC,
+ &config_updatedn, "( OLcfgAt:76 NAME 'olcUpdateDN' "
+ "SYNTAX OMsDN SINGLE-VALUE )", NULL, NULL },
+ { "updateref", "url", 2, 2, 0, ARG_DB|ARG_MAGIC,
+ &config_updateref, "( OLcfgAt:77 NAME 'olcUpdateRef' "
+ "SUP labeledURI )", NULL, NULL },
+ { NULL, NULL, 0, 0, 0, ARG_IGNORED,
+ NULL, NULL, NULL, NULL }
+};
+
+static ConfigOCs cf_ocs[] = {
+ { "( OLcfgOc:1 "
+ "NAME 'olcConfig' "
+ "DESC 'OpenLDAP configuration object' "
+ "ABSTRACT SUP top "
+ "MAY ( cn $ olcConfigFile ) )", NULL },
+ { "( OLcfgOc:3 "
+ "NAME 'olcGlobal' "
+ "DESC 'OpenLDAP Global configuration options' "
+ "SUP olcConfig STRUCTURAL "
+ "MAY ( olcAllows $ olcArgsFile $ olcAttributeOptions $ "
+ "olcAuthIDRewrite $ olcAuthzPolicy $ olcAuthzRegexp $ "
+ "olcConcurrency $ olcConnMaxPending $ olcConnMaxPendingAuth $ "
+ "olcDefaultSearchBase $ olcDisallows $ olcGentleHUP $ "
+ "olcIdleTimeout $ olcIndexSubstrIfMaxLen $ olcIndexSubstrIfMinLen $ "
+ "olcIndexSubstrAnyLen $ olcIndexSubstrAnyStep $ olcLocalSSF $ "
+ "olcLogLevel $ olcModuleLoad $ olcModulePath $ olcObjectIdentifier $ "
+ "olcPasswordCryptSaltFormat $ olcPasswordHash $ olcPidFile $ "
+ "olcPlugin $ olcPluginLogFile $ olcReadOnly $ olcReferral $ "
+ "olcReplicaPidFile $ olcReplicaArgsFile $ olcReplicationInterval $ "
+ "olcReplogFile $ olcRequires $ olcRestrict $ olcReverseLookup $ "
+ "olcRootDSE $ olcSaslHost $ olcSaslRealm $ olcSaslSecProps $ "
+ "olcSchemaCheck $ olcSchemaDN $ olcSecurity $ olcSizeLimit $ "
+ "olcSockbufMaxIncoming $ olcSockbufMaxIncomingAuth $ olcSrvtab $ "
+ "olcThreads $ olcTimeLimit $ olcTLSCACertificateFile $ "
+ "olcTLSCACertificatePath $ olcTLSCertificateFile $ "
+ "olcTLSCertificateKeyFile $ olcTLSCipherSuite $ olcTLSCRLCheck $ "
+ "olcTLSRandFile $ olcTLSVerifyClient ) )", &cfOc_global },
+ { "( OLcfgOc:4 "
+ "NAME 'olcBackendConfig' "
+ "DESC 'OpenLDAP Backend-specific options' "
+ "SUP olcConfig STRUCTURAL "
+ "MAY ( olcBackend ) )", &cfOc_backend },
+ { "( OLcfgOc:5 "
+ "NAME 'olcDatabaseConfig' "
+ "DESC 'OpenLDAP Database-specific options' "
+ "SUP olcConfig STRUCTURAL "
+ "MAY ( olcDatabase $ olcAccess $ olcLastMod $ olcLimits $ "
+ "olcMaxDerefDepth $ olcPlugin $ olcReadOnly $ olcReplica $ "
+ "olcReplogFile $ olcRequires $ olcRestrict $ olcRootDN $ olcRootPW $ "
+ "olcSchemaDN $ olcSecurity $ olcSizeLimit $ olcSuffix $ olcSyncrepl $ "
+ "olcTimeLimit $ olcUpdateDN $ olcUpdateRef ) )", &cfOc_database },
+ { "( OLcfgOc:6 "
+ "NAME 'olcIncludeFile' "
+ "DESC 'OpenLDAP configuration include file' "
+ "SUP olcConfig STRUCTURAL "
+ "MAY ( olcInclude $ olcModuleLoad $ olcModulePath $ olcRootDSE ) )",
+ &cfOc_include },
+ { "( OLcfgOc:7 "
+ "NAME 'olcOverlayConfig' "
+ "DESC 'OpenLDAP Overlay-specific options' "
+ "SUP olcConfig STRUCTURAL "
+ "MAY ( olcOverlay ) )", &cfOc_overlay },
+ { "( OLcfgOc:8 "
+ "NAME 'olcACL' "
+ "DESC 'OpenLDAP Access Control List' "
+ "SUP olcConfig STRUCTURAL "
+ "MUST ( olcAccess ) )", &cfOc_access },
+ { NULL, NULL }
+};
+
+static int
+config_generic(ConfigArgs *c) {
+ char *p;
+ int i;
+
+ if ( c->emit ) {
+ int rc = 0;
+ switch(c->type) {
+ case CFG_CONCUR:
+ c->value_int = ldap_pvt_thread_get_concurrency();
+ break;
+ case CFG_THREADS:
+ c->value_int = connection_pool_max;
+ break;
+ case CFG_SALT:
+ if ( passwd_salt )
+ c->value_string = ch_strdup( passwd_salt );
+ else
+ rc = 1;
+ break;
+ case CFG_LIMITS:
+ if ( c->be->be_limits ) {
+ char buf[4096*3];
+ struct berval bv;
+ int i;
+
+ for ( i=0; c->be->be_limits[i]; i++ ) {
+ bv.bv_len = sprintf( buf, "{%d}", i );
+ bv.bv_val = buf+bv.bv_len;
+ limits_unparse( c->be->be_limits[i], &bv );
+ bv.bv_len += bv.bv_val - buf;
+ bv.bv_val = buf;
+ value_add_one( &c->rvalue_vals, &bv );
+ }
+ }
+ if ( !c->rvalue_vals ) rc = 1;
+ break;
+ case CFG_RO:
+ c->value_int = (c->be->be_restrictops & SLAP_RESTRICT_OP_WRITES) != 0;
+ break;
+ case CFG_AZPOLICY:
+ c->value_string = ch_strdup( slap_sasl_getpolicy());
+ break;
+ case CFG_AZREGEXP:
+ slap_sasl_regexp_unparse( &c->rvalue_vals );
+ if ( !c->rvalue_vals ) rc = 1;
+ break;
+#ifdef HAVE_CYRUS_SASL
+ case CFG_SASLSECP: {
+ struct berval bv = BER_BVNULL;
+ slap_sasl_secprops_unparse( &bv );
+ if ( !BER_BVISNULL( &bv )) {
+ ber_bvarray_add( &c->rvalue_vals, &bv );
+ } else {
+ rc = 1;
+ }
+ }
+ break;
+#endif
+ case CFG_DEPTH:
+ c->value_int = c->be->be_max_deref_depth;
+ break;
+ case CFG_OID:
+ oidm_unparse( &c->rvalue_vals );
+ if ( !c->rvalue_vals )
+ rc = 1;
+ break;
+ case CFG_CHECK:
+ c->value_int = global_schemacheck;
+ break;
+ case CFG_ACL: {
+ AccessControl *a;
+ char *src, *dst, ibuf[11];
+ struct berval bv, abv;
+ for (i=0, a=c->be->be_acl; a; i++,a=a->acl_next) {
+ abv.bv_len = sprintf( ibuf, "{%x}", i );
+ acl_unparse( a, &bv );
+ abv.bv_val = ch_malloc( abv.bv_len + bv.bv_len + 1 );
+ AC_MEMCPY( abv.bv_val, ibuf, abv.bv_len );
+ /* Turn TAB / EOL into plain space */
+ for (src=bv.bv_val,dst=abv.bv_val+abv.bv_len; *src; src++) {
+ if (isspace(*src)) *dst++ = ' ';
+ else *dst++ = *src;
+ }
+ *dst = '\0';
+ if (dst[-1] == ' ') {
+ dst--;
+ *dst = '\0';
+ }
+ abv.bv_len = dst - abv.bv_val;
+ ber_bvarray_add( &c->rvalue_vals, &abv );
+ }
+ rc = (!i);
+ break;
+ }
+ case CFG_REPLOG:
+ if ( c->be->be_replogfile )
+ c->value_string = ch_strdup( c->be->be_replogfile );
+ break;
+ case CFG_ROOTDSE: {
+ ConfigFile *cf = (ConfigFile *)c->line;
+ if ( cf->c_dseFiles ) {
+ value_add( &c->rvalue_vals, cf->c_dseFiles );
+ } else {
+ rc = 1;
+ }
+ }
+ break;
+ case CFG_LOGFILE:
+ if ( logfileName )
+ c->value_string = ch_strdup( logfileName );
+ else
+ rc = 1;
+ break;
+ case CFG_LASTMOD:
+ c->value_int = (SLAP_NOLASTMOD(c->be) == 0);
+ break;
+ case CFG_SSTR_IF_MAX:
+ c->value_int = index_substr_if_maxlen;
+ break;
+ case CFG_SSTR_IF_MIN:
+ c->value_int = index_substr_if_minlen;
+ break;
+#ifdef SLAPD_MODULES
+ case CFG_MODLOAD: {
+ ConfigFile *cf = (ConfigFile *)c->line;
+ ModPaths *mp;
+ for (i=0, mp=&cf->c_modpaths; mp; mp=mp->mp_next, i++) {
+ int j;
+ if (!mp->mp_loads) continue;
+ for (j=0; !BER_BVISNULL(&mp->mp_loads[j]); j++) {
+ struct berval bv;
+ bv.bv_val = c->log;
+ bv.bv_len = sprintf( bv.bv_val, "{%d}{%d}%s", i, j,
+ mp->mp_loads[j].bv_val );
+ value_add_one( &c->rvalue_vals, &bv );
+ }
+ }
+ rc = c->rvalue_vals ? 0 : 1;
+ }
+ break;
+ case CFG_MODPATH: {
+ ConfigFile *cf = (ConfigFile *)c->line;
+ ModPaths *mp;
+ for (i=0, mp=&cf->c_modpaths; mp; mp=mp->mp_next, i++) {
+ struct berval bv;
+ if ( BER_BVISNULL( &mp->mp_path ) && !mp->mp_loads )
+ continue;
+ bv.bv_val = c->log;
+ bv.bv_len = sprintf( bv.bv_val, "{%d}%s", i,
+ mp->mp_path.bv_val );
+ value_add_one( &c->rvalue_vals, &bv );
+ }
+ rc = c->rvalue_vals ? 0 : 1;
+ }
+ break;
+#endif
+#ifdef LDAP_SLAPI
+ case CFG_PLUGIN:
+ slapi_int_plugin_unparse( c->be, &c->rvalue_vals );
+ if ( !c->rvalue_vals ) rc = 1;
+ break;
+#endif
+#ifdef SLAP_AUTH_REWRITE
+ case CFG_REWRITE:
+ if ( authz_rewrites ) {
+ struct berval bv, idx;
+ char ibuf[32];
+ int i;
+
+ idx.bv_val = ibuf;
+ for ( i=0; !BER_BVISNULL( &authz_rewrites[i] ); i++ ) {
+ idx.bv_len = sprintf( idx.bv_val, "{%d}", i );
+ bv.bv_len = idx.bv_len + authz_rewrites[i].bv_len;
+ bv.bv_val = ch_malloc( bv.bv_len + 1 );
+ strcpy( bv.bv_val, idx.bv_val );
+ strcpy( bv.bv_val+idx.bv_len, authz_rewrites[i].bv_val );
+ ber_bvarray_add( &c->rvalue_vals, &bv );
+ }
+ }
+ if ( !c->rvalue_vals ) rc = 1;
+ break;
+#endif
+ default:
+ rc = 1;
+ }
+ return rc;
+ }
+
+ p = strchr(c->line,'(' /*')'*/);
+ switch(c->type) {
+ case CFG_BACKEND:
+ if(!(c->bi = backend_info(c->argv[1]))) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "backend %s failed init!\n", c->log, c->argv[1], 0);
+ return(1);
+ }
+ break;
+
+ case CFG_DATABASE:
+ c->bi = NULL;
+ /* NOTE: config is always the first backend!
+ */
+ if ( !strcasecmp( c->argv[1], "config" )) {
+ c->be = backendDB;
+ } else if(!(c->be = backend_db_init(c->argv[1]))) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "database %s failed init!\n", c->log, c->argv[1], 0);
+ return(1);
+ }
+ break;
+
+ case CFG_CONCUR:
+ ldap_pvt_thread_set_concurrency(c->value_int);
+ break;
+
+ case CFG_THREADS:
+ ldap_pvt_thread_pool_maxthreads(&connection_pool, c->value_int);
+ connection_pool_max = c->value_int; /* save for reference */
+ break;
+
+ case CFG_SALT:
+ if ( passwd_salt ) ch_free( passwd_salt );
+ passwd_salt = c->value_string;
+ lutil_salt_format(passwd_salt);
+ break;
+
+ case CFG_LIMITS:
+ if(limits_parse(c->be, c->fname, c->lineno, c->argc, c->argv))
+ return(1);
+ break;
+
+ case CFG_RO:
+ if(c->value_int)
+ c->be->be_restrictops |= SLAP_RESTRICT_OP_WRITES;
+ else
+ c->be->be_restrictops &= ~SLAP_RESTRICT_OP_WRITES;
+ break;
+
+ case CFG_AZPOLICY:
+ ch_free(c->value_string);
+ if (slap_sasl_setpolicy( c->argv[1] )) {
+ Debug(LDAP_DEBUG_ANY, "%s: unable to parse value \"%s\" in"
+ " \"authz-policy <policy>\"\n",
+ c->log, c->argv[1], 0 );
+ return(1);
+ }
+ break;
+
+ case CFG_AZREGEXP:
+ if (slap_sasl_regexp_config( c->argv[1], c->argv[2] ))
+ return(1);
+ break;
+
+#ifdef HAVE_CYRUS_SASL
+ case CFG_SASLSECP:
+ {
+ char *txt = slap_sasl_secprops( c->argv[1] );
+ if ( txt ) {
+ Debug(LDAP_DEBUG_ANY, "%s: sasl-secprops: %s\n",
+ c->log, txt, 0 );
+ return(1);
+ }
+ break;
+ }
+#endif
+
+ case CFG_DEPTH:
+ c->be->be_max_deref_depth = c->value_int;
+ break;
+
+ case CFG_OID:
+ if(parse_oidm(c->fname, c->lineno, c->argc, c->argv)) return(1);
+ break;
+
+ case CFG_OC:
+ if(parse_oc(c->fname, c->lineno, p, c->argv)) return(1);
+ break;
+
+ case CFG_DIT:
+ if(parse_cr(c->fname, c->lineno, p, c->argv)) return(1);
+ break;
+
+ case CFG_ATTR:
+ if(parse_at(c->fname, c->lineno, p, c->argv)) return(1);
+ break;
+
+ case CFG_ATOPT:
+ ad_define_option(NULL, NULL, 0);
+ for(i = 1; i < c->argc; i++)
+ if(ad_define_option(c->argv[i], c->fname, c->lineno))
+ return(1);
+ break;
+
+ case CFG_CHECK:
+ global_schemacheck = c->value_int;
+ if(!global_schemacheck) Debug(LDAP_DEBUG_ANY, "%s: "
+ "schema checking disabled! your mileage may vary!\n",
+ c->log, 0, 0);
+ break;
+
+ case CFG_ACL:
+ parse_acl(c->be, c->fname, c->lineno, c->argc, c->argv);
+ break;
+
+ case CFG_REPLOG:
+ if(SLAP_MONITOR(c->be)) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "\"replogfile\" should not be used "
+ "inside monitor database\n",
+ c->log, 0, 0);
+ return(0); /* FIXME: should this be an error? */
+ }
+
+ c->be->be_replogfile = c->value_string;
+ break;
+
+ case CFG_ROOTDSE:
+ if(read_root_dse_file(c->argv[1])) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "could not read \"rootDSE <filename>\" line\n",
+ c->log, 0, 0);
+ return(1);
+ }
+ {
+ struct berval bv;
+ ber_str2bv( c->argv[1], 0, 1, &bv );
+ ber_bvarray_add( &cfn->c_dseFiles, &bv );
+ }
+ break;
+
+ case CFG_LOGFILE: {
+ FILE *logfile;
+ if ( logfileName ) ch_free( logfileName );
+ logfileName = c->value_string;
+ logfile = fopen(logfileName, "w");
+ if(logfile) lutil_debug_file(logfile);
+ } break;
+
+ case CFG_LASTMOD:
+ if(SLAP_NOLASTMODCMD(c->be)) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "lastmod not available for %s databases\n",
+ c->log, c->be->bd_info->bi_type, 0);
+ return(1);
+ }
+ if(c->value_int)
+ SLAP_DBFLAGS(c->be) &= ~SLAP_DBFLAG_NOLASTMOD;
+ else
+ SLAP_DBFLAGS(c->be) |= SLAP_DBFLAG_NOLASTMOD;
+ break;
+
+ case CFG_SSTR_IF_MAX:
+ if (c->value_int < index_substr_if_minlen) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "invalid max value (%d)\n",
+ c->log, c->value_int, 0 );
+ return(1);
+ }
+ index_substr_if_maxlen = c->value_int;
+ break;
+
+ case CFG_SSTR_IF_MIN:
+ if (c->value_int > index_substr_if_maxlen) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "invalid min value (%d)\n",
+ c->log, c->value_int, 0 );
+ return(1);
+ }
+ index_substr_if_minlen = c->value_int;
+ break;
+
+#ifdef SLAPD_MODULES
+ case CFG_MODLOAD:
+ if(module_load(c->argv[1], c->argc - 2, (c->argc > 2) ? c->argv + 2 : NULL))
+ return(1);
+ /* Record this load on the current path */
+ {
+ struct berval bv;
+ ber_str2bv(c->line, 0, 1, &bv);
+ ber_bvarray_add( &cfn->c_modlast->mp_loads, &bv );
+ }
+ break;
+
+ case CFG_MODPATH:
+ if(module_path(c->argv[1])) return(1);
+ /* Record which path was used with each module */
+ {
+ ModPaths *mp;
+
+ if (!cfn->c_modpaths.mp_loads) {
+ mp = &cfn->c_modpaths;
+ } else {
+ mp = ch_malloc( sizeof( ModPaths ));
+ cfn->c_modlast->mp_next = mp;
+ }
+ ber_str2bv(c->argv[1], 0, 1, &mp->mp_path);
+ mp->mp_next = NULL;
+ mp->mp_loads = NULL;
+ cfn->c_modlast = mp;
+ }
+
+ break;
+#endif
+
+#ifdef LDAP_SLAPI
+ case CFG_PLUGIN:
+ if(slapi_int_read_config(c->be, c->fname, c->lineno, c->argc, c->argv) != LDAP_SUCCESS)
+ return(1);
+ slapi_plugins_used++;
+ break;
+#endif
+
+#ifdef SLAP_AUTH_REWRITE
+ case CFG_REWRITE: {
+ struct berval bv;
+ if(slap_sasl_rewrite_config(c->fname, c->lineno, c->argc, c->argv))
+ return(1);
+ ber_str2bv( c->line, 0, 1, &bv );
+ ber_bvarray_add( &authz_rewrites, &bv );
+ }
+ break;
+#endif
+
+
+ default:
+ Debug(LDAP_DEBUG_ANY, "%s: unknown CFG_TYPE %d"
+ "(ignored)\n", c->log, c->type, 0);
+
+ }
+ return(0);
+}
+
+
+static int
+config_fname(ConfigArgs *c) {
+ if(c->emit && c->line) {
+ ConfigFile *cf = (ConfigFile *)c->line;
+ value_add_one( &c->rvalue_vals, &cf->c_file );
+ return 0;
+ }
+ return(1);
+}
+
+static int
+config_search_base(ConfigArgs *c) {
+ struct berval dn;
+
+ if(c->emit) {
+ int rc = 1;
+ if (!BER_BVISEMPTY(&default_search_base)) {
+ value_add_one(&c->rvalue_vals, &default_search_base);
+ value_add_one(&c->rvalue_nvals, &default_search_nbase);
+ rc = 0;
+ }
+ return rc;
+ }
+
+ if(c->bi || c->be != frontendDB) {
+ Debug(LDAP_DEBUG_ANY, "%s: defaultSearchBase line must appear "
+ "prior to any backend or database definition\n",
+ c->log, 0, 0);
+ return(1);
+ }
+
+ if(default_search_nbase.bv_len) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "default search base \"%s\" already defined "
+ "(discarding old)\n",
+ c->log, default_search_base.bv_val, 0);
+ free(default_search_base.bv_val);
+ free(default_search_nbase.bv_val);
+ }
+
+ default_search_base = c->value_dn;
+ default_search_nbase = c->value_ndn;
+ return(0);
+}
+
+static int
+config_passwd_hash(ConfigArgs *c) {
+ int i;
+ if (c->emit) {
+ struct berval bv;
+ for (i=0; default_passwd_hash && default_passwd_hash[i]; i++) {
+ ber_str2bv(default_passwd_hash[i], 0, 0, &bv);
+ value_add_one(&c->rvalue_vals, &bv);
+ }
+ return i ? 0 : 1;
+ }
+ if(default_passwd_hash) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "already set default password_hash\n",
+ c->log, 0, 0);
+ return(1);
+ }
+ for(i = 1; i < c->argc; i++) {
+ if(!lutil_passwd_scheme(c->argv[i])) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "password scheme \"%s\" not available\n",
+ c->log, c->argv[i], 0);
+ } else {
+ ldap_charray_add(&default_passwd_hash, c->argv[i]);
+ }
+ if(!default_passwd_hash) {
+ Debug(LDAP_DEBUG_ANY, "%s: no valid hashes found\n",
+ c->log, 0, 0 );
+ return(1);
+ }
+ }
+ return(0);
+}
+
+static int
+config_schema_dn(ConfigArgs *c) {
+ struct berval dn;
+ int rc;
+ if ( c->emit ) {
+ value_add_one(&c->rvalue_vals, &c->be->be_schemadn);
+ value_add_one(&c->rvalue_nvals, &c->be->be_schemandn);
+ return 0;
+ }
+ c->be->be_schemadn = c->value_dn;
+ c->be->be_schemandn = c->value_ndn;
+ return(0);
+}
+
+static int
+config_sizelimit(ConfigArgs *c) {
+ int i, rc = 0;
+ char *next;
+ struct slap_limits_set *lim = &c->be->be_def_limit;
+ if (c->emit) {
+ char buf[8192];
+ struct berval bv;
+ bv.bv_val = buf;
+ bv.bv_len = 0;
+ limits_unparse_one( lim, SLAP_LIMIT_SIZE, &bv );
+ if ( !BER_BVISEMPTY( &bv ))
+ value_add_one( &c->rvalue_vals, &bv );
+ else
+ rc = 1;
+ return rc;
+ }
+ for(i = 1; i < c->argc; i++) {
+ if(!strncasecmp(c->argv[i], "size", 4)) {
+ rc = limits_parse_one(c->argv[i], lim);
+ if ( rc ) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "unable to parse value \"%s\" in \"sizelimit <limit>\" line\n",
+ c->log, c->argv[i], 0);
+ return(1);
+ }
+ } else {
+ if(!strcasecmp(c->argv[i], "unlimited")) {
+ lim->lms_s_soft = -1;
+ } else {
+ lim->lms_s_soft = strtol(c->argv[i], &next, 0);
+ if(next == c->argv[i]) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "unable to parse limit \"%s\" in \"sizelimit <limit>\" line\n",
+ c->log, c->argv[i], 0);
+ return(1);
+ } else if(next[0] != '\0') {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "trailing chars \"%s\" in \"sizelimit <limit>\" line (ignored)\n",
+ c->log, next, 0);
+ }
+ }
+ lim->lms_s_hard = 0;
+ }
+ }
+ return(0);
+}
+
+static int
+config_timelimit(ConfigArgs *c) {
+ int i, rc = 0;
+ char *next;
+ struct slap_limits_set *lim = &c->be->be_def_limit;
+ if (c->emit) {
+ char buf[8192];
+ struct berval bv;
+ bv.bv_val = buf;
+ bv.bv_len = 0;
+ limits_unparse_one( lim, SLAP_LIMIT_TIME, &bv );
+ if ( !BER_BVISEMPTY( &bv ))
+ value_add_one( &c->rvalue_vals, &bv );
+ else
+ rc = 1;
+ return rc;
+ }
+ for(i = 1; i < c->argc; i++) {
+ if(!strncasecmp(c->argv[i], "time", 4)) {
+ rc = limits_parse_one(c->argv[i], lim);
+ if ( rc ) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "unable to parse value \"%s\" in \"timelimit <limit>\" line\n",
+ c->log, c->argv[i], 0);
+ return(1);
+ }
+ } else {
+ if(!strcasecmp(c->argv[i], "unlimited")) {
+ lim->lms_t_soft = -1;
+ } else {
+ lim->lms_t_soft = strtol(c->argv[i], &next, 0);
+ if(next == c->argv[i]) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "unable to parse limit \"%s\" in \"timelimit <limit>\" line\n",
+ c->log, c->argv[i], 0);
+ return(1);
+ } else if(next[0] != '\0') {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "trailing chars \"%s\" in \"timelimit <limit>\" line (ignored)\n",
+ c->log, next, 0);
+ }
+ }
+ lim->lms_t_hard = 0;
+ }
+ }
+ return(0);
+}
+
+static int
+config_overlay(ConfigArgs *c) {
+ if (c->emit) {
+ return 1;
+ }
+ if(c->argv[1][0] == '-' && overlay_config(c->be, &c->argv[1][1])) {
+ /* log error */
+ Debug(LDAP_DEBUG_ANY, "%s: (optional) %s overlay \"%s\" configuration failed (ignored)\n",
+ c->log, c->be == frontendDB ? "global " : "", c->argv[1][1]);
+ } else if(overlay_config(c->be, c->argv[1])) {
+ return(1);
+ }
+ return(0);
+}
+
+static int
+config_suffix(ConfigArgs *c) {
+ Backend *tbe;
+ struct berval pdn, ndn;
+ int rc;
+ if (c->emit) {
+ if ( !BER_BVISNULL( &c->be->be_suffix[0] )) {
+ value_add( &c->rvalue_vals, c->be->be_suffix );
+ value_add( &c->rvalue_nvals, c->be->be_nsuffix );
+ return 0;
+ } else {
+ return 1;
+ }
+ }
+#ifdef SLAPD_MONITOR_DN
+ if(!strcasecmp(c->argv[1], SLAPD_MONITOR_DN)) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "\"%s\" is reserved for monitoring slapd\n",
+ c->log, SLAPD_MONITOR_DN, 0);
+ return(1);
+ }
+#endif
+
+ pdn = c->value_dn;
+ ndn = c->value_ndn;
+ tbe = select_backend(&ndn, 0, 0);
+ if(tbe == c->be) {
+ Debug(LDAP_DEBUG_ANY, "%s: suffix already served by this backend! (ignored)\n",
+ c->log, 0, 0);
+ free(pdn.bv_val);
+ free(ndn.bv_val);
+ } else if(tbe) {
+ Debug(LDAP_DEBUG_ANY, "%s: suffix already served by a preceding backend \"%s\"\n",
+ c->log, tbe->be_suffix[0].bv_val, 0);
+ free(pdn.bv_val);
+ free(ndn.bv_val);
+ return(1);
+ } else if(pdn.bv_len == 0 && default_search_nbase.bv_len) {
+ Debug(LDAP_DEBUG_ANY, "%s: suffix DN empty and default search "
+ "base provided \"%s\" (assuming okay)\n",
+ c->log, default_search_base.bv_val, 0);
+ }
+ ber_bvarray_add(&c->be->be_suffix, &pdn);
+ ber_bvarray_add(&c->be->be_nsuffix, &ndn);
+ return(0);
+}
+
+static int
+config_rootdn(ConfigArgs *c) {
+ if (c->emit) {
+ if ( !BER_BVISNULL( &c->be->be_rootdn )) {
+ value_add_one(&c->rvalue_vals, &c->be->be_rootdn);
+ value_add_one(&c->rvalue_nvals, &c->be->be_rootndn);
+ return 0;
+ } else {
+ return 1;
+ }
+ }
+ c->be->be_rootdn = c->value_dn;
+ c->be->be_rootndn = c->value_ndn;
+ return(0);
+}
+
+static int
+config_rootpw(ConfigArgs *c) {
+ Backend *tbe;
+ if (c->emit) {
+ if (!BER_BVISEMPTY(&c->be->be_rootpw)) {
+ c->value_string=ch_strdup("*");
+ return 0;
+ }
+ return 1;
+ }
+
+ tbe = select_backend(&c->be->be_rootndn, 0, 0);
+ if(tbe != c->be) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "rootpw can only be set when rootdn is under suffix\n",
+ c->log, 0, 0);
+ return(1);
+ }
+ ber_str2bv(c->value_string, 0, 0, &c->be->be_rootpw);
+ return(0);
+}
+
+static int
+config_restrict(ConfigArgs *c) {
+ slap_mask_t restrictops = 0;
+ int i;
+ slap_verbmasks restrictable_ops[] = {
+ { BER_BVC("bind"), SLAP_RESTRICT_OP_BIND },
+ { BER_BVC("add"), SLAP_RESTRICT_OP_ADD },
+ { BER_BVC("modify"), SLAP_RESTRICT_OP_MODIFY },
+ { BER_BVC("rename"), SLAP_RESTRICT_OP_RENAME },
+ { BER_BVC("modrdn"), 0 },
+ { BER_BVC("delete"), SLAP_RESTRICT_OP_DELETE },
+ { BER_BVC("search"), SLAP_RESTRICT_OP_SEARCH },
+ { BER_BVC("compare"), SLAP_RESTRICT_OP_COMPARE },
+ { BER_BVC("read"), SLAP_RESTRICT_OP_READS },
+ { BER_BVC("write"), SLAP_RESTRICT_OP_WRITES },
+ { BER_BVC("extended"), SLAP_RESTRICT_OP_EXTENDED },
+ { BER_BVC("extended=" LDAP_EXOP_START_TLS ), SLAP_RESTRICT_EXOP_START_TLS },
+ { BER_BVC("extended=" LDAP_EXOP_MODIFY_PASSWD ), SLAP_RESTRICT_EXOP_MODIFY_PASSWD },
+ { BER_BVC("extended=" LDAP_EXOP_X_WHO_AM_I ), SLAP_RESTRICT_EXOP_WHOAMI },
+ { BER_BVC("extended=" LDAP_EXOP_X_CANCEL ), SLAP_RESTRICT_EXOP_CANCEL },
+ { BER_BVNULL, 0 }
+ };
+
+ if (c->emit) {
+ return mask_to_verbs( restrictable_ops, c->be->be_restrictops,
+ &c->rvalue_vals );
+ }
+ i = verbs_to_mask( c->argc, c->argv, restrictable_ops, &restrictops );
+ if ( i ) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "unknown operation %s in \"restrict <features>\" line\n",
+ c->log, c->argv[i], 0);
+ return(1);
+ }
+ if ( restrictops & SLAP_RESTRICT_OP_EXTENDED )
+ restrictops &= ~SLAP_RESTRICT_EXOP_MASK;
+ c->be->be_restrictops |= restrictops;
+ return(0);
+}
+
+static int
+config_allows(ConfigArgs *c) {
+ slap_mask_t allows = 0;
+ int i;
+ slap_verbmasks allowable_ops[] = {
+ { BER_BVC("bind_v2"), SLAP_ALLOW_BIND_V2 },
+ { BER_BVC("bind_anon_cred"), SLAP_ALLOW_BIND_ANON_CRED },
+ { BER_BVC("bind_anon_dn"), SLAP_ALLOW_BIND_ANON_DN },
+ { BER_BVC("update_anon"), SLAP_ALLOW_UPDATE_ANON },
+ { BER_BVNULL, 0 }
+ };
+ if (c->emit) {
+ return mask_to_verbs( allowable_ops, global_allows, &c->rvalue_vals );
+ }
+ i = verbs_to_mask(c->argc, c->argv, allowable_ops, &allows);
+ if ( i ) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "unknown feature %s in \"allow <features>\" line\n",
+ c->log, c->argv[i], 0);
+ return(1);
+ }
+ global_allows |= allows;
+ return(0);
+}
+
+static int
+config_disallows(ConfigArgs *c) {
+ slap_mask_t disallows = 0;
+ int i;
+ slap_verbmasks disallowable_ops[] = {
+ { BER_BVC("bind_anon"), SLAP_DISALLOW_BIND_ANON },
+ { BER_BVC("bind_simple"), SLAP_DISALLOW_BIND_SIMPLE },
+ { BER_BVC("bind_krb4"), SLAP_DISALLOW_BIND_KRBV4 },
+ { BER_BVC("tls_2_anon"), SLAP_DISALLOW_TLS_2_ANON },
+ { BER_BVC("tls_authc"), SLAP_DISALLOW_TLS_AUTHC },
+ { BER_BVNULL, 0 }
+ };
+ if (c->emit) {
+ return mask_to_verbs( disallowable_ops, global_disallows, &c->rvalue_vals );
+ }
+ i = verbs_to_mask(c->argc, c->argv, disallowable_ops, &disallows);
+ if ( i ) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "unknown feature %s in \"disallow <features>\" line\n",
+ c->log, c->argv[i], 0);
+ return(1);
+ }
+ global_disallows |= disallows;
+ return(0);
+}
+
+static int
+config_requires(ConfigArgs *c) {
+ slap_mask_t requires = 0;
+ int i;
+ slap_verbmasks requires_ops[] = {
+ { BER_BVC("bind"), SLAP_REQUIRE_BIND },
+ { BER_BVC("LDAPv3"), SLAP_REQUIRE_LDAP_V3 },
+ { BER_BVC("authc"), SLAP_REQUIRE_AUTHC },
+ { BER_BVC("sasl"), SLAP_REQUIRE_SASL },
+ { BER_BVC("strong"), SLAP_REQUIRE_STRONG },
+ { BER_BVNULL, 0 }
+ };
+ if (c->emit) {
+ return mask_to_verbs( requires_ops, c->be->be_requires, &c->rvalue_vals );
+ }
+ i = verbs_to_mask(c->argc, c->argv, requires_ops, &requires);
+ if ( i ) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "unknown feature %s in \"require <features>\" line\n",
+ c->log, c->argv[i], 0);
+ return(1);
+ }
+ c->be->be_requires = requires;
+ return(0);
+}
+
+static int
+config_loglevel(ConfigArgs *c) {
+ int i;
+ char *next;
+ slap_verbmasks loglevel_ops[] = {
+ { BER_BVC("Trace"), LDAP_DEBUG_TRACE },
+ { BER_BVC("Packets"), LDAP_DEBUG_PACKETS },
+ { BER_BVC("Args"), LDAP_DEBUG_ARGS },
+ { BER_BVC("Conns"), LDAP_DEBUG_CONNS },
+ { BER_BVC("BER"), LDAP_DEBUG_BER },
+ { BER_BVC("Filter"), LDAP_DEBUG_FILTER },
+ { BER_BVC("Config"), LDAP_DEBUG_CONFIG },
+ { BER_BVC("ACL"), LDAP_DEBUG_ACL },
+ { BER_BVC("Stats"), LDAP_DEBUG_STATS },
+ { BER_BVC("Stats2"), LDAP_DEBUG_STATS2 },
+ { BER_BVC("Shell"), LDAP_DEBUG_SHELL },
+ { BER_BVC("Parse"), LDAP_DEBUG_PARSE },
+ { BER_BVC("Cache"), LDAP_DEBUG_CACHE },
+ { BER_BVC("Index"), LDAP_DEBUG_INDEX },
+ { BER_BVC("Any"), -1 },
+ { BER_BVNULL, 0 }
+ };
+
+ if (c->emit) {
+ return mask_to_verbs( loglevel_ops, ldap_syslog, &c->rvalue_vals );
+ }
+
+ ldap_syslog = 0;
+
+ for( i=1; i < c->argc; i++ ) {
+ int level;
+
+ if ( isdigit( c->argv[i][0] ) ) {
+ level = strtol( c->argv[i], &next, 10 );
+ if ( next == NULL || next[0] != '\0' ) {
+ Debug( LDAP_DEBUG_ANY,
+ "%s: unable to parse level \"%s\" "
+ "in \"loglevel <level> [...]\" line.\n",
+ c->log, c->argv[i], 0);
+ return( 1 );
+ }
+ } else {
+ int j = verb_to_mask(c->argv[i], loglevel_ops);
+ if(BER_BVISNULL(&loglevel_ops[j].word)) {
+ Debug( LDAP_DEBUG_ANY,
+ "%s: unknown level \"%s\" "
+ "in \"loglevel <level> [...]\" line.\n",
+ c->log, c->argv[i], 0);
+ return( 1 );
+ }
+ level = loglevel_ops[j].mask;
+ }
+ ldap_syslog |= level;
+ }
+ return(0);
+}
+
+static int
+config_syncrepl(ConfigArgs *c) {
+ if (c->emit) {
+ if ( c->be->be_syncinfo ) {
+ struct berval bv;
+ syncrepl_unparse( c->be->be_syncinfo, &bv );
+ ber_bvarray_add( &c->rvalue_vals, &bv );
+ return 0;
+ }
+ return 1;
+ }
+ if(SLAP_SHADOW(c->be)) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "syncrepl: database already shadowed.\n",
+ c->log, 0, 0);
+ return(1);
+ } else if(add_syncrepl(c->be, c->argv, c->argc)) {
+ return(1);
+ }
+ SLAP_DBFLAGS(c->be) |= (SLAP_DBFLAG_SHADOW | SLAP_DBFLAG_SYNC_SHADOW);
+ return(0);
+}
+
+static int
+config_referral(ConfigArgs *c) {
+ struct berval vals[2];
+ if (c->emit) {
+ if ( default_referral ) {
+ value_add( &c->rvalue_vals, default_referral );
+ return 0;
+ } else {
+ return 1;
+ }
+ }
+ if(validate_global_referral(c->argv[1])) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "invalid URL (%s) in \"referral\" line.\n",
+ c->log, c->argv[1], 0);
+ return(1);
+ }
+
+ ber_str2bv(c->argv[1], 0, 0, &vals[0]);
+ vals[1].bv_val = NULL; vals[1].bv_len = 0;
+ if(value_add(&default_referral, vals)) return(LDAP_OTHER);
+ return(0);
+}
+
+static struct {
+ struct berval key;
+ int off;
+} sec_keys[] = {
+ { BER_BVC("ssf="), offsetof(slap_ssf_set_t, sss_ssf) },
+ { BER_BVC("transport="), offsetof(slap_ssf_set_t, sss_transport) },
+ { BER_BVC("tls="), offsetof(slap_ssf_set_t, sss_tls) },
+ { BER_BVC("sasl="), offsetof(slap_ssf_set_t, sss_sasl) },
+ { BER_BVC("update_ssf="), offsetof(slap_ssf_set_t, sss_update_ssf) },
+ { BER_BVC("update_transport="), offsetof(slap_ssf_set_t, sss_update_transport) },
+ { BER_BVC("update_tls="), offsetof(slap_ssf_set_t, sss_update_tls) },
+ { BER_BVC("update_sasl="), offsetof(slap_ssf_set_t, sss_update_sasl) },
+ { BER_BVC("simple_bind="), offsetof(slap_ssf_set_t, sss_simple_bind) },
+ { BER_BVNULL, 0 }
+};
+
+static int
+config_security(ConfigArgs *c) {
+ slap_ssf_set_t *set = &c->be->be_ssf_set;
+ char *next;
+ int i, j;
+ if (c->emit) {
+ char numbuf[32];
+ struct berval bv;
+ slap_ssf_t *tgt;
+ int rc = 1;
+
+ for (i=0; !BER_BVISNULL( &sec_keys[i].key ); i++) {
+ tgt = (slap_ssf_t *)((char *)set + sec_keys[i].off);
+ if ( *tgt ) {
+ rc = 0;
+ bv.bv_len = sprintf( numbuf, "%u", *tgt );
+ bv.bv_len += sec_keys[i].key.bv_len;
+ bv.bv_val = ch_malloc( bv.bv_len + 1);
+ next = lutil_strcopy( bv.bv_val, sec_keys[i].key.bv_val );
+ strcpy( next, numbuf );
+ ber_bvarray_add( &c->rvalue_vals, &bv );
+ }
+ }
+ return rc;
+ }
+ for(i = 1; i < c->argc; i++) {
+ slap_ssf_t *tgt = NULL;
+ char *src;
+ for ( j=0; !BER_BVISNULL( &sec_keys[j].key ); j++ ) {
+ if(!strncasecmp(c->argv[i], sec_keys[j].key.bv_val,
+ sec_keys[j].key.bv_len)) {
+ src = c->argv[i] + sec_keys[j].key.bv_len;
+ tgt = (slap_ssf_t *)((char *)set + sec_keys[j].off);
+ break;
+ }
+ }
+ if ( !tgt ) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "unknown factor %s in \"security <factors>\" line\n",
+ c->log, c->argv[i], 0);
+ return(1);
+ }
+
+ *tgt = strtol(src, &next, 10);
+ if(next == NULL || next[0] != '\0' ) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "unable to parse factor \"%s\" in \"security <factors>\" line\n",
+ c->log, c->argv[i], 0);
+ return(1);
+ }
+ }
+ return(0);
+}
+
+static char *
+anlist_unparse( AttributeName *an, char *ptr ) {
+ int comma = 0;
+
+ for (; !BER_BVISNULL( &an->an_name ); an++) {
+ if ( comma ) *ptr++ = ',';
+ ptr = lutil_strcopy( ptr, an->an_name.bv_val );
+ comma = 1;
+ }
+ return ptr;
+}
+
+static void
+replica_unparse( struct slap_replica_info *ri, int i, struct berval *bv )
+{
+ int len;
+ char *ptr;
+ struct berval bc = {0};
+ char numbuf[32];
+
+ len = sprintf(numbuf, "{%d}", i );
+
+ len += strlen( ri->ri_uri ) + STRLENOF("uri=");
+ if ( ri->ri_nsuffix ) {
+ for (i=0; !BER_BVISNULL( &ri->ri_nsuffix[i] ); i++) {
+ len += ri->ri_nsuffix[i].bv_len + STRLENOF(" suffix=\"\"");
+ }
+ }
+ if ( ri->ri_attrs ) {
+ len += STRLENOF("attr");
+ if ( ri->ri_exclude ) len++;
+ for (i=0; !BER_BVISNULL( &ri->ri_attrs[i].an_name ); i++) {
+ len += 1 + ri->ri_attrs[i].an_name.bv_len;
+ }
+ }
+ bindconf_unparse( &ri->ri_bindconf, &bc );
+ len += bc.bv_len;
+
+ bv->bv_val = ch_malloc(len + 1);
+ bv->bv_len = len;
+
+ ptr = lutil_strcopy( bv->bv_val, numbuf );
+ ptr = lutil_strcopy( ptr, "uri=" );
+ ptr = lutil_strcopy( ptr, ri->ri_uri );
+
+ if ( ri->ri_nsuffix ) {
+ for (i=0; !BER_BVISNULL( &ri->ri_nsuffix[i] ); i++) {
+ ptr = lutil_strcopy( ptr, " suffix=\"" );
+ ptr = lutil_strcopy( ptr, ri->ri_nsuffix[i].bv_val );
+ *ptr++ = '"';
+ }
+ }
+ if ( ri->ri_attrs ) {
+ ptr = lutil_strcopy( ptr, "attr" );
+ if ( ri->ri_exclude ) *ptr++ = '!';
+ *ptr++ = '=';
+ ptr = anlist_unparse( ri->ri_attrs, ptr );
+ }
+ if ( bc.bv_val ) {
+ strcpy( ptr, bc.bv_val );
+ ch_free( bc.bv_val );
+ }
+}
+
+static int
+config_replica(ConfigArgs *c) {
+ int i, nr = -1, len;
+ char *replicahost, *replicauri;
+ LDAPURLDesc *ludp;
+
+ if (c->emit) {
+ if (c->be->be_replica) {
+ struct berval bv;
+ for (i=0;c->be->be_replica[i]; i++) {
+ replica_unparse( c->be->be_replica[i], i, &bv );
+ ber_bvarray_add( &c->rvalue_vals, &bv );
+ }
+ return 0;
+ }
+ return 1;
+ }
+ if(SLAP_MONITOR(c->be)) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "\"replica\" should not be used inside monitor database\n",
+ c->log, 0, 0);
+ return(0); /* FIXME: should this be an error? */
+ }
+
+ for(i = 1; i < c->argc; i++) {
+ if(!strncasecmp(c->argv[i], "host=", STRLENOF("host="))) {
+ replicahost = c->argv[i] + STRLENOF("host=");
+ len = strlen( replicahost );
+ replicauri = ch_malloc( len + STRLENOF("ldap://") + 1 );
+ sprintf( replicauri, "ldap://%s", replicahost );
+ replicahost = replicauri + STRLENOF( "ldap://");
+ nr = add_replica_info(c->be, replicauri, replicahost);
+ break;
+ } else if(!strncasecmp(c->argv[i], "uri=", STRLENOF("uri="))) {
+ if(ldap_url_parse(c->argv[i] + STRLENOF("uri="), &ludp) != LDAP_SUCCESS) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "replica line contains invalid "
+ "uri definition.\n", c->log, 0, 0);
+ return(1);
+ }
+ if(!ludp->lud_host) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "replica line contains invalid "
+ "uri definition - missing hostname.\n",
+ c->log, 0, 0);
+ return(1);
+ }
+ ldap_free_urldesc(ludp);
+ replicauri = c->argv[i] + STRLENOF("uri=");
+ replicauri = ch_strdup( replicauri );
+ replicahost = strchr( replicauri, '/' );
+ replicahost += 2;
+ nr = add_replica_info(c->be, replicauri, replicahost);
+ break;
+ }
+ }
+ if(i == c->argc) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "missing host or uri in \"replica\" line\n",
+ c->log, 0, 0);
+ return(1);
+ } else if(nr == -1) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "unable to add replica \"%s\"\n",
+ c->log, replicauri, 0);
+ return(1);
+ } else {
+ for(i = 1; i < c->argc; i++) {
+ if(!strncasecmp(c->argv[i], "suffix=", STRLENOF( "suffix="))) {
+ switch(add_replica_suffix(c->be, nr, c->argv[i] + STRLENOF("suffix="))) {
+ case 1:
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "suffix \"%s\" in \"replica\" line is not valid for backend (ignored)\n",
+ c->log, c->argv[i] + STRLENOF("suffix="), 0);
+ break;
+ case 2:
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "unable to normalize suffix in \"replica\" line (ignored)\n",
+ c->log, 0, 0);
+ break;
+ }
+
+ } else if(!strncasecmp(c->argv[i], "attr", STRLENOF("attr"))) {
+ int exclude = 0;
+ char *arg = c->argv[i] + STRLENOF("attr");
+ if(arg[0] == '!') {
+ arg++;
+ exclude = 1;
+ }
+ if(arg[0] != '=') {
+ continue;
+ }
+ if(add_replica_attrs(c->be, nr, arg + 1, exclude)) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "attribute \"%s\" in \"replica\" line is unknown\n",
+ c->log, arg + 1, 0);
+ return(1);
+ }
+ } else if ( bindconf_parse( c->argv[i],
+ &c->be->be_replica[nr]->ri_bindconf ) ) {
+ return(1);
+ }
+ }
+ }
+ return(0);
+}
+
+static int
+config_updatedn(ConfigArgs *c) {
+ struct berval dn;
+ int rc;
+ if (c->emit) {
+ if (!BER_BVISEMPTY(&c->be->be_update_ndn)) {
+ value_add_one(&c->rvalue_vals, &c->be->be_update_ndn);
+ value_add_one(&c->rvalue_nvals, &c->be->be_update_ndn);
+ return 0;
+ }
+ return 1;
+ }
+ if(SLAP_SHADOW(c->be)) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "updatedn: database already shadowed.\n",
+ c->log, 0, 0);
+ return(1);
+ }
+
+ ber_str2bv(c->argv[1], 0, 0, &dn);
+
+ rc = dnNormalize(0, NULL, NULL, &dn, &c->be->be_update_ndn, NULL);
+
+ if(rc != LDAP_SUCCESS) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "updatedn DN is invalid: %d (%s)\n",
+ c->log, rc, ldap_err2string( rc ));
+ return(1);
+ }
+
+ SLAP_DBFLAGS(c->be) |= (SLAP_DBFLAG_SHADOW | SLAP_DBFLAG_SLURP_SHADOW);
+ return(0);
+}
+
+static int
+config_updateref(ConfigArgs *c) {
+ struct berval vals[2];
+ if (c->emit) {
+ if ( c->be->be_update_refs ) {
+ value_add( &c->rvalue_vals, c->be->be_update_refs );
+ return 0;
+ } else {
+ return 1;
+ }
+ }
+ if(!SLAP_SHADOW(c->be)) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "updateref line must come after syncrepl or updatedn.\n",
+ c->log, 0, 0);
+ return(1);
+ }
+
+ if(validate_global_referral(c->argv[1])) {
+ Debug(LDAP_DEBUG_ANY, "%s: "
+ "invalid URL (%s) in \"updateref\" line.\n",
+ c->log, c->argv[1], 0);
+ return(1);
+ }
+ ber_str2bv(c->argv[1], 0, 0, &vals[0]);
+ vals[1].bv_val = NULL;
+ if(value_add(&c->be->be_update_refs, vals)) return(LDAP_OTHER);
+ return(0);
+}
+
+static int
+config_include(ConfigArgs *c) {
+ unsigned long savelineno = c->lineno;
+ int rc;
+ ConfigFile *cf;
+ ConfigFile *cfsave = cfn;
+ ConfigFile *cf2 = NULL;
+ if (c->emit) {
+ return 1;
+ }
+ cf = ch_calloc( 1, sizeof(ConfigFile));
+#ifdef SLAPD_MODULES
+ cf->c_modlast = &cf->c_modpaths;
+#endif
+ if ( cfn->c_kids ) {
+ for (cf2=cfn->c_kids; cf2 && cf2->c_sibs; cf2=cf2->c_sibs) ;
+ cf2->c_sibs = cf;
+ } else {
+ cfn->c_kids = cf;
+ }
+ cfn = cf;
+ rc = read_config_file(c->argv[1], c->depth + 1, c);
+ c->lineno = savelineno - 1;
+ cfn = cfsave;
+ if ( rc ) {
+ if ( cf2 ) cf2->c_sibs = NULL;
+ else cfn->c_kids = NULL;
+ ch_free( cf );
+ } else {
+ ber_str2bv( c->argv[1], 0, 1, &cf->c_file );
+ }
+ return(rc);
+}
+
+#ifdef HAVE_TLS
+static int
+config_tls_option(ConfigArgs *c) {
+ int flag;
+ switch(c->type) {
+ case CFG_TLS_RAND: flag = LDAP_OPT_X_TLS_RANDOM_FILE; break;
+ case CFG_TLS_CIPHER: flag = LDAP_OPT_X_TLS_CIPHER_SUITE; break;
+ case CFG_TLS_CERT_FILE: flag = LDAP_OPT_X_TLS_CERTFILE; break;
+ case CFG_TLS_CERT_KEY: flag = LDAP_OPT_X_TLS_KEYFILE; break;
+ case CFG_TLS_CA_PATH: flag = LDAP_OPT_X_TLS_CACERTDIR; break;
+ case CFG_TLS_CA_FILE: flag = LDAP_OPT_X_TLS_CACERTFILE; break;
+ default: Debug(LDAP_DEBUG_ANY, "%s: "
+ "unknown tls_option <%x>\n",
+ c->log, c->type, 0);
+ }
+ if (c->emit) {
+ return ldap_pvt_tls_get_option( NULL, flag, &c->value_string );
+ }
+ ch_free(c->value_string);
+ return(ldap_pvt_tls_set_option(NULL, flag, c->argv[1]));
+}
+
+/* FIXME: this ought to be provided by libldap */
+static int
+config_tls_config(ConfigArgs *c) {
+ int i, flag;
+ slap_verbmasks crlkeys[] = {
+ { BER_BVC("none"), LDAP_OPT_X_TLS_CRL_NONE },
+ { BER_BVC("peer"), LDAP_OPT_X_TLS_CRL_PEER },
+ { BER_BVC("all"), LDAP_OPT_X_TLS_CRL_ALL },
+ { BER_BVNULL, 0 }
+ };
+ slap_verbmasks vfykeys[] = {
+ { BER_BVC("never"), LDAP_OPT_X_TLS_NEVER },
+ { BER_BVC("demand"), LDAP_OPT_X_TLS_DEMAND },
+ { BER_BVC("try"), LDAP_OPT_X_TLS_TRY },
+ { BER_BVC("hard"), LDAP_OPT_X_TLS_HARD },
+ { BER_BVNULL, 0 }
+ }, *keys;
+ switch(c->type) {
+#ifdef HAVE_OPENSSL_CRL
+ case CFG_TLS_CRLCHECK: flag = LDAP_OPT_X_TLS_CRLCHECK; keys = crlkeys;
+ break;
+#endif
+ case CFG_TLS_VERIFY: flag = LDAP_OPT_X_TLS_REQUIRE_CERT; keys = vfykeys;
+ break;
+ default: Debug(LDAP_DEBUG_ANY, "%s: "
+ "unknown tls_option <%x>\n",
+ c->log, c->type, 0);
+ }
+ if (c->emit) {
+ ldap_pvt_tls_get_option( NULL, flag, &c->value_int );
+ for (i=0; !BER_BVISNULL(&keys[i].word); i++) {
+ if (keys[i].mask == c->value_int) {
+ c->value_string = ch_strdup( keys[i].word.bv_val );
+ return 0;
+ }
+ }
+ return 1;
+ }
+ ch_free( c->value_string );
+ if(isdigit((unsigned char)c->argv[1][0])) {
+ i = atoi(c->argv[1]);
+ return(ldap_pvt_tls_set_option(NULL, flag, &i));
+ } else {
+ return(ldap_int_tls_config(NULL, flag, c->argv[1]));
+ }
+}
+#endif
+
+static int
+add_syncrepl(
+ Backend *be,
+ char **cargv,
+ int cargc
+)
+{
+ syncinfo_t *si;
+ int rc = 0;
+
+ si = (syncinfo_t *) ch_calloc( 1, sizeof( syncinfo_t ) );
+
+ if ( si == NULL ) {
+ Debug( LDAP_DEBUG_ANY, "out of memory in add_syncrepl\n", 0, 0, 0 );
+ return 1;
+ }
+
+ si->si_bindconf.sb_tls = SB_TLS_OFF;
+ si->si_bindconf.sb_method = LDAP_AUTH_SIMPLE;
+ si->si_schemachecking = 0;
+ ber_str2bv( "(objectclass=*)", STRLENOF("(objectclass=*)"), 1,
+ &si->si_filterstr );
+ si->si_base.bv_val = NULL;
+ si->si_scope = LDAP_SCOPE_SUBTREE;
+ si->si_attrsonly = 0;
+ si->si_anlist = (AttributeName *) ch_calloc( 1, sizeof( AttributeName ));
+ si->si_exanlist = (AttributeName *) ch_calloc( 1, sizeof( AttributeName ));
+ si->si_attrs = NULL;
+ si->si_allattrs = 0;
+ si->si_allopattrs = 0;
+ si->si_exattrs = NULL;
+ si->si_type = LDAP_SYNC_REFRESH_ONLY;
+ si->si_interval = 86400;
+ si->si_retryinterval = NULL;
+ si->si_retrynum_init = NULL;
+ si->si_retrynum = NULL;
+ si->si_manageDSAit = 0;
+ si->si_tlimit = 0;
+ si->si_slimit = 0;
+
+ si->si_presentlist = NULL;
+ LDAP_LIST_INIT( &si->si_nonpresentlist );
+ ldap_pvt_thread_mutex_init( &si->si_mutex );
+
+ rc = parse_syncrepl_line( cargv, cargc, si );
+
+ if ( rc < 0 ) {
+ Debug( LDAP_DEBUG_ANY, "failed to add syncinfo\n", 0, 0, 0 );
+ syncinfo_free( si );
+ return 1;
+ } else {
+ Debug( LDAP_DEBUG_CONFIG,
+ "Config: ** successfully added syncrepl \"%s\"\n",
+ BER_BVISNULL( &si->si_provideruri ) ?
+ "(null)" : si->si_provideruri.bv_val, 0, 0 );
+ if ( !si->si_schemachecking ) {
+ SLAP_DBFLAGS(be) |= SLAP_DBFLAG_NO_SCHEMA_CHECK;
+ }
+ si->si_be = be;
+ be->be_syncinfo = si;
+ return 0;
+ }
+}
+
+/* NOTE: used & documented in slapd.conf(5) */
+#define IDSTR "rid"
+#define PROVIDERSTR "provider"
+#define TYPESTR "type"
+#define INTERVALSTR "interval"
+#define SEARCHBASESTR "searchbase"
+#define FILTERSTR "filter"
+#define SCOPESTR "scope"
+#define ATTRSSTR "attrs"
+#define ATTRSONLYSTR "attrsonly"
+#define SLIMITSTR "sizelimit"
+#define TLIMITSTR "timelimit"
+#define SCHEMASTR "schemachecking"
+
+/* FIXME: undocumented */
+#define OLDAUTHCSTR "bindprincipal"
+#define EXATTRSSTR "exattrs"
+#define RETRYSTR "retry"
+
+/* FIXME: unused */
+#define LASTMODSTR "lastmod"
+#define LMGENSTR "gen"
+#define LMNOSTR "no"
+#define LMREQSTR "req"
+#define SRVTABSTR "srvtab"
+#define SUFFIXSTR "suffix"
+#define MANAGEDSAITSTR "manageDSAit"
+
+/* mandatory */
+#define GOT_ID 0x0001
+#define GOT_PROVIDER 0x0002
+
+/* check */
+#define GOT_ALL (GOT_ID|GOT_PROVIDER)
+
+static struct {
+ struct berval key;
+ int val;
+} scopes[] = {
+ { BER_BVC("base"), LDAP_SCOPE_BASE },
+ { BER_BVC("one"), LDAP_SCOPE_ONELEVEL },
+#ifdef LDAP_SCOPE_SUBORDINATE
+ { BER_BVC("children"), LDAP_SCOPE_SUBORDINATE },
+ { BER_BVC("subordinate"), 0 },
+#endif
+ { BER_BVC("sub"), LDAP_SCOPE_SUBTREE },
+ { BER_BVNULL, 0 }
+};
+
+static int
+parse_syncrepl_line(
+ char **cargv,
+ int cargc,
+ syncinfo_t *si
+)
+{
+ int gots = 0;
+ int i;
+ char *val;
+
+ for ( i = 1; i < cargc; i++ ) {
+ if ( !strncasecmp( cargv[ i ], IDSTR "=",
+ STRLENOF( IDSTR "=" ) ) )
+ {
+ int tmp;
+ /* '\0' string terminator accounts for '=' */
+ val = cargv[ i ] + STRLENOF( IDSTR "=" );
+ tmp= atoi( val );
+ if ( tmp >= 1000 || tmp < 0 ) {
+ fprintf( stderr, "Error: parse_syncrepl_line: "
+ "syncrepl id %d is out of range [0..999]\n", tmp );
+ return -1;
+ }
+ si->si_rid = tmp;
+ gots |= GOT_ID;
+ } else if ( !strncasecmp( cargv[ i ], PROVIDERSTR "=",
+ STRLENOF( PROVIDERSTR "=" ) ) )
+ {
+ val = cargv[ i ] + STRLENOF( PROVIDERSTR "=" );
+ ber_str2bv( val, 0, 1, &si->si_provideruri );
+ gots |= GOT_PROVIDER;
+ } else if ( !strncasecmp( cargv[ i ], SCHEMASTR "=",
+ STRLENOF( SCHEMASTR "=" ) ) )
+ {
+ val = cargv[ i ] + STRLENOF( SCHEMASTR "=" );
+ if ( !strncasecmp( val, "on", STRLENOF( "on" ) )) {
+ si->si_schemachecking = 1;
+ } else if ( !strncasecmp( val, "off", STRLENOF( "off" ) ) ) {
+ si->si_schemachecking = 0;
+ } else {
+ si->si_schemachecking = 1;
+ }
+ } else if ( !strncasecmp( cargv[ i ], FILTERSTR "=",
+ STRLENOF( FILTERSTR "=" ) ) )
+ {
+ val = cargv[ i ] + STRLENOF( FILTERSTR "=" );
+ ber_str2bv( val, 0, 1, &si->si_filterstr );
+ } else if ( !strncasecmp( cargv[ i ], SEARCHBASESTR "=",
+ STRLENOF( SEARCHBASESTR "=" ) ) )
+ {
+ struct berval bv;
+ int rc;
+
+ val = cargv[ i ] + STRLENOF( SEARCHBASESTR "=" );
+ if ( si->si_base.bv_val ) {
+ ch_free( si->si_base.bv_val );
+ }
+ ber_str2bv( val, 0, 0, &bv );
+ rc = dnNormalize( 0, NULL, NULL, &bv, &si->si_base, NULL );
+ if ( rc != LDAP_SUCCESS ) {
+ fprintf( stderr, "Invalid base DN \"%s\": %d (%s)\n",
+ val, rc, ldap_err2string( rc ) );
+ return -1;
+ }
+ } else if ( !strncasecmp( cargv[ i ], SCOPESTR "=",
+ STRLENOF( SCOPESTR "=" ) ) )
+ {
+ int j;
+ val = cargv[ i ] + STRLENOF( SCOPESTR "=" );
+ for ( j=0; !BER_BVISNULL(&scopes[j].key); j++ ) {
+ if (!strncasecmp( val, scopes[j].key.bv_val,
+ scopes[j].key.bv_len )) {
+ while (!scopes[j].val) j--;
+ si->si_scope = scopes[j].val;
+ break;
+ }
+ }
+ if ( BER_BVISNULL(&scopes[j].key) ) {
+ fprintf( stderr, "Error: parse_syncrepl_line: "
+ "unknown scope \"%s\"\n", val);
+ return -1;
+ }
+ } else if ( !strncasecmp( cargv[ i ], ATTRSONLYSTR "=",
+ STRLENOF( ATTRSONLYSTR "=" ) ) )
+ {
+ si->si_attrsonly = 1;
+ } else if ( !strncasecmp( cargv[ i ], ATTRSSTR "=",
+ STRLENOF( ATTRSSTR "=" ) ) )
+ {
+ val = cargv[ i ] + STRLENOF( ATTRSSTR "=" );
+ if ( !strncasecmp( val, ":include:", STRLENOF(":include:") ) ) {
+ char *attr_fname;
+ attr_fname = ch_strdup( val + STRLENOF(":include:") );
+ si->si_anlist = file2anlist( si->si_anlist, attr_fname, " ,\t" );
+ if ( si->si_anlist == NULL ) {
+ ch_free( attr_fname );
+ return -1;
+ }
+ si->si_anfile = attr_fname;
+ } else {
+ char *str, *s, *next;
+ char delimstr[] = " ,\t";
+ str = ch_strdup( val );
+ for ( s = ldap_pvt_strtok( str, delimstr, &next );
+ s != NULL;
+ s = ldap_pvt_strtok( NULL, delimstr, &next ) )
+ {
+ if ( strlen(s) == 1 && *s == '*' ) {
+ si->si_allattrs = 1;
+ *(val + ( s - str )) = delimstr[0];
+ }
+ if ( strlen(s) == 1 && *s == '+' ) {
+ si->si_allopattrs = 1;
+ *(val + ( s - str )) = delimstr[0];
+ }
+ }
+ ch_free( str );
+ si->si_anlist = str2anlist( si->si_anlist, val, " ,\t" );
+ if ( si->si_anlist == NULL ) {
+ return -1;
+ }
+ }
+ } else if ( !strncasecmp( cargv[ i ], EXATTRSSTR "=",
+ STRLENOF( EXATTRSSTR "=" ) ) )
+ {
+ val = cargv[ i ] + STRLENOF( EXATTRSSTR "=" );
+ if ( !strncasecmp( val, ":include:", STRLENOF(":include:") )) {
+ char *attr_fname;
+ attr_fname = ch_strdup( val + STRLENOF(":include:") );
+ si->si_exanlist = file2anlist(
+ si->si_exanlist, attr_fname, " ,\t" );
+ if ( si->si_exanlist == NULL ) {
+ ch_free( attr_fname );
+ return -1;
+ }
+ ch_free( attr_fname );
+ } else {
+ si->si_exanlist = str2anlist( si->si_exanlist, val, " ,\t" );
+ if ( si->si_exanlist == NULL ) {
+ return -1;
+ }
+ }
+ } else if ( !strncasecmp( cargv[ i ], TYPESTR "=",
+ STRLENOF( TYPESTR "=" ) ) )
+ {
+ val = cargv[ i ] + STRLENOF( TYPESTR "=" );
+ if ( !strncasecmp( val, "refreshOnly",
+ STRLENOF("refreshOnly") ))
+ {
+ si->si_type = LDAP_SYNC_REFRESH_ONLY;
+ } else if ( !strncasecmp( val, "refreshAndPersist",
+ STRLENOF("refreshAndPersist") ))
+ {
+ si->si_type = LDAP_SYNC_REFRESH_AND_PERSIST;
+ si->si_interval = 60;
+ } else {
+ fprintf( stderr, "Error: parse_syncrepl_line: "
+ "unknown sync type \"%s\"\n", val);
+ return -1;
+ }
+ } else if ( !strncasecmp( cargv[ i ], INTERVALSTR "=",
+ STRLENOF( INTERVALSTR "=" ) ) )
+ {
+ val = cargv[ i ] + STRLENOF( INTERVALSTR "=" );
+ if ( si->si_type == LDAP_SYNC_REFRESH_AND_PERSIST ) {
+ si->si_interval = 0;
+ } else {
+ char *hstr;
+ char *mstr;
+ char *dstr;
+ char *sstr;
+ int dd, hh, mm, ss;
+ dstr = val;
+ hstr = strchr( dstr, ':' );
+ if ( hstr == NULL ) {
+ fprintf( stderr, "Error: parse_syncrepl_line: "
+ "invalid interval \"%s\"\n", val );
+ return -1;
+ }
+ *hstr++ = '\0';
+ mstr = strchr( hstr, ':' );
+ if ( mstr == NULL ) {
+ fprintf( stderr, "Error: parse_syncrepl_line: "
+ "invalid interval \"%s\"\n", val );
+ return -1;
+ }
+ *mstr++ = '\0';
+ sstr = strchr( mstr, ':' );
+ if ( sstr == NULL ) {
+ fprintf( stderr, "Error: parse_syncrepl_line: "
+ "invalid interval \"%s\"\n", val );
+ return -1;
+ }
+ *sstr++ = '\0';
+
+ dd = atoi( dstr );
+ hh = atoi( hstr );
+ mm = atoi( mstr );
+ ss = atoi( sstr );
+ if (( hh > 24 ) || ( hh < 0 ) ||
+ ( mm > 60 ) || ( mm < 0 ) ||
+ ( ss > 60 ) || ( ss < 0 ) || ( dd < 0 )) {
+ fprintf( stderr, "Error: parse_syncrepl_line: "
+ "invalid interval \"%s\"\n", val );
+ return -1;
+ }
+ si->si_interval = (( dd * 24 + hh ) * 60 + mm ) * 60 + ss;
+ }
+ if ( si->si_interval < 0 ) {
+ fprintf( stderr, "Error: parse_syncrepl_line: "
+ "invalid interval \"%ld\"\n",
+ (long) si->si_interval);
+ return -1;
+ }
+ } else if ( !strncasecmp( cargv[ i ], RETRYSTR "=",
+ STRLENOF( RETRYSTR "=" ) ) )
+ {
+ char **retry_list;
+ int j, k, n;
+
+ val = cargv[ i ] + STRLENOF( RETRYSTR "=" );
+ retry_list = (char **) ch_calloc( 1, sizeof( char * ));
+ retry_list[0] = NULL;
+
+ slap_str2clist( &retry_list, val, " ,\t" );
+
+ for ( k = 0; retry_list && retry_list[k]; k++ ) ;
+ n = k / 2;
+ if ( k % 2 ) {
+ fprintf( stderr,
+ "Error: incomplete syncrepl retry list\n" );
+ for ( k = 0; retry_list && retry_list[k]; k++ ) {
+ ch_free( retry_list[k] );
+ }
+ ch_free( retry_list );
+ exit( EXIT_FAILURE );
+ }
+ si->si_retryinterval = (time_t *) ch_calloc( n + 1, sizeof( time_t ));
+ si->si_retrynum = (int *) ch_calloc( n + 1, sizeof( int ));
+ si->si_retrynum_init = (int *) ch_calloc( n + 1, sizeof( int ));
+ for ( j = 0; j < n; j++ ) {
+ si->si_retryinterval[j] = atoi( retry_list[j*2] );
+ if ( *retry_list[j*2+1] == '+' ) {
+ si->si_retrynum_init[j] = -1;
+ si->si_retrynum[j] = -1;
+ j++;
+ break;
+ } else {
+ si->si_retrynum_init[j] = atoi( retry_list[j*2+1] );
+ si->si_retrynum[j] = atoi( retry_list[j*2+1] );
+ }
+ }
+ si->si_retrynum_init[j] = -2;
+ si->si_retrynum[j] = -2;
+ si->si_retryinterval[j] = 0;
+
+ for ( k = 0; retry_list && retry_list[k]; k++ ) {
+ ch_free( retry_list[k] );
+ }
+ ch_free( retry_list );
+ } else if ( !strncasecmp( cargv[ i ], MANAGEDSAITSTR "=",
+ STRLENOF( MANAGEDSAITSTR "=" ) ) )
+ {
+ val = cargv[ i ] + STRLENOF( MANAGEDSAITSTR "=" );
+ si->si_manageDSAit = atoi( val );
+ } else if ( !strncasecmp( cargv[ i ], SLIMITSTR "=",
+ STRLENOF( SLIMITSTR "=") ) )
+ {
+ val = cargv[ i ] + STRLENOF( SLIMITSTR "=" );
+ si->si_slimit = atoi( val );
+ } else if ( !strncasecmp( cargv[ i ], TLIMITSTR "=",
+ STRLENOF( TLIMITSTR "=" ) ) )
+ {
+ val = cargv[ i ] + STRLENOF( TLIMITSTR "=" );
+ si->si_tlimit = atoi( val );
+ } else if ( bindconf_parse( cargv[i], &si->si_bindconf )) {
+ fprintf( stderr, "Error: parse_syncrepl_line: "
+ "unknown keyword \"%s\"\n", cargv[ i ] );
+ return -1;
+ }
+ }
+
+ if ( gots != GOT_ALL ) {
+ fprintf( stderr,
+ "Error: Malformed \"syncrepl\" line in slapd config file" );
+ return -1;
+ }
+
+ return 0;
+}
+
+static void
+syncrepl_unparse( syncinfo_t *si, struct berval *bv )
+{
+ struct berval bc;
+ char buf[BUFSIZ*2], *ptr;
+ int i, len;
+
+ bindconf_unparse( &si->si_bindconf, &bc );
+ ptr = buf;
+ ptr += sprintf( ptr, IDSTR "=%03d " PROVIDERSTR "=%s",
+ si->si_rid, si->si_provideruri.bv_val );
+ if ( !BER_BVISNULL( &bc )) {
+ ptr = lutil_strcopy( ptr, bc.bv_val );
+ free( bc.bv_val );
+ }
+ if ( !BER_BVISEMPTY( &si->si_filterstr )) {
+ ptr = lutil_strcopy( ptr, " " FILTERSTR "=\"" );
+ ptr = lutil_strcopy( ptr, si->si_filterstr.bv_val );
+ *ptr++ = '"';
+ }
+ if ( !BER_BVISNULL( &si->si_base )) {
+ ptr = lutil_strcopy( ptr, " " SEARCHBASESTR "=\"" );
+ ptr = lutil_strcopy( ptr, si->si_base.bv_val );
+ *ptr++ = '"';
+ }
+ for (i=0; !BER_BVISNULL(&scopes[i].key);i++) {
+ if ( si->si_scope == scopes[i].val ) {
+ ptr = lutil_strcopy( ptr, " " SCOPESTR "=" );
+ ptr = lutil_strcopy( ptr, scopes[i].key.bv_val );
+ break;
+ }
+ }
+ if ( si->si_attrsonly ) {
+ ptr = lutil_strcopy( ptr, " " ATTRSONLYSTR "=yes" );
+ }
+ if ( si->si_anfile ) {
+ ptr = lutil_strcopy( ptr, " " ATTRSSTR "=:include:" );
+ ptr = lutil_strcopy( ptr, si->si_anfile );
+ } else if ( si->si_allattrs || si->si_allopattrs ||
+ ( si->si_anlist && !BER_BVISNULL(&si->si_anlist[0].an_name) )) {
+ char *old;
+ ptr = lutil_strcopy( ptr, " " ATTRSSTR "=\"" );
+ old = ptr;
+ ptr = anlist_unparse( si->si_anlist, ptr );
+ if ( si->si_allattrs ) {
+ if ( old != ptr ) *ptr++ = ',';
+ *ptr++ = '*';
+ }
+ if ( si->si_allopattrs ) {
+ if ( old != ptr ) *ptr++ = ',';
+ *ptr++ = '+';
+ }
+ *ptr++ = '"';
+ }
+ if ( si->si_exanlist && !BER_BVISNULL(&si->si_exanlist[0].an_name) ) {
+ ptr = lutil_strcopy( ptr, " " EXATTRSSTR "=" );
+ ptr = anlist_unparse( si->si_exanlist, ptr );
+ }
+ ptr = lutil_strcopy( ptr, " " SCHEMASTR "=" );
+ ptr = lutil_strcopy( ptr, si->si_schemachecking ? "on" : "off" );
+
+ ptr = lutil_strcopy( ptr, " " TYPESTR "=" );
+ ptr = lutil_strcopy( ptr, si->si_type == LDAP_SYNC_REFRESH_AND_PERSIST ?
+ "refreshAndPersist" : "refreshOnly" );
+
+ if ( si->si_type == LDAP_SYNC_REFRESH_ONLY ) {
+ int dd, hh, mm, ss;
+
+ dd = si->si_interval;
+ ss = dd % 60;
+ dd /= 60;
+ mm = dd % 60;
+ dd /= 60;
+ hh = dd % 24;
+ dd /= 24;
+ ptr = lutil_strcopy( ptr, " " INTERVALSTR "=" );
+ ptr += sprintf( ptr, "%02d:%02d:%02d:%02d", dd, hh, mm, ss );
+ } else if ( si->si_retryinterval ) {
+ int space=0;
+ ptr = lutil_strcopy( ptr, " " RETRYSTR "=\"" );
+ for (i=0; si->si_retryinterval[i]; i++) {
+ if ( space ) *ptr++ = ' ';
+ space = 1;
+ ptr += sprintf( ptr, "%d", si->si_retryinterval[i] );
+ if ( si->si_retrynum_init[i] == -1 )
+ *ptr++ = '+';
+ else
+ ptr += sprintf( ptr, "%d", si->si_retrynum_init );
+ }
+ *ptr++ = '"';
+ }
+
+#if 0 /* FIXME: unused in syncrepl.c, should remove it */
+ ptr = lutil_strcopy( ptr, " " MANAGEDSAITSTR "=" );
+ ptr += sprintf( ptr, "%d", si->si_manageDSAit );
+#endif
+
+ if ( si->si_slimit ) {
+ ptr = lutil_strcopy( ptr, " " SLIMITSTR "=" );
+ ptr += sprintf( ptr, "%d", si->si_slimit );
+ }
+
+ if ( si->si_tlimit ) {
+ ptr = lutil_strcopy( ptr, " " TLIMITSTR "=" );
+ ptr += sprintf( ptr, "%d", si->si_tlimit );
+ }
+ bc.bv_len = ptr - buf;
+ bc.bv_val = buf;
+ ber_dupbv( bv, &bc );
+}
+
+
+int
+read_config(const char *fname, int depth) {
+
+ if ( !backend_db_init( "config" ))
+ return 1;
+
+ ber_str2bv( fname, 0, 1, &cf_prv.c_file );
+ return read_config_file(fname, depth, NULL);
+}
+
+static int
+config_back_bind( Operation *op, SlapReply *rs )
+{
+ if ( op->orb_method == LDAP_AUTH_SIMPLE && be_isroot_pw( op )) {
+ ber_dupbv( &op->orb_edn, be_root_dn( op->o_bd ));
+ /* frontend sends result */
+ return LDAP_SUCCESS;
+ }
+
+ rs->sr_err = LDAP_INVALID_CREDENTIALS;
+ send_ldap_result( op, rs );
+
+ return rs->sr_err;
+}
+
+static CfEntryInfo *
+config_find_base( CfEntryInfo *root, struct berval *dn, CfEntryInfo **last )
+{
+ struct berval cdn;
+ char *c;
+
+ if ( dn_match( &root->ce_entry->e_nname, dn ))
+ return root;
+
+ c = dn->bv_val+dn->bv_len;
+ for (;*c != ',';c--);
+
+ while(root) {
+ *last = root;
+ for (--c;c>dn->bv_val && *c != ',';c--);
+ if ( *c == ',' )
+ c++;
+ cdn.bv_val = c;
+ cdn.bv_len = dn->bv_len - (c-dn->bv_val);
+
+ root = root->ce_kids;
+
+ for (;root;root=root->ce_sibs) {
+ if ( dn_match( &root->ce_entry->e_nname, &cdn )) {
+ if ( cdn.bv_val == dn->bv_val ) {
+ return root;
+ }
+ break;
+ }
+ }
+ }
+ return root;
+}
+
+static int
+config_send( Operation *op, SlapReply *rs, CfEntryInfo *ce, int depth )
+{
+ int rc = 0;
+
+ if ( test_filter( op, ce->ce_entry, op->ors_filter ) == LDAP_COMPARE_TRUE )
+ {
+ rs->sr_attrs = op->ors_attrs;
+ rs->sr_entry = ce->ce_entry;
+ rc = send_search_entry( op, rs );
+ }
+ if ( op->ors_scope == LDAP_SCOPE_SUBTREE ) {
+ if ( ce->ce_kids ) {
+ rc = config_send( op, rs, ce->ce_kids, 1 );
+ if ( rc ) return rc;
+ }
+ if ( depth ) {
+ for (ce=ce->ce_sibs; ce; ce=ce->ce_sibs) {
+ rc = config_send( op, rs, ce, 0 );
+ if ( rc ) break;
+ }
+ }
+ }
+ return rc;
+}
+
+static int
+config_back_modify( Operation *op, SlapReply *rs )
+{
+ CfBackInfo *cfb;
+ CfEntryInfo *ce, *last;
+
+ if ( !be_isroot( op ) ) {
+ rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
+ send_ldap_result( op, rs );
+ }
+
+ cfb = (CfBackInfo *)op->o_bd->be_private;
+
+ ce = config_find_base( cfb->cb_root, &op->o_req_ndn, &last );
+ if ( !ce ) {
+ if ( last )
+ rs->sr_matched = last->ce_entry->e_name.bv_val;
+ rs->sr_err = LDAP_NO_SUCH_OBJECT;
+ goto out;
+ }
+ ldap_pvt_thread_pool_pause( &connection_pool );
+ ldap_pvt_thread_pool_resume( &connection_pool );
+out:
+ send_ldap_result( op, rs );
+ return rs->sr_err;
+}
+
+static int
+config_back_search( Operation *op, SlapReply *rs )
+{
+ CfBackInfo *cfb;
+ CfEntryInfo *ce, *last;
+ int rc;
+
+ if ( !be_isroot( op ) ) {
+ rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
+ send_ldap_result( op, rs );
+ }
+
+ cfb = (CfBackInfo *)op->o_bd->be_private;
+
+ ce = config_find_base( cfb->cb_root, &op->o_req_ndn, &last );
+ if ( !ce ) {
+ if ( last )
+ rs->sr_matched = last->ce_entry->e_name.bv_val;
+ rs->sr_err = LDAP_NO_SUCH_OBJECT;
+ goto out;
+ }
+ switch ( op->ors_scope ) {
+ case LDAP_SCOPE_BASE:
+ case LDAP_SCOPE_SUBTREE:
+ config_send( op, rs, ce, 0 );
+ break;
+
+ case LDAP_SCOPE_ONELEVEL:
+ for (ce = ce->ce_kids; ce; ce=ce->ce_sibs) {
+ config_send( op, rs, ce, 1 );
+ }
+ break;
+ }
+
+ rs->sr_err = LDAP_SUCCESS;
+out:
+ send_ldap_result( op, rs );
+ return 0;
+}
+
+static Entry *
+config_alloc_entry( struct berval *pdn, struct berval *rdn )
+{
+ Entry *e = ch_calloc( 1, sizeof(Entry) );
+ CfEntryInfo *ce = ch_calloc( 1, sizeof(CfEntryInfo) );
+ e->e_private = ce;
+ ce->ce_entry = e;
+ build_new_dn( &e->e_name, pdn, rdn, NULL );
+ ber_dupbv( &e->e_nname, &e->e_name );
+ return e;
+}
+
+#define NO_TABLE 0
+#define BI_TABLE 1
+#define BE_TABLE 2
+
+static int
+config_build_entry( ConfigArgs *c, Entry *e, ObjectClass *oc,
+ struct berval *rdn, ConfigTable *ct, int table )
+{
+ struct berval vals[2];
+ struct berval ad_name;
+ AttributeDescription *ad = NULL;
+ int rc, i;
+ char *ptr;
+ const char *text;
+ AttributeType **at;
+
+ BER_BVZERO( &vals[1] );
+
+ vals[0] = oc->soc_cname;
+ attr_merge(e, slap_schema.si_ad_objectClass, vals, NULL );
+ ptr = strchr(rdn->bv_val, '=');
+ ad_name.bv_val = rdn->bv_val;
+ ad_name.bv_len = ptr - rdn->bv_val;
+ rc = slap_bv2ad( &ad_name, &ad, &text );
+ if ( rc ) {
+ return rc;
+ }
+ vals[0].bv_val = ptr+1;
+ vals[0].bv_len = rdn->bv_len - (vals[0].bv_val - rdn->bv_val);
+ attr_merge(e, ad, vals, NULL );
+
+ for (at=oc->soc_required; at && *at; at++) {
+ /* Skip the naming attr */
+ if ((*at)->sat_ad == ad || (*at)->sat_ad == slap_schema.si_ad_cn )
+ continue;
+ for (i=0;ct[i].name;i++) {
+ if (ct[i].ad == (*at)->sat_ad)
+ break;
+ }
+ rc = config_get_vals(&ct[i], c);
+ if (rc == LDAP_SUCCESS) {
+ attr_merge(e, ct[i].ad, c->rvalue_vals, c->rvalue_nvals);
+ ber_bvarray_free( c->rvalue_nvals );
+ ber_bvarray_free( c->rvalue_vals );
+ }
+ }
+
+ for (at=oc->soc_allowed; at && *at; at++) {
+ /* Skip the naming attr */
+ if ((*at)->sat_ad == ad || (*at)->sat_ad == slap_schema.si_ad_cn )
+ continue;
+ for (i=0;ct[i].name;i++) {
+ if (ct[i].ad == (*at)->sat_ad)
+ break;
+ }
+ rc = config_get_vals(&ct[i], c);
+ if (rc == LDAP_SUCCESS) {
+ attr_merge(e, ct[i].ad, c->rvalue_vals, c->rvalue_nvals);
+ ber_bvarray_free( c->rvalue_nvals );
+ ber_bvarray_free( c->rvalue_vals );
+ }
+ }
+
+ if ( table ) {
+ if ( table == BI_TABLE )
+ ct = c->bi->bi_cf_table;
+ else
+ ct = c->be->be_cf_table;
+ for (;ct && ct->name;ct++) {
+ if (!ct->ad) continue;
+ rc = config_get_vals(ct, c);
+ if (rc == LDAP_SUCCESS) {
+ attr_merge(e, ct->ad, c->rvalue_vals, c->rvalue_nvals);
+ }
+ }
+ }
+
+ return 0;
+}
+
+static CfEntryInfo *
+config_build_includes( ConfigArgs *c, Entry *parent )
+{
+ Entry *e;
+ int i;
+ ConfigFile *cf = (ConfigFile *)c->line;
+ CfEntryInfo *ce, *ceparent, *ceprev;
+
+ ceparent = parent->e_private;
+
+ for (i=0; cf; cf=cf->c_sibs, i++) {
+ c->value_dn.bv_val = c->log;
+ c->value_dn.bv_len = sprintf(c->value_dn.bv_val, "cn=include{%d}", i);
+ e = config_alloc_entry( &parent->e_nname, &c->value_dn );
+ c->line = (char *)cf;
+ config_build_entry( c, e, cfOc_include, &c->value_dn,
+ c->bi->bi_cf_table, NO_TABLE );
+ ce = e->e_private;
+ if ( !ceparent->ce_kids ) {
+ ceparent->ce_kids = ce;
+ } else {
+ ceprev->ce_sibs = ce;
+ }
+ ceprev = ce;
+ if ( cf->c_kids ) {
+ c->line = (char *)cf->c_kids;
+ config_build_includes( c, e );
+ }
+ }
+ return ce;
+}
+
+static int
+config_back_db_open( BackendDB *be )
+{
+ CfBackInfo *cfb = be->be_private;
+ struct berval rdn;
+ Entry *e, *parent;
+ CfEntryInfo *ce, *ceparent, *ceprev;
+ int i, rc;
+ BackendInfo *bi;
+ BackendDB *bptr;
+ ConfigArgs c;
+ ConfigTable *ct;
+
+ /* create root of tree */
+ rdn = config_rdn;
+ e = config_alloc_entry( NULL, &rdn );
+ ce = e->e_private;
+ cfb->cb_root = ce;
+ c.be = be;
+ c.bi = be->bd_info;
+ c.line = (char *)cfb->cb_config;
+ ct = c.bi->bi_cf_table;
+ config_build_entry( &c, e, cfOc_global, &rdn, ct, NO_TABLE );
+
+ parent = e;
+ ceparent = ce;
+
+ /* Create includeFile nodes... */
+ if ( cfb->cb_config->c_kids ) {
+ c.line = (char *)cfb->cb_config->c_kids;
+ ceprev = config_build_includes( &c, parent );
+ }
+
+ /* Create backend nodes. Skip if they don't provide a cf_table.
+ * There usually aren't any of these.
+ */
+
+ c.line = 0;
+ bi = backendInfo;
+ for (i=0; i<nBackendInfo; i++, bi++) {
+ if (!bi->bi_cf_table) continue;
+ if (!bi->bi_private) continue;
+
+ rdn.bv_val = c.log;
+ rdn.bv_len = sprintf(rdn.bv_val, "%s=%s", cfAd_backend->ad_cname.bv_val, bi->bi_type);
+ e = config_alloc_entry( &parent->e_nname, &rdn );
+ ce = e->e_private;
+ ce->ce_bi = bi;
+ c.bi = bi;
+ config_build_entry( &c, e, cfOc_backend, &rdn, ct, BI_TABLE );
+ if ( !ceparent->ce_kids ) {
+ ceparent->ce_kids = ce;
+ } else {
+ ceprev->ce_sibs = ce;
+ }
+ ceprev = ce;
+ }
+
+ /* Create database nodes... */
+ for (i=0; i<nBackendDB; i++) {
+ slap_overinfo *oi = NULL;
+ if ( i == 0 ) {
+ bptr = frontendDB;
+ } else {
+ bptr = &backendDB[i];
+ }
+ if ( overlay_is_over( bptr )) {
+ oi = bptr->bd_info->bi_private;
+ bi = oi->oi_orig;
+ } else {
+ bi = bptr->bd_info;
+ }
+ rdn.bv_val = c.log;
+ rdn.bv_len = sprintf(rdn.bv_val, "%s={%0x}%s", cfAd_database->ad_cname.bv_val,
+ i, bi->bi_type);
+ e = config_alloc_entry( &parent->e_nname, &rdn );
+ ce = e->e_private;
+ c.be = bptr;
+ c.bi = bi;
+ ce->ce_be = c.be;
+ ce->ce_bi = c.bi;
+ config_build_entry( &c, e, cfOc_database, &rdn, ct, BE_TABLE );
+ if ( !ceparent->ce_kids ) {
+ ceparent->ce_kids = ce;
+ } else {
+ ceprev->ce_sibs = ce;
+ }
+ ceprev = ce;
+ /* Iterate through overlays */
+ if ( oi ) {
+ slap_overinst *on;
+ Entry *oe;
+ CfEntryInfo *opar = ce, *oprev = NULL;
+ int j;
+
+ for (j=0,on=oi->oi_list; on; j++,on=on->on_next) {
+ rdn.bv_val = c.log;
+ rdn.bv_len = sprintf(rdn.bv_val, "%s={%0x}%s",
+ cfAd_overlay->ad_cname.bv_val, j, on->on_bi.bi_type );
+ oe = config_alloc_entry( &e->e_nname, &rdn );
+ ce = oe->e_private;
+ c.be = bptr;
+ c.bi = &on->on_bi;
+ ce->ce_be = c.be;
+ ce->ce_bi = c.bi;
+ config_build_entry( &c, oe, cfOc_overlay, &rdn, ct, BI_TABLE );
+ if ( !opar->ce_kids ) {
+ opar->ce_kids = ce;
+ } else {
+ oprev->ce_sibs = ce;
+ }
+ oprev = ce;
+ }
+ }
+#if 0
+ /* Set up ACLs */
+ if ( bptr->be_acl ) {
+ Entry *ae;
+ CfEntryInfo *opar = ce;
+
+ ae = config_alloc_entry( &e->e_nname, &access_rdn );
+ ce = ae->e_private;
+ c.be = bptr;
+ c.bi = bi;
+ ce->ce_be = c.be;
+ ce->ce_bi = c.bi;
+ config_build_entry( &c, ae, cfOc_access, &access_rdn, ct,
+ NO_TABLE );
+ if ( opar->ce_kids ) {
+ ce->ce_sibs = opar->ce_kids;
+ }
+ opar->ce_kids = ce;
+ }
+#endif
+ }
+
+ return 0;
+}
+
+static int
+config_back_db_destroy( Backend *be )
+{
+ free( be->be_private );
+ return 0;
+}
+
+static int
+config_back_db_init( Backend *be )
+{
+ struct berval dn;
+ CfBackInfo *cfb;
+
+ cfb = ch_calloc( 1, sizeof(CfBackInfo));
+ cfb->cb_config = &cf_prv;
+ be->be_private = cfb;
+
+ ber_dupbv( &be->be_rootdn, &config_rdn );
+ ber_dupbv( &be->be_rootndn, &be->be_rootdn );
+ ber_dupbv( &dn, &be->be_rootdn );
+ ber_bvarray_add( &be->be_suffix, &dn );
+ ber_dupbv( &dn, &be->be_rootdn );
+ ber_bvarray_add( &be->be_nsuffix, &dn );
+
+ /* Hide from namingContexts */
+ SLAP_BFLAGS(be) |= SLAP_BFLAG_CONFIG;
+
+ return 0;
+}
+
+static struct {
+ char *name;
+ AttributeDescription **desc;
+ AttributeDescription *sub;
+} ads[] = {
+ { "attribute", NULL, NULL },
+ { "backend", &cfAd_backend, NULL },
+ { "database", &cfAd_database, NULL },
+ { "ditcontentrule", NULL, NULL },
+ { "include", &cfAd_include, NULL },
+ { "objectclass", NULL, NULL },
+ { "overlay", &cfAd_overlay, NULL },
+ { NULL, NULL, NULL }
+};
+
+int
+config_back_initialize( BackendInfo *bi )
+{
+ ConfigTable *ct = config_back_cf_table;
+ char *argv[4];
+ int i;
+
+ bi->bi_open = 0;
+ bi->bi_close = 0;
+ bi->bi_config = 0;
+ bi->bi_destroy = 0;
+
+ bi->bi_db_init = config_back_db_init;
+ bi->bi_db_config = 0;
+ bi->bi_db_open = config_back_db_open;
+ bi->bi_db_close = 0;
+ bi->bi_db_destroy = config_back_db_destroy;
+
+ bi->bi_op_bind = config_back_bind;
+ bi->bi_op_unbind = 0;
+ bi->bi_op_search = config_back_search;
+ bi->bi_op_compare = 0;
+ bi->bi_op_modify = config_back_modify;
+ bi->bi_op_modrdn = 0;
+ bi->bi_op_add = 0;
+ bi->bi_op_delete = 0;
+ bi->bi_op_abandon = 0;
+
+ bi->bi_extended = 0;
+
+ bi->bi_chk_referrals = 0;
+
+ bi->bi_connection_init = 0;
+ bi->bi_connection_destroy = 0;
+
+ argv[3] = NULL;
+ for (i=0; OidMacros[i].name; i++ ) {
+ argv[1] = OidMacros[i].name;
+ argv[2] = OidMacros[i].oid;
+ parse_oidm( "slapd", i, 3, argv );
+ }
+
+ i = init_config_attrs( ct );
+ if ( i ) return i;
+
+ /* set up the notable AttributeDescriptions */
+ ads[0].sub = slap_schema.si_ad_attributeTypes;
+ ads[3].sub = slap_schema.si_ad_ditContentRules;
+ ads[5].sub = slap_schema.si_ad_objectClasses;
+
+ bi->bi_cf_table = ct;
+
+ i = 0;
+ for (;ct->name;ct++) {
+ if (strcmp(ct->name, ads[i].name)) continue;
+ if (ads[i].sub) {
+ ct->ad = ads[i].sub;
+ } else {
+ *ads[i].desc = ct->ad;
+ }
+ i++;
+ if (!ads[i].name) break;
+ }
+
+ /* set up the objectclasses */
+ i = init_config_ocs( cf_ocs );
+
+ return i;
+}
+
{
Operation *o;
int rc;
- int found = 0;
int opid;
BerElement *ber;
int i;
LDAP_STAILQ_NEXT(o, o_next) = NULL;
op->o_conn->c_n_ops_pending--;
slap_op_free( o );
- found = 1;
- break;
+ ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
+ return LDAP_SUCCESS;
}
}
- ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
- if ( found ) return LDAP_SUCCESS;
-
- found = 0;
- ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
LDAP_STAILQ_FOREACH( o, &op->o_conn->c_ops, o_next ) {
if ( o->o_msgid == opid ) {
- found = 1;
+ o->o_abandon = 1;
break;
}
}
- if ( !found ) {
+ ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
+
+ if ( o ) {
+ if ( o->o_cancel != SLAP_CANCEL_NONE ) {
+ rs->sr_text = "message ID already being cancelled";
+ return LDAP_PROTOCOL_ERROR;
+ }
+
+ o->o_cancel = SLAP_CANCEL_REQ;
+
for ( i = 0; i < nbackends; i++ ) {
op->o_bd = &backends[i];
if( !op->o_bd->be_cancel ) continue;
- ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
-
op->oq_cancel.rs_msgid = opid;
if ( op->o_bd->be_cancel( op, rs ) == LDAP_SUCCESS ) {
return LDAP_SUCCESS;
}
- ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
}
- ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
- rs->sr_text = "message ID not found";
- return LDAP_NO_SUCH_OPERATION;
- }
-
- if ( op->o_cancel != SLAP_CANCEL_NONE ) {
- ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
- rs->sr_text = "message ID already being cancelled";
- return LDAP_PROTOCOL_ERROR;
- }
- op->o_cancel = SLAP_CANCEL_REQ;
- ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
+ while ( o->o_cancel == SLAP_CANCEL_REQ ) {
+ ldap_pvt_thread_yield();
+ }
- while ( op->o_cancel == SLAP_CANCEL_REQ ) {
- ldap_pvt_thread_yield();
- }
+ if ( o->o_cancel == SLAP_CANCEL_ACK ) {
+ rc = LDAP_SUCCESS;
+ } else {
+ rc = o->o_cancel;
+ }
- if ( op->o_cancel == SLAP_CANCEL_ACK ) {
- rc = LDAP_SUCCESS;
+ o->o_cancel = SLAP_CANCEL_DONE;
} else {
- rc = op->o_cancel;
+ rs->sr_text = "message ID not found";
+ rc = LDAP_NO_SUCH_OPERATION;
}
- op->o_cancel = SLAP_CANCEL_DONE;
-
return rc;
}
struct berval dn = BER_BVNULL;
struct berval desc = BER_BVNULL;
struct berval value = BER_BVNULL;
- AttributeAssertion ava = { NULL, BER_BVNULL };
+ AttributeAssertion ava = { NULL, BER_BVNULL, NULL };
ava.aa_desc = NULL;
return( rc );
}
+int
+get_aliased_filter_aa ( Operation* op, AttributeAssertion* a_assert, AttributeAliasing* aa, const char** text )
+{
+ int rc;
+ struct berval assert_bv;
+ ComponentAssertion* ca;
+
+ Debug( LDAP_DEBUG_FILTER, "get_aliased_filter\n", 0, 0, 0 );
+
+ if ( !aa->aa_cf )
+ return LDAP_PROTOCOL_ERROR;
+
+ assert_bv = a_assert->aa_value;
+ /*
+ * Duplicate aa->aa_cf to ma->ma_cf by replacing the
+ * the component assertion value in assert_bv
+ * Multiple values may be separated with '$'
+ */
+ return dup_comp_filter ( op, &assert_bv, aa->aa_cf, &a_assert->aa_cf );
+}
int
get_aliased_filter( Operation* op,
free_comp_filter( f );
}
+void
+free_ComponentData( Attribute *a ) {
+ if ( a->a_comp_data->cd_mem_op )
+ component_destructor( a->a_comp_data->cd_mem_op );
+ free ( a->a_comp_data );
+ a->a_comp_data = NULL;
+}
#endif
static int fp_parse_line(ConfigArgs *c);
static char *strtok_quote(char *line, char *sep);
-#if 0
-static int load_ucdata(char *path);
-#endif
int read_config_file(const char *fname, int depth, ConfigArgs *cf);
-static int add_syncrepl LDAP_P(( Backend *, char **, int ));
-static int parse_syncrepl_line LDAP_P(( char **, int, syncinfo_t *));
-
-int config_generic(ConfigArgs *c);
-int config_search_base(ConfigArgs *c);
-int config_passwd_hash(ConfigArgs *c);
-int config_schema_dn(ConfigArgs *c);
-int config_sizelimit(ConfigArgs *c);
-int config_timelimit(ConfigArgs *c);
-int config_limits(ConfigArgs *c);
-int config_overlay(ConfigArgs *c);
-int config_suffix(ConfigArgs *c);
-int config_deref_depth(ConfigArgs *c);
-int config_rootdn(ConfigArgs *c);
-int config_rootpw(ConfigArgs *c);
-int config_restrict(ConfigArgs *c);
-int config_allows(ConfigArgs *c);
-int config_disallows(ConfigArgs *c);
-int config_requires(ConfigArgs *c);
-int config_security(ConfigArgs *c);
-int config_referral(ConfigArgs *c);
-int config_loglevel(ConfigArgs *c);
-int config_syncrepl(ConfigArgs *c);
-int config_replica(ConfigArgs *c);
-int config_updatedn(ConfigArgs *c);
-int config_updateref(ConfigArgs *c);
-int config_include(ConfigArgs *c);
-#ifdef HAVE_TLS
-int config_tls_option(ConfigArgs *c);
-int config_tls_verify(ConfigArgs *c);
-#endif
-#ifdef LDAP_SLAPI
-int config_plugin(ConfigArgs *c);
-#endif
-int config_pluginlog(ConfigArgs *c);
-
-enum {
- CFG_DATABASE = 1,
- CFG_BACKEND,
- CFG_TLS_RAND,
- CFG_TLS_CIPHER,
- CFG_TLS_CERT_FILE,
- CFG_TLS_CERT_KEY,
- CFG_TLS_CERT_PATH,
- CFG_TLS_CA_FILE,
- CFG_TLS_VERIFY,
- CFG_TLS_CRLCHECK,
- CFG_SIZE,
- CFG_TIME,
- CFG_CONCUR,
- CFG_THREADS,
- CFG_SALT,
- CFG_LIMITS,
- CFG_RO,
- CFG_SASLOPT,
- CFG_REWRITE,
- CFG_DEPTH,
- CFG_OID,
- CFG_OC,
- CFG_DIT,
- CFG_ATTR,
- CFG_ATOPT,
- CFG_CHECK,
- CFG_ACL,
- CFG_AUDITLOG,
- CFG_REPLOG,
- CFG_ROOTDSE,
- CFG_LOGFILE,
- CFG_PLUGIN,
- CFG_MODLOAD,
- CFG_MODPATH,
- CFG_LASTMOD
-};
-
-/* original config.c ordering */
-
-ConfigTable SystemConfiguration[] = {
- { "backend", 2, 2, 0, "type", ARG_PRE_DB|ARG_MAGIC|CFG_BACKEND, &config_generic, NULL, NULL, NULL },
- { "database", 2, 2, 0, "type", ARG_MAGIC|CFG_DATABASE, &config_generic, NULL, NULL, NULL },
- { "localSSF", 2, 2, 0, "ssf", ARG_LONG, &local_ssf, NULL, NULL, NULL },
- { "concurrency", 2, 2, 0, "level", ARG_LONG|ARG_NONZERO|ARG_MAGIC|CFG_CONCUR, &config_generic, NULL, NULL, NULL },
- { "index_substr_if_minlen", 2, 2, 0, "min", ARG_INT|ARG_NONZERO, &index_substr_if_minlen, NULL, NULL, NULL },
- { "index_substr_if_maxlen", 2, 2, 0, "max", ARG_INT|ARG_NONZERO|ARG_SPECIAL, &index_substr_if_maxlen, NULL, NULL, NULL },
- { "index_substr_any_len", 2, 2, 0, "len", ARG_INT|ARG_NONZERO, &index_substr_any_len, NULL, NULL, NULL },
- { "index_substr_step", 2, 2, 0, "step", ARG_INT|ARG_NONZERO, &index_substr_any_step, NULL, NULL, NULL },
- { "sockbuf_max_incoming", 2, 2, 0, "max", ARG_LONG, &sockbuf_max_incoming, NULL, NULL, NULL },
- { "sockbuf_max_incoming_auth",2, 2, 0, "max", ARG_LONG, &sockbuf_max_incoming_auth, NULL, NULL, NULL },
- { "conn_max_pending", 2, 2, 0, "max", ARG_LONG, &slap_conn_max_pending, NULL, NULL, NULL },
- { "conn_max_pending_auth", 2, 2, 0, "max", ARG_LONG, &slap_conn_max_pending_auth, NULL, NULL, NULL },
- { "defaultSearchBase", 2, 2, 0, "dn", ARG_MAGIC, &config_search_base, NULL, NULL, NULL },
- { "threads", 2, 2, 0, "count", ARG_INT|ARG_MAGIC|CFG_THREADS, &config_generic, NULL, NULL, NULL },
- { "pidfile", 2, 2, 0, "file", ARG_STRING, &slapd_pid_file, NULL, NULL, NULL },
- { "argsfile", 2, 2, 0, "file", ARG_STRING, &slapd_args_file, NULL, NULL, NULL },
- { "password-hash", 2, 2, 0, "hash", ARG_MAGIC, &config_passwd_hash, NULL, NULL, NULL },
- { "password-crypt-salt-format",2, 2, 0, "salt", ARG_MAGIC|CFG_SALT, &config_generic, NULL, NULL, NULL },
-#ifdef SLAP_AUTH_REWRITE
- { "auth-rewrite", 2, 2, 14, NULL, ARG_MAGIC|CFG_REWRITE, &config_generic, NULL, NULL, NULL },
-#endif
- { "sasl", 2, 0, 4, NULL, ARG_MAGIC|CFG_SASLOPT, &config_generic, NULL, NULL, NULL }, /* XXX */
- { "auth", 2, 2, 4, NULL, ARG_MAGIC|CFG_SASLOPT, &config_generic, NULL, NULL, NULL },
- { "schemadn", 2, 2, 0, "dn", ARG_MAGIC, &config_schema_dn, NULL, NULL, NULL },
- { "ucdata-path", 2, 2, 0, "path", ARG_IGNORED, NULL, NULL, NULL, NULL },
- { "sizelimit", 2, 2, 0, "limit", ARG_MAGIC|CFG_SIZE, &config_sizelimit, NULL, NULL, NULL },
- { "timelimit", 2, 2, 0, "limit", ARG_MAGIC|CFG_TIME, &config_timelimit, NULL, NULL, NULL },
- { "limits", 2, 0, 0, "limits", ARG_DB|ARG_MAGIC|CFG_LIMITS, &config_generic, NULL, NULL, NULL },
- { "overlay", 2, 2, 0, "overlay", ARG_MAGIC, &config_overlay, NULL, NULL, NULL },
- { "suffix", 2, 2, 0, "suffix", ARG_DB|ARG_MAGIC, &config_suffix, NULL, NULL, NULL },
- { "maxDerefDepth", 2, 2, 0, "depth", ARG_DB|ARG_INT|ARG_MAGIC|CFG_DEPTH, &config_generic, NULL, NULL, NULL },
- { "rootdn", 2, 2, 0, "dn", ARG_DB|ARG_MAGIC, &config_rootdn, NULL, NULL, NULL },
- { "rootpw", 2, 2, 0, "password", ARG_DB|ARG_MAGIC, &config_rootpw, NULL, NULL, NULL },
- { "readonly", 2, 2, 0, "on|off", ARG_ON_OFF|ARG_MAGIC|CFG_RO, &config_generic, NULL, NULL, NULL },
- { "restrict", 2, 0, 0, "op_list", ARG_MAGIC, &config_restrict, NULL, NULL, NULL },
- { "allows", 2, 0, 5, "features", ARG_PRE_DB|ARG_MAGIC, &config_allows, NULL, NULL, NULL },
- { "disallows", 2, 0, 8, "features", ARG_PRE_DB|ARG_MAGIC, &config_disallows, NULL, NULL, NULL },
- { "require", 2, 0, 7, "features", ARG_MAGIC, &config_requires, NULL, NULL, NULL },
- { "security", 2, 0, 0, "factors", ARG_MAGIC, &config_security, NULL, NULL, NULL },
- { "referral", 2, 2, 0, "url", ARG_MAGIC, &config_referral, NULL, NULL, NULL },
- { "logfile", 2, 2, 0, "file", ARG_MAGIC|CFG_LOGFILE, &config_generic, NULL, NULL, NULL },
- { "objectidentifier", 0, 0, 0, NULL, ARG_MAGIC|CFG_OID, &config_generic, NULL, NULL, NULL },
- { "objectclass", 2, 0, 0, "objectclass", ARG_PAREN|ARG_MAGIC|CFG_OC, &config_generic, NULL, NULL, NULL },
- { "ditcontentrule", 0, 0, 0, NULL, ARG_MAGIC|CFG_DIT, &config_generic, NULL, NULL, NULL },
- { "attribute", 2, 0, 9, "attribute", ARG_PAREN|ARG_MAGIC|CFG_ATTR, &config_generic, NULL, NULL, NULL },
- { "attributeoptions", 0, 0, 0, NULL, ARG_MAGIC|CFG_ATOPT, &config_generic, NULL, NULL, NULL },
- { "schemacheck", 2, 2, 0, "on|off", ARG_ON_OFF|ARG_MAGIC|CFG_CHECK, &config_generic, NULL, NULL, NULL },
- { "access", 0, 0, 0, NULL, ARG_MAGIC|CFG_ACL, &config_generic, NULL, NULL, NULL },
- { "loglevel", 2, 0, 0, "level", ARG_MAGIC, &config_loglevel, NULL, NULL, NULL },
- { "syncrepl", 0, 0, 0, NULL, ARG_DB|ARG_MAGIC, &config_syncrepl, NULL, NULL, NULL },
- { "replica", 2, 0, 0, "host or uri", ARG_DB|ARG_MAGIC, &config_replica, NULL, NULL, NULL },
- { "replicationInterval", 0, 0, 0, NULL, ARG_IGNORED, NULL, NULL, NULL, NULL },
- { "updatedn", 2, 2, 0, "dn", ARG_DB|ARG_MAGIC, &config_updatedn, NULL, NULL, NULL },
- { "updateref", 2, 2, 0, "url", ARG_DB|ARG_MAGIC, &config_updateref, NULL, NULL, NULL },
- { "replogfile", 2, 2, 0, "filename", ARG_MAGIC|ARG_STRING|CFG_REPLOG, &config_generic, NULL, NULL, NULL },
- { "rootDSE", 2, 2, 0, "filename", ARG_MAGIC|CFG_ROOTDSE, &config_generic, NULL, NULL, NULL },
- { "lastmod", 2, 2, 0, "on|off", ARG_DB|ARG_ON_OFF|ARG_MAGIC|CFG_LASTMOD, &config_generic, NULL, NULL, NULL },
-#ifdef SIGHUP
- { "gentlehup", 2, 2, 0, "on|off", ARG_ON_OFF, &global_gentlehup, NULL, NULL, NULL },
-#else
- { "gentlehup", 2, 2, 0, NULL, ARG_IGNORED, NULL, NULL, NULL, NULL },
-#endif
- { "idletimeout", 2, 2, 0, "timeout", ARG_INT, &global_idletimeout, NULL, NULL, NULL },
-/* XXX -- special case? */
- { "include", 2, 2, 0, "filename", ARG_MAGIC, &config_include, NULL, NULL, NULL },
- { "srvtab", 2, 2, 0, "filename", ARG_STRING, &ldap_srvtab, NULL, NULL, NULL },
-#ifdef SLAPD_MODULES
- { "moduleload", 2, 2, 0, "filename", ARG_MAGIC|CFG_MODLOAD, &config_generic, NULL, NULL, NULL },
- { "modulepath", 2, 2, 0, "path", ARG_MAGIC|CFG_MODPATH, &config_generic, NULL, NULL, NULL },
-#endif
-#ifdef HAVE_TLS
- { "TLSRandFile", 0, 0, 0, NULL, CFG_TLS_RAND|ARG_MAGIC, &config_tls_option, NULL, NULL, NULL },
- { "TLSCipherSuite", 0, 0, 0, NULL, CFG_TLS_CIPHER|ARG_MAGIC, &config_tls_option, NULL, NULL, NULL },
- { "TLSCertificateFile", 0, 0, 0, NULL, CFG_TLS_CERT_FILE|ARG_MAGIC, &config_tls_option, NULL, NULL, NULL },
- { "TLSCertificateKeyFile", 0, 0, 0, NULL, CFG_TLS_CERT_KEY|ARG_MAGIC, &config_tls_option, NULL, NULL, NULL },
- { "TLSCertificatePath", 0, 0, 0, NULL, CFG_TLS_CERT_PATH|ARG_MAGIC, &config_tls_option, NULL, NULL, NULL },
- { "TLSCACertificateFile", 0, 0, 0, NULL, CFG_TLS_CA_FILE|ARG_MAGIC, &config_tls_option, NULL, NULL, NULL },
-#ifdef HAVE_OPENSSL_CRL
- { "TLSCRLCheck", 0, 0, 0, NULL, CFG_TLS_CRLCHECK|ARG_MAGIC, &config_tls_option, NULL, NULL, NULL },
-#else
- { "TLSCRLCheck", 0, 0, 0, NULL, ARG_IGNORED, NULL, NULL, NULL, NULL },
-#endif
- { "TLSVerifyClient", 0, 0, 0, NULL, CFG_TLS_VERIFY|ARG_MAGIC, &config_tls_verify, NULL, NULL, NULL },
-#endif
-#ifdef SLAPD_RLOOKUPS
- { "reverse-lookup", 2, 2, 0, "on|off", ARG_ON_OFF, &use_reverse_lookup, NULL, NULL, NULL },
-#else
- { "reverse-lookup", 2, 2, 0, NULL, ARG_IGNORED, NULL, NULL, NULL, NULL },
-#endif
-#ifdef LDAP_SLAPI
- { "plugin", 0, 0, 0, NULL, ARG_MAGIC|CFG_PLUGIN, &config_generic, NULL, NULL, NULL },
- { "pluginlog", 2, 2, 0, "filename", ARG_STRING, &slapi_log_file, NULL, NULL, NULL },
-#else
- { "plugin", 0, 0, 0, NULL, ARG_IGNORED, NULL, NULL, NULL, NULL },
- { "pluginlog", 0, 0, 0, NULL, ARG_IGNORED, NULL, NULL, NULL, NULL },
-#endif
- { "replica-pidfile", 0, 0, 0, NULL, ARG_IGNORED, NULL, NULL, NULL, NULL },
- { "replica-argsfile", 0, 0, 0, NULL, ARG_IGNORED, NULL, NULL, NULL, NULL },
- { NULL, 0, 0, 0, NULL, ARG_IGNORED, NULL, NULL, NULL, NULL }
-};
-
-
ConfigArgs *
new_config_args( BackendDB *be, const char *fname, int lineno, int argc, char **argv )
{
int i, rc, arg_user, arg_type, iarg;
long larg;
ber_len_t barg;
+ void *ptr;
+
for(i = 0; Conf[i].name; i++)
if( (Conf[i].length && (!strncasecmp(c->argv[0], Conf[i].name, Conf[i].length))) ||
(!strcasecmp(c->argv[0], Conf[i].name)) ) break;
c->log, Conf[i].name, 0);
return(ARG_BAD_CONF);
}
- if((arg_type & ARG_PRE_DB) && c->be) {
+ if((arg_type & ARG_PRE_BI) && c->bi) {
+ Debug(LDAP_DEBUG_CONFIG, "%s: keyword <%s> must appear before any backend %sdeclaration\n",
+ c->log, Conf[i].name, ((arg_type & ARG_PRE_DB)
+ ? "or database " : "") );
+ return(ARG_BAD_CONF);
+ }
+ if((arg_type & ARG_PRE_DB) && c->be && c->be != frontendDB) {
Debug(LDAP_DEBUG_CONFIG, "%s: keyword <%s> must appear before any database declaration\n",
c->log, Conf[i].name, 0);
return(ARG_BAD_CONF);
return(ARG_BAD_CONF);
}
c->type = arg_user = (arg_type & ARGS_USERLAND);
- c->value_int = c->value_long = c->value_ber_t = 0;
- c->value_string = NULL;
+ memset(&c->values, 0, sizeof(c->values));
if(arg_type & ARGS_NUMERIC) {
int j;
iarg = 0; larg = 0; barg = 0;
switch(arg_type & ARGS_NUMERIC) {
case ARG_INT: iarg = atoi(c->argv[1]); break;
- case ARG_LONG: larg = atol(c->argv[1]); break;
+ case ARG_LONG: larg = strtol(c->argv[1], NULL, 0); break;
case ARG_BER_LEN_T: barg = (ber_len_t)atol(c->argv[1]); break;
case ARG_ON_OFF:
- if(!strcasecmp(c->argv[1], "on")) {
+ if(c->argc == 1) {
iarg = 1;
- } else if(!strcasecmp(c->argv[1], "off")) {
+ } else if(!strcasecmp(c->argv[1], "on") ||
+ !strcasecmp(c->argv[1], "true")) {
+ iarg = 1;
+ } else if(!strcasecmp(c->argv[1], "off") ||
+ !strcasecmp(c->argv[1], "false")) {
iarg = 0;
} else {
Debug(LDAP_DEBUG_CONFIG, "%s: ignoring ", c->log, 0, 0);
break;
}
j = (arg_type & ARG_NONZERO) ? 1 : 0;
- rc = (Conf == SystemConfiguration) ? ((arg_type & ARG_SPECIAL) && (larg < index_substr_if_maxlen)) : 0;
- if(iarg < j || larg < j || barg < j || rc) {
+ if(iarg < j || larg < j || barg < j ) {
larg = larg ? larg : (barg ? barg : iarg);
Debug(LDAP_DEBUG_CONFIG, "%s: " , c->log, 0, 0);
Debug(LDAP_DEBUG_CONFIG, "invalid %s value (%ld) in <%s> line\n", Conf[i].what, larg, Conf[i].name);
return(ARG_BAD_CONF);
}
- c->value_int = iarg;
- c->value_long = larg;
- c->value_ber_t = barg;
+ switch(arg_type & ARGS_NUMERIC) {
+ case ARG_ON_OFF:
+ case ARG_INT: c->value_int = iarg; break;
+ case ARG_LONG: c->value_long = larg; break;
+ case ARG_BER_LEN_T: c->value_ber_t = barg; break;
+ }
+ } else if(arg_type & ARG_STRING) {
+ c->value_string = ch_strdup(c->argv[1]);
+ } else if(arg_type & ARG_DN) {
+ struct berval bv;
+ ber_str2bv( c->argv[1], 0, 0, &bv );
+ rc = dnPrettyNormal( NULL, &bv, &c->value_dn, &c->value_ndn, NULL );
+ if ( rc != LDAP_SUCCESS ) {
+ Debug(LDAP_DEBUG_CONFIG, "%s: " , c->log, 0, 0);
+ Debug(LDAP_DEBUG_CONFIG, "%s DN is invalid %d (%s)\n",
+ Conf[i].name, rc, ldap_err2string( rc ));
+ return(ARG_BAD_CONF);
+ }
}
- if(arg_type & ARG_STRING) c->value_string = ch_strdup(c->argv[1]);
if(arg_type & ARG_MAGIC) {
if(!c->be) c->be = frontendDB;
rc = (*((ConfigDriver*)Conf[i].arg_item))(c);
}
return(0);
}
+ if(arg_type & ARG_OFFSET) {
+ if (c->be)
+ ptr = c->be->be_private;
+ else if (c->bi)
+ ptr = c->bi->bi_private;
+ else {
+ Debug(LDAP_DEBUG_CONFIG, "%s: offset for <%s> missing base pointer!",
+ c->log, Conf[i].name, 0);
+ return(ARG_BAD_CONF);
+ }
+ ptr = (void *)((char *)ptr + (int)Conf[i].arg_item);
+ } else if (arg_type & ARGS_POINTER) {
+ ptr = Conf[i].arg_item;
+ }
if(arg_type & ARGS_POINTER) switch(arg_type & ARGS_POINTER) {
case ARG_ON_OFF:
- case ARG_INT: *((int*)Conf[i].arg_item) = iarg; break;
- case ARG_LONG: *((long*)Conf[i].arg_item) = larg; break;
- case ARG_BER_LEN_T: *((ber_len_t*)Conf[i].arg_item) = barg; break;
+ case ARG_INT: *(int*)ptr = iarg; break;
+ case ARG_LONG: *(long*)ptr = larg; break;
+ case ARG_BER_LEN_T: *(ber_len_t*)ptr = barg; break;
case ARG_STRING: {
- char *cc = *((char**)Conf[i].arg_item);
- if(cc) ch_free(cc); /* potential memory leak */
- *(char **)Conf[i].arg_item = c->value_string;
+ char *cc = *(char**)ptr;
+ if(cc) {
+ if (arg_type & ARG_UNIQUE) {
+ Debug(LDAP_DEBUG_CONFIG, "%s: already set %s!\n",
+ c->log, Conf[i].name, 0 );
+ return(ARG_BAD_CONF);
+ }
+ ch_free(cc); /* potential memory leak */
+ }
+ *(char **)ptr = c->value_string;
break;
}
}
}
int
-read_config(const char *fname, int depth) {
- return read_config_file(fname, depth, NULL);
+config_get_vals(ConfigTable *cf, ConfigArgs *c)
+{
+ int rc = 0;
+ struct berval bv;
+ void *ptr;
+
+ if ( cf->arg_type & ARG_IGNORED ) {
+ return 1;
+ }
+
+ memset(&c->values, 0, sizeof(c->values));
+ c->rvalue_vals = NULL;
+ c->rvalue_nvals = NULL;
+ c->emit = 1;
+ c->type = cf->arg_type & ARGS_USERLAND;
+
+ if ( cf->arg_type & ARG_MAGIC ) {
+ rc = (*((ConfigDriver*)cf->arg_item))(c);
+ if ( rc ) return rc;
+ } else {
+ if ( cf->arg_type & ARG_OFFSET ) {
+ if ( c->be )
+ ptr = c->be->be_private;
+ else if ( c->bi )
+ ptr = c->bi->bi_private;
+ else
+ return 1;
+ ptr = (void *)((char *)ptr + (int)cf->arg_item);
+ } else {
+ ptr = cf->arg_item;
+ }
+
+ switch(cf->arg_type & ARGS_POINTER) {
+ case ARG_ON_OFF:
+ case ARG_INT: c->value_int = *(int *)ptr; break;
+ case ARG_LONG: c->value_long = *(long *)ptr; break;
+ case ARG_BER_LEN_T: c->value_ber_t = *(ber_len_t *)ptr; break;
+ case ARG_STRING:
+ if ( *(char **)ptr )
+ c->value_string = ch_strdup(*(char **)ptr);
+ break;
+ }
+ }
+ if ( cf->arg_type & ARGS_POINTER) {
+ bv.bv_val = c->log;
+ switch(cf->arg_type & ARGS_POINTER) {
+ case ARG_INT: bv.bv_len = sprintf(bv.bv_val, "%d", c->value_int); break;
+ case ARG_LONG: bv.bv_len = sprintf(bv.bv_val, "%l", c->value_long); break;
+ case ARG_BER_LEN_T: bv.bv_len =sprintf(bv.bv_val, "%l",c->value_ber_t); break;
+ case ARG_ON_OFF: bv.bv_len = sprintf(bv.bv_val, "%s",
+ c->value_int ? "TRUE" : "FALSE"); break;
+ case ARG_STRING:
+ if ( c->value_string && c->value_string[0]) {
+ ber_str2bv( c->value_string, 0, 0, &bv);
+ } else {
+ return 1;
+ }
+ break;
+ }
+ if (( cf->arg_type & ARGS_POINTER ) == ARG_STRING )
+ ber_bvarray_add(&c->rvalue_vals, &bv);
+ else
+ value_add_one(&c->rvalue_vals, &bv);
+ }
+ return rc;
+}
+
+int
+init_config_attrs(ConfigTable *ct) {
+ LDAPAttributeType *at;
+ int i, code;
+ const char *err;
+
+ for (i=0; ct[i].name; i++ ) {
+ if ( !ct[i].attribute ) continue;
+ at = ldap_str2attributetype( ct[i].attribute,
+ &code, &err, LDAP_SCHEMA_ALLOW_ALL );
+ if ( !at ) {
+ fprintf( stderr, "init_config_attrs: AttributeType \"%s\": %s, %s\n",
+ ct[i].attribute, ldap_scherr2str(code), err );
+ return code;
+ }
+ code = at_add( at, &err );
+ if ( code && code != SLAP_SCHERR_ATTR_DUP ) {
+ fprintf( stderr, "init_config_attrs: AttributeType \"%s\": %s, %s\n",
+ ct[i].attribute, scherr2str(code), err );
+ return code;
+ }
+ code = slap_str2ad( at->at_names[0], &ct[i].ad, &err );
+ if ( code ) {
+ fprintf( stderr, "init_config_attrs: AttributeType \"%s\": %s\n",
+ ct[i].attribute, err );
+ return code;
+ }
+ ldap_memfree( at );
+ }
+
+ return 0;
+}
+
+int
+init_config_ocs( ConfigOCs *ocs ) {
+ int i;
+
+ for (i=0;ocs[i].def;i++) {
+ LDAPObjectClass *oc;
+ int code;
+ const char *err;
+
+ oc = ldap_str2objectclass( ocs[i].def, &code, &err,
+ LDAP_SCHEMA_ALLOW_ALL );
+ if ( !oc ) {
+ fprintf( stderr, "init_config_ocs: objectclass \"%s\": %s, %s\n",
+ ocs[i].def, ldap_scherr2str(code), err );
+ return code;
+ }
+ code = oc_add(oc,0,&err);
+ if ( code && code != SLAP_SCHERR_CLASS_DUP ) {
+ fprintf( stderr, "init_config_ocs: objectclass \"%s\": %s, %s\n",
+ ocs[i].def, scherr2str(code), err );
+ return code;
+ }
+ if ( ocs[i].oc ) {
+ *ocs[i].oc = oc_find(oc->oc_names[0]);
+ }
+ ldap_memfree(oc);
+ }
+ return 0;
}
int
continue;
}
- rc = parse_config_table( SystemConfiguration, c );
+ rc = parse_config_table( config_back_cf_table, c );
if ( !rc ) {
continue;
}
}
}
- } else if ( c->be && c->be->be_config ) {
- rc = (*c->be->be_config)(c->be, c->fname, c->lineno, c->argc, c->argv);
- if ( rc ) {
- switch(rc) {
- case SLAP_CONF_UNKNOWN:
- Debug( LDAP_DEBUG_CONFIG, "%s: "
- "unknown directive <%s> inside backend database definition (ignored)\n",
- c->log, *c->argv, 0);
- continue;
- default:
- goto badline;
+ } else if ( c->be ) {
+ if ( c->be->be_cf_table ) {
+ rc = parse_config_table( c->be->be_cf_table, c );
+
+ if ( !rc ) continue;
+
+ if ( rc != ARG_UNKNOWN ) goto badline;
+ }
+
+ if ( c->be->be_config ) {
+ rc = (*c->be->be_config)(c->be, c->fname, c->lineno,
+ c->argc, c->argv);
+ if ( rc ) {
+ switch(rc) {
+ case SLAP_CONF_UNKNOWN:
+ Debug( LDAP_DEBUG_CONFIG, "%s: "
+ "unknown directive <%s> inside backend database "
+ "definition (ignored)\n",
+ c->log, *c->argv, 0);
+ continue;
+ default:
+ goto badline;
+ }
}
}
return(1);
}
-int
-config_generic(ConfigArgs *c) {
- char *p = strchr(c->line,'(' /*')'*/);
- int i;
-
- switch(c->type) {
- case CFG_BACKEND:
- if(!(c->bi = backend_info(c->argv[1]))) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "backend %s failed init!\n", c->log, c->argv[1], 0);
- return(1);
- }
- break;
-
- case CFG_DATABASE:
- c->bi = NULL;
- if(!(c->be = backend_db_init(c->argv[1]))) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "database %s failed init!\n", c->log, c->argv[1], 0);
- return(1);
- }
- break;
-
- case CFG_CONCUR:
- ldap_pvt_thread_set_concurrency(c->value_long);
- break;
-
- case CFG_THREADS:
- ldap_pvt_thread_pool_maxthreads(&connection_pool, c->value_int);
- connection_pool_max = c->value_int; /* save for reference */
- break;
-
- case CFG_SALT:
- lutil_salt_format(c->argv[1]);
- break;
-
- case CFG_LIMITS:
- if(limits_parse(c->be, c->fname, c->lineno, c->argc, c->argv))
- return(1);
- break;
-
- case CFG_RO:
- if(c->value_int)
- c->be->be_restrictops |= SLAP_RESTRICT_OP_WRITES;
- else
- c->be->be_restrictops &= ~SLAP_RESTRICT_OP_WRITES;
- break;
-
- case CFG_SASLOPT:
- /* XXX slap_sasl_config doesn't actually use the line argument */
- if(slap_sasl_config(c->argc, c->argv, c->line, c->fname, c->lineno))
- return(1);
- break;
-
- case CFG_DEPTH:
- c->be->be_max_deref_depth = c->value_int;
- break;
-
- case CFG_OID:
- if(parse_oidm(c->fname, c->lineno, c->argc, c->argv)) return(1);
- break;
-
- case CFG_OC:
- if(parse_oc(c->fname, c->lineno, p, c->argv)) return(1);
- break;
-
- case CFG_DIT:
- if(parse_cr(c->fname, c->lineno, p, c->argv)) return(1);
- break;
-
- case CFG_ATTR:
- if(parse_at(c->fname, c->lineno, p, c->argv)) return(1);
- break;
-
- case CFG_ATOPT:
- ad_define_option(NULL, NULL, 0);
- for(i = 1; i < c->argc; i++)
- if(ad_define_option(c->argv[i], c->fname, c->lineno))
- return(1);
- break;
-
- case CFG_CHECK:
- global_schemacheck = c->value_int;
- if(!global_schemacheck) Debug(LDAP_DEBUG_ANY, "%s: "
- "schema checking disabled! your mileage may vary!\n",
- c->log, 0, 0);
- break;
-
- case CFG_ACL:
- parse_acl(c->be, c->fname, c->lineno, c->argc, c->argv);
- break;
-
-#if 0
- case CFG_AUDITLOG:
- c->be->be_auditlogfile = c->value_string;
- break;
-#endif
-
- case CFG_REPLOG:
- if(SLAP_MONITOR(c->be)) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "\"replogfile\" should not be used "
- "inside monitor database\n",
- c->log, 0, 0);
- return(0); /* FIXME: should this be an error? */
- }
-
- c->be->be_replogfile = c->value_string;
- break;
-
- case CFG_ROOTDSE:
- if(read_root_dse_file(c->argv[1])) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "could not read \"rootDSE <filename>\" line\n",
- c->log, 0, 0);
- return(1);
- }
- break;
-
- case CFG_LOGFILE: {
- FILE *logfile = fopen(c->argv[1], "w");
- if(logfile) lutil_debug_file(logfile);
- break;
- }
-
- case CFG_LASTMOD:
- if(SLAP_NOLASTMODCMD(c->be)) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "lastmod not available for %s databases\n",
- c->log, c->be->bd_info->bi_type, 0);
- return(1);
- }
- if(c->value_int)
- SLAP_DBFLAGS(c->be) &= ~SLAP_DBFLAG_NOLASTMOD;
- else
- SLAP_DBFLAGS(c->be) |= SLAP_DBFLAG_NOLASTMOD;
- break;
-
-#ifdef SLAPD_MODULES
- case CFG_MODLOAD:
- if(module_load(c->argv[1], c->argc - 2, (c->argc > 2) ? c->argv + 2 : NULL))
- return(1);
- break;
-
- case CFG_MODPATH:
- if(module_path(c->argv[1])) return(1);
- break;
-#endif
-
-#ifdef LDAP_SLAPI
- case CFG_PLUGIN:
- if(slapi_int_read_config(c->be, c->fname, c->lineno, c->argc, c->argv) != LDAP_SUCCESS)
- return(1);
- slapi_plugins_used++;
- break;
-#endif
-
-#ifdef SLAP_AUTH_REWRITE
- case CFG_REWRITE:
- if(slap_sasl_rewrite_config(c->fname, c->lineno, c->argc, c->argv))
- return(1);
- break;
-#endif
-
-
- default:
- Debug(LDAP_DEBUG_ANY, "%s: unknown CFG_TYPE %d"
- "(ignored)\n", c->log, c->type, 0);
-
- }
- return(0);
-}
-
-
-int
-config_search_base(ConfigArgs *c) {
- struct berval dn;
- int rc;
- if(c->bi || c->be != frontendDB) {
- Debug(LDAP_DEBUG_ANY, "%s: defaultSearchBase line must appear "
- "prior to any backend or database definition\n",
- c->log, 0, 0);
- return(1);
- }
-
- if(default_search_nbase.bv_len) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "default search base \"%s\" already defined "
- "(discarding old)\n",
- c->log, default_search_base.bv_val, 0);
- free(default_search_base.bv_val);
- free(default_search_nbase.bv_val);
- }
-
- ber_str2bv(c->argv[1], 0, 1, &dn);
- rc = dnPrettyNormal(NULL, &dn, &default_search_base, &default_search_nbase, NULL);
-
- if(rc != LDAP_SUCCESS) {
- Debug(LDAP_DEBUG_ANY,
- "%s: defaultSearchBase DN is invalid: %d (%s)\n",
- c->log, rc, ldap_err2string( rc ));
- return(1);
- }
- return(0);
-}
-
-int
-config_passwd_hash(ConfigArgs *c) {
- int i;
- if(default_passwd_hash) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "already set default password_hash\n",
- c->log, 0, 0);
- return(1);
- }
- for(i = 1; i < c->argc; i++) {
- if(!lutil_passwd_scheme(c->argv[i])) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "password scheme \"%s\" not available\n",
- c->log, c->argv[i], 0);
- } else {
- ldap_charray_add(&default_passwd_hash, c->argv[i]);
- }
- if(!default_passwd_hash) {
- Debug(LDAP_DEBUG_ANY, "%s: no valid hashes found\n",
- c->log, 0, 0 );
- return(1);
- }
- }
- return(0);
-}
-
-int
-config_schema_dn(ConfigArgs *c) {
- struct berval dn;
- int rc;
- ber_str2bv(c->argv[1], 0, 1, &dn);
- rc = dnPrettyNormal(NULL, &dn, &c->be->be_schemadn, &c->be->be_schemandn, NULL);
- if(rc != LDAP_SUCCESS) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "schema DN is invalid: %d (%s)\n",
- c->log, rc, ldap_err2string( rc ));
- return(1);
- }
- return(0);
-}
-
-int
-config_sizelimit(ConfigArgs *c) {
- int i, rc = 0;
- char *next;
- struct slap_limits_set *lim = &c->be->be_def_limit;
- for(i = 1; i < c->argc; i++) {
- if(!strncasecmp(c->argv[i], "size", 4)) {
- rc = limits_parse_one(c->argv[i], lim);
- if ( rc ) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "unable to parse value \"%s\" in \"sizelimit <limit>\" line\n",
- c->log, c->argv[i], 0);
- return(1);
- }
- } else {
- if(!strcasecmp(c->argv[i], "unlimited")) {
- lim->lms_s_soft = -1;
- } else {
- lim->lms_s_soft = strtol(c->argv[i], &next, 0);
- if(next == c->argv[i]) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "unable to parse limit \"%s\" in \"sizelimit <limit>\" line\n",
- c->log, c->argv[i], 0);
- return(1);
- } else if(next[0] != '\0') {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "trailing chars \"%s\" in \"sizelimit <limit>\" line (ignored)\n",
- c->log, next, 0);
- }
- }
- lim->lms_s_hard = 0;
- }
- }
- return(0);
-}
-
-int
-config_timelimit(ConfigArgs *c) {
- int i, rc = 0;
- char *next;
- struct slap_limits_set *lim = &c->be->be_def_limit;
- for(i = 1; i < c->argc; i++) {
- if(!strncasecmp(c->argv[i], "time", 4)) {
- rc = limits_parse_one(c->argv[i], lim);
- if ( rc ) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "unable to parse value \"%s\" in \"timelimit <limit>\" line\n",
- c->log, c->argv[i], 0);
- return(1);
- }
- } else {
- if(!strcasecmp(c->argv[i], "unlimited")) {
- lim->lms_t_soft = -1;
- } else {
- lim->lms_t_soft = strtol(c->argv[i], &next, 0);
- if(next == c->argv[i]) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "unable to parse limit \"%s\" in \"timelimit <limit>\" line\n",
- c->log, c->argv[i], 0);
- return(1);
- } else if(next[0] != '\0') {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "trailing chars \"%s\" in \"timelimit <limit>\" line (ignored)\n",
- c->log, next, 0);
- }
- }
- lim->lms_t_hard = 0;
- }
- }
- return(0);
-}
-
-int
-config_overlay(ConfigArgs *c) {
- if(c->argv[1][0] == '-' && overlay_config(c->be, &c->argv[1][1])) {
- /* log error */
- Debug(LDAP_DEBUG_ANY, "%s: (optional) %s overlay \"%s\" configuration failed (ignored)\n",
- c->log, c->be == frontendDB ? "global " : "", c->argv[1][1]);
- } else if(overlay_config(c->be, c->argv[1])) {
- return(1);
- }
- return(0);
-}
-
-int
-config_suffix(ConfigArgs *c) {
- Backend *tbe;
- struct berval dn, pdn, ndn;
- int rc;
-#ifdef SLAPD_MONITOR_DN
- if(!strcasecmp(c->argv[1], SLAPD_MONITOR_DN)) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "\"%s\" is reserved for monitoring slapd\n",
- c->log, SLAPD_MONITOR_DN, 0);
- return(1);
- }
-#endif
- ber_str2bv(c->argv[1], 0, 1, &dn);
-
- rc = dnPrettyNormal(NULL, &dn, &pdn, &ndn, NULL);
- if(rc != LDAP_SUCCESS) {
- Debug( LDAP_DEBUG_ANY,
- "%s: suffix DN is invalid: %d (%s)\n",
- c->log, rc, ldap_err2string( rc ));
- return(1);
- }
- tbe = select_backend(&ndn, 0, 0);
- if(tbe == c->be) {
- Debug(LDAP_DEBUG_ANY, "%s: suffix already served by this backend! (ignored)\n",
- c->log, 0, 0);
- free(pdn.bv_val);
- free(ndn.bv_val);
- } else if(tbe) {
- Debug(LDAP_DEBUG_ANY, "%s: suffix already served by a preceding backend \"%s\"\n",
- c->log, tbe->be_suffix[0].bv_val, 0);
- free(pdn.bv_val);
- free(ndn.bv_val);
- return(1);
- } else if(pdn.bv_len == 0 && default_search_nbase.bv_len) {
- Debug(LDAP_DEBUG_ANY, "%s: suffix DN empty and default search "
- "base provided \"%s\" (assuming okay)\n",
- c->log, default_search_base.bv_val, 0);
- }
- ber_bvarray_add(&c->be->be_suffix, &pdn);
- ber_bvarray_add(&c->be->be_nsuffix, &ndn);
- return(0);
-}
-
-int
-config_rootdn(ConfigArgs *c) {
- struct berval dn;
- int rc;
-
- ber_str2bv(c->argv[1], 0, 1, &dn);
-
- rc = dnPrettyNormal(NULL, &dn, &c->be->be_rootdn, &c->be->be_rootndn, NULL);
-
- if(rc != LDAP_SUCCESS) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "rootdn DN is invalid: %d (%s)\n",
- c->log, rc, ldap_err2string( rc ));
- return(1);
- }
- return(0);
-}
-
-int
-config_rootpw(ConfigArgs *c) {
- Backend *tbe = select_backend(&c->be->be_rootndn, 0, 0);
- if(tbe != c->be) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "rootpw can only be set when rootdn is under suffix\n",
- c->log, 0, 0);
- return(1);
- }
- ber_str2bv(c->argv[1], 0, 1, &c->be->be_rootpw);
- return(0);
-}
-
/* restrictops, allows, disallows, requires, loglevel */
-struct verb_mask_list { char *word; int mask; };
-
int
-verb_to_mask(ConfigArgs *c, struct verb_mask_list *v, int word) {
- int j;
- for(j = 0; v[j].word; j++)
- if(!strcasecmp(c->argv[word], v[j].word))
+verb_to_mask(const char *word, slap_verbmasks *v) {
+ int i;
+ for(i = 0; !BER_BVISNULL(&v[i].word); i++)
+ if(!strcasecmp(word, v[i].word.bv_val))
break;
- return(j);
+ return(i);
}
int
-verbs_to_mask(ConfigArgs *c, struct verb_mask_list *v, slap_mask_t *m) {
+verbs_to_mask(int argc, char *argv[], slap_verbmasks *v, slap_mask_t *m) {
int i, j;
- for(i = 1; i < c->argc; i++) {
- j = verb_to_mask(c, v, i);
- if(!v[j].word) return(1);
+ for(i = 1; i < argc; i++) {
+ j = verb_to_mask(argv[i], v);
+ if(BER_BVISNULL(&v[j].word)) return(1);
+ while (!v[j].mask) j--;
*m |= v[j].mask;
}
return(0);
}
int
-config_restrict(ConfigArgs *c) {
- slap_mask_t restrictops = 0;
+mask_to_verbs(slap_verbmasks *v, slap_mask_t m, BerVarray *bva) {
int i, j;
- struct verb_mask_list restrictable_exops[] = {
- { LDAP_EXOP_START_TLS, SLAP_RESTRICT_EXOP_START_TLS },
- { LDAP_EXOP_MODIFY_PASSWD, SLAP_RESTRICT_EXOP_MODIFY_PASSWD },
- { LDAP_EXOP_X_WHO_AM_I, SLAP_RESTRICT_EXOP_WHOAMI },
- { LDAP_EXOP_X_CANCEL, SLAP_RESTRICT_EXOP_CANCEL },
- { NULL, 0 }
- };
- struct verb_mask_list restrictable_ops[] = {
- { "bind", SLAP_RESTRICT_OP_BIND },
- { "add", SLAP_RESTRICT_OP_ADD },
- { "modify", SLAP_RESTRICT_OP_MODIFY },
- { "modrdn", SLAP_RESTRICT_OP_RENAME },
- { "rename", SLAP_RESTRICT_OP_RENAME },
- { "delete", SLAP_RESTRICT_OP_DELETE },
- { "search", SLAP_RESTRICT_OP_SEARCH },
- { "compare", SLAP_RESTRICT_OP_COMPARE },
- { "read", SLAP_RESTRICT_OP_READS },
- { "write", SLAP_RESTRICT_OP_WRITES },
- { NULL, 0 }
- };
-
- for(i = 1; i < c->argc; i++) {
- j = verb_to_mask(c, restrictable_ops, i);
- if(restrictable_ops[j].word) {
- restrictops |= restrictable_ops[j].mask;
- continue;
- } else if(!strncasecmp(c->argv[i], "extended", STRLENOF("extended"))) {
- char *e = c->argv[i] + STRLENOF("extended");
- if(e[0] == '=') {
- int k = verb_to_mask(c, restrictable_exops, e[1]);
- if(restrictable_exops[k].word) {
- restrictops |= restrictable_exops[k].mask;
- continue;
- } else break;
- } else if(!e[0]) {
- restrictops &= ~SLAP_RESTRICT_EXOP_MASK;
- restrictops |= SLAP_RESTRICT_OP_EXTENDED;
- } else break;
- }
- }
- if(i < c->argc) {
- c->be->be_restrictops |= restrictops;
- return(0);
- }
- Debug(LDAP_DEBUG_ANY, "%s: "
- "unknown operation %s in \"restrict <features>\" line\n",
- c->log, c->argv[i], 0);
- return(1);
-}
-
-int
-config_allows(ConfigArgs *c) {
- slap_mask_t allows = 0;
- int i;
- struct verb_mask_list allowable_ops[] = {
- { "bind_v2", SLAP_ALLOW_BIND_V2 },
- { "bind_anon_cred", SLAP_ALLOW_BIND_ANON_CRED },
- { "bind_anon_dn", SLAP_ALLOW_BIND_ANON_DN },
- { "update_anon", SLAP_ALLOW_UPDATE_ANON },
- { NULL, 0 }
- };
- i = verbs_to_mask(c, allowable_ops, &allows);
- if ( i ) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "unknown feature %s in \"allow <features>\" line\n",
- c->log, c->argv[i], 0);
- return(1);
- }
- global_allows |= allows;
- return(0);
-}
-
-int
-config_disallows(ConfigArgs *c) {
- slap_mask_t disallows = 0;
- int i;
- struct verb_mask_list disallowable_ops[] = {
- { "bind_anon", SLAP_DISALLOW_BIND_ANON },
- { "bind_simple", SLAP_DISALLOW_BIND_SIMPLE },
- { "bind_krb4", SLAP_DISALLOW_BIND_KRBV4 },
- { "tls_2_anon", SLAP_DISALLOW_TLS_2_ANON },
- { "tls_authc", SLAP_DISALLOW_TLS_AUTHC },
- { NULL, 0 }
- };
- i = verbs_to_mask(c, disallowable_ops, &disallows);
- if ( i ) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "unknown feature %s in \"disallow <features>\" line\n",
- c->log, c->argv[i], 0);
- return(1);
- }
- global_disallows |= disallows;
- return(0);
-}
-
-int
-config_requires(ConfigArgs *c) {
- slap_mask_t requires = 0;
- int i;
- struct verb_mask_list requires_ops[] = {
- { "bind", SLAP_REQUIRE_BIND },
- { "LDAPv3", SLAP_REQUIRE_LDAP_V3 },
- { "authc", SLAP_REQUIRE_AUTHC },
- { "sasl", SLAP_REQUIRE_SASL },
- { "strong", SLAP_REQUIRE_STRONG },
- { NULL, 0 }
- };
- i = verbs_to_mask(c, requires_ops, &requires);
- if ( i ) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "unknown feature %s in \"require <features>\" line\n",
- c->log, c->argv[i], 0);
- return(1);
- }
- c->be->be_requires = requires;
- return(0);
-}
+ struct berval bv;
-int
-config_loglevel(ConfigArgs *c) {
- int i;
- char *next;
- struct verb_mask_list loglevel_ops[] = {
- { "Trace", LDAP_DEBUG_TRACE },
- { "Packets", LDAP_DEBUG_PACKETS },
- { "Args", LDAP_DEBUG_ARGS },
- { "Conns", LDAP_DEBUG_CONNS },
- { "BER", LDAP_DEBUG_BER },
- { "Filter", LDAP_DEBUG_FILTER },
- { "Config", LDAP_DEBUG_CONFIG },
- { "ACL", LDAP_DEBUG_ACL },
- { "Stats", LDAP_DEBUG_STATS },
- { "Stats2", LDAP_DEBUG_STATS2 },
- { "Shell", LDAP_DEBUG_SHELL },
- { "Parse", LDAP_DEBUG_PARSE },
- { "Cache", LDAP_DEBUG_CACHE },
- { "Index", LDAP_DEBUG_INDEX },
- { "Any", -1 },
- { NULL, 0 }
- };
- ldap_syslog = 0;
-
- for( i=1; i < c->argc; i++ ) {
- int level;
-
- if ( isdigit( c->argv[i][0] ) ) {
- level = strtol( c->argv[i], &next, 10 );
- if ( next == NULL || next[0] != '\0' ) {
- Debug( LDAP_DEBUG_ANY,
- "%s: unable to parse level \"%s\" "
- "in \"loglevel <level> [...]\" line.\n",
- c->log, c->argv[i], 0);
- return( 1 );
- }
- } else {
- int j = verb_to_mask(c, loglevel_ops, c->argv[i][0]);
- if(!loglevel_ops[j].word) {
- Debug( LDAP_DEBUG_ANY,
- "%s: unknown level \"%s\" "
- "in \"loglevel <level> [...]\" line.\n",
- c->log, c->argv[i], 0);
- return( 1 );
- }
- level = loglevel_ops[j].mask;
+ if (!m) return 1;
+ for (i=0; !BER_BVISNULL(&v[i].word); i++) {
+ if (!v[i].mask) continue;
+ if (( m & v[i].mask ) == v[i].mask ) {
+ value_add_one( bva, &v[i].word );
}
- ldap_syslog |= level;
- }
- return(0);
-}
-
-int
-config_syncrepl(ConfigArgs *c) {
- if(SLAP_SHADOW(c->be)) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "syncrepl: database already shadowed.\n",
- c->log, 0, 0);
- return(1);
- } else if(add_syncrepl(c->be, c->argv, c->argc)) {
- return(1);
- }
- SLAP_DBFLAGS(c->be) |= (SLAP_DBFLAG_SHADOW | SLAP_DBFLAG_SYNC_SHADOW);
- return(0);
-}
-
-int
-config_referral(ConfigArgs *c) {
- struct berval vals[2];
- if(validate_global_referral(c->argv[1])) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "invalid URL (%s) in \"referral\" line.\n",
- c->log, c->argv[1], 0);
- return(1);
}
-
- ber_str2bv(c->argv[1], 0, 1, &vals[0]);
- vals[1].bv_val = NULL; vals[1].bv_len = 0;
- if(value_add(&default_referral, vals)) return(LDAP_OTHER);
- return(0);
+ return 0;
}
-int
-config_security(ConfigArgs *c) {
- slap_ssf_set_t *set = &c->be->be_ssf_set;
- char *next;
- int i;
- for(i = 1; i < c->argc; i++) {
- slap_ssf_t *tgt;
- char *src;
- if(!strncasecmp(c->argv[i], "ssf=", 4)) {
- tgt = &set->sss_ssf;
- src = &c->argv[i][4];
- } else if(!strncasecmp(c->argv[i], "transport=", 10)) {
- tgt = &set->sss_transport;
- src = &c->argv[i][10];
- } else if(!strncasecmp(c->argv[i], "tls=", 4)) {
- tgt = &set->sss_tls;
- src = &c->argv[i][4];
- } else if(!strncasecmp(c->argv[i], "sasl=", 5)) {
- tgt = &set->sss_sasl;
- src = &c->argv[i][5];
- } else if(!strncasecmp(c->argv[i], "update_ssf=", 11)) {
- tgt = &set->sss_update_ssf;
- src = &c->argv[i][11];
- } else if(!strncasecmp(c->argv[i], "update_transport=", 17)) {
- tgt = &set->sss_update_transport;
- src = &c->argv[i][17];
- } else if(!strncasecmp(c->argv[i], "update_tls=", 11)) {
- tgt = &set->sss_update_tls;
- src = &c->argv[i][11];
- } else if(!strncasecmp(c->argv[i], "update_sasl=", 12)) {
- tgt = &set->sss_update_sasl;
- src = &c->argv[i][12];
- } else if(!strncasecmp(c->argv[i], "simple_bind=", 12)) {
- tgt = &set->sss_simple_bind;
- src = &c->argv[i][12];
- } else {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "unknown factor %s in \"security <factors>\" line\n",
- c->log, c->argv[i], 0);
- return(1);
- }
+static slap_verbmasks tlskey[] = {
+ { BER_BVC("no"), SB_TLS_OFF },
+ { BER_BVC("yes"), SB_TLS_ON },
+ { BER_BVC("critical"), SB_TLS_CRITICAL },
+ { BER_BVNULL, 0 }
+};
- *tgt = strtol(src, &next, 10);
- if(next == NULL || next[0] != '\0' ) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "unable to parse factor \"%s\" in \"security <factors>\" line\n",
- c->log, c->argv[i], 0);
- return(1);
- }
- }
- return(0);
-}
+static slap_verbmasks methkey[] = {
+ { BER_BVC("simple"), LDAP_AUTH_SIMPLE },
+#ifdef HAVE_CYRUS_SASL
+ { BER_BVC("sasl"), LDAP_AUTH_SASL },
+#endif
+ { BER_BVNULL, 0 }
+};
-int
-config_replica(ConfigArgs *c) {
- int i, nr = -1;
- char *replicahost, *replicalog = NULL;
- LDAPURLDesc *ludp;
-
- if(SLAP_MONITOR(c->be)) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "\"replica\" should not be used inside monitor database\n",
- c->log, 0, 0);
- return(0); /* FIXME: should this be an error? */
- }
+typedef struct cf_aux_table {
+ struct berval key;
+ int off;
+ int quote;
+ slap_verbmasks *aux;
+} cf_aux_table;
+
+static cf_aux_table bindkey[] = {
+ { BER_BVC("starttls="), offsetof(slap_bindconf, sb_tls), 0, tlskey },
+ { BER_BVC("bindmethod="), offsetof(slap_bindconf, sb_method), 0, methkey },
+ { BER_BVC("binddn="), offsetof(slap_bindconf, sb_binddn), 1, NULL },
+ { BER_BVC("credentials="), offsetof(slap_bindconf, sb_cred), 1, NULL },
+ { BER_BVC("saslmech="), offsetof(slap_bindconf, sb_saslmech), 0, NULL },
+ { BER_BVC("secprops="), offsetof(slap_bindconf, sb_secprops), 0, NULL },
+ { BER_BVC("realm="), offsetof(slap_bindconf, sb_realm), 0, NULL },
+ { BER_BVC("authcID="), offsetof(slap_bindconf, sb_authcId), 0, NULL },
+ { BER_BVC("authzID="), offsetof(slap_bindconf, sb_authzId), 1, NULL },
+ { BER_BVNULL, 0, 0, NULL }
+};
- for(i = 1; i < c->argc; i++) {
- if(!strncasecmp(c->argv[i], "host=", STRLENOF("host="))) {
- replicalog = c->argv[i] + STRLENOF("host=");
- nr = add_replica_info(c->be, c->argv[i] + STRLENOF("host="));
- break;
- } else if(!strncasecmp(c->argv[i], "uri=", STRLENOF("uri="))) {
- if(ldap_url_parse(c->argv[i] + STRLENOF("uri="), &ludp) != LDAP_SUCCESS) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "replica line contains invalid "
- "uri definition.\n", c->log, 0, 0);
- return(1);
- }
- if(!ludp->lud_host) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "replica line contains invalid "
- "uri definition - missing hostname.\n",
- c->log, 0, 0);
- return(1);
- }
- replicahost = ch_malloc(strlen(c->argv[i]));
- if(!replicahost) {
- Debug(LDAP_DEBUG_ANY,
- "out of memory in read_config\n", 0, 0, 0);
- ldap_free_urldesc(ludp);
- exit(EXIT_FAILURE);
+int bindconf_parse( const char *word, slap_bindconf *bc ) {
+ int i, rc = 0;
+ char **cptr;
+ cf_aux_table *tab;
+
+ for (tab = bindkey; !BER_BVISNULL(&tab->key); tab++) {
+ if ( !strncasecmp( word, tab->key.bv_val, tab->key.bv_len )) {
+ cptr = (char **)((char *)bc + tab->off);
+ if ( tab->aux ) {
+ int j;
+ rc = 1;
+ for (j=0; !BER_BVISNULL(&tab->aux[j].word); j++) {
+ if (!strcasecmp(word+tab->key.bv_len, tab->aux[j].word.bv_val)) {
+ int *ptr = (int *)cptr;
+ *ptr = tab->aux[j].mask;
+ rc = 0;
+ }
+ }
+ if (rc ) {
+ Debug(LDAP_DEBUG_ANY, "invalid bind config value %s\n",
+ word, 0, 0 );
+ }
+ return rc;
}
- sprintf(replicahost, "%s:%d", ludp->lud_host, ludp->lud_port);
- replicalog = c->argv[i] + STRLENOF("uri=");
- nr = add_replica_info(c->be, replicahost);
- ldap_free_urldesc(ludp);
- ch_free(replicahost);
- break;
+ *cptr = ch_strdup(word+tab->key.bv_len);
+ return 0;
}
}
- if(i == c->argc) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "missing host or uri in \"replica\" line\n",
- c->log, 0, 0);
- return(1);
- } else if(nr == -1) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "unable to add replica \"%s\"\n",
- c->log, replicalog, 0);
- return(1);
- } else {
- for(i = 1; i < c->argc; i++) {
- if(!strncasecmp(c->argv[i], "suffix=", STRLENOF( "suffix="))) {
- switch(add_replica_suffix(c->be, nr, c->argv[i] + STRLENOF("suffix="))) {
- case 1:
- Debug(LDAP_DEBUG_ANY, "%s: "
- "suffix \"%s\" in \"replica\" line is not valid for backend (ignored)\n",
- c->log, c->argv[i] + STRLENOF("suffix="), 0);
- break;
- case 2:
- Debug(LDAP_DEBUG_ANY, "%s: "
- "unable to normalize suffix in \"replica\" line (ignored)\n",
- c->log, 0, 0);
- break;
- }
-
- } else if(!strncasecmp(c->argv[i], "attr", STRLENOF("attr"))) {
- int exclude = 0;
- char *arg = c->argv[i] + STRLENOF("attr");
- if(arg[0] == '!') {
- arg++;
- exclude = 1;
- }
- if(arg[0] != '=') {
- continue;
- }
- if(add_replica_attrs(c->be, nr, arg + 1, exclude)) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "attribute \"%s\" in \"replica\" line is unknown\n",
- c->log, arg + 1, 0);
- return(1);
+ return rc;
+}
+
+int bindconf_unparse( slap_bindconf *bc, struct berval *bv ) {
+ char buf[BUFSIZ], *ptr;
+ cf_aux_table *tab;
+ char **cptr;
+ struct berval tmp;
+
+ ptr = buf;
+ for (tab = bindkey; !BER_BVISNULL(&tab->key); tab++) {
+ cptr = (char **)((char *)bc + tab->off);
+ if ( tab->aux ) {
+ int *ip = (int *)cptr, i;
+ for ( i=0; !BER_BVISNULL(&tab->aux[i].word); i++ ) {
+ if ( *ip == tab->aux[i].mask ) {
+ *ptr++ = ' ';
+ ptr = lutil_strcopy( ptr, tab->key.bv_val );
+ ptr = lutil_strcopy( ptr, tab->aux[i].word.bv_val );
+ break;
}
}
+ } else if ( *cptr ) {
+ *ptr++ = ' ';
+ ptr = lutil_strcopy( ptr, tab->key.bv_val );
+ if ( tab->quote ) *ptr++ = '"';
+ ptr = lutil_strcopy( ptr, *cptr );
+ if ( tab->quote ) *ptr++ = '"';
}
}
- return(0);
+ tmp.bv_val = buf;
+ tmp.bv_len = ptr - buf;
+ ber_dupbv( bv, &tmp );
+ return 0;
}
-int
-config_updatedn(ConfigArgs *c) {
- struct berval dn;
- int rc;
- if(SLAP_SHADOW(c->be)) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "updatedn: database already shadowed.\n",
- c->log, 0, 0);
- return(1);
+void bindconf_free( slap_bindconf *bc ) {
+ if ( bc->sb_binddn ) {
+ ch_free( bc->sb_binddn );
}
-
- ber_str2bv(c->argv[1], 0, 0, &dn);
-
- rc = dnNormalize(0, NULL, NULL, &dn, &c->be->be_update_ndn, NULL);
-
- if(rc != LDAP_SUCCESS) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "updatedn DN is invalid: %d (%s)\n",
- c->log, rc, ldap_err2string( rc ));
- return(1);
+ if ( bc->sb_cred ) {
+ ch_free( bc->sb_cred );
}
-
- SLAP_DBFLAGS(c->be) |= (SLAP_DBFLAG_SHADOW | SLAP_DBFLAG_SLURP_SHADOW);
- return(0);
-}
-
-int
-config_updateref(ConfigArgs *c) {
- struct berval vals[2];
- if(!SLAP_SHADOW(c->be)) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "updateref line must after syncrepl or updatedn.\n",
- c->log, 0, 0);
- return(1);
+ if ( bc->sb_saslmech ) {
+ ch_free( bc->sb_saslmech );
}
-
- if(validate_global_referral(c->argv[1])) {
- Debug(LDAP_DEBUG_ANY, "%s: "
- "invalid URL (%s) in \"updateref\" line.\n",
- c->log, c->argv[1], 0);
- return(1);
+ if ( bc->sb_secprops ) {
+ ch_free( bc->sb_secprops );
}
- ber_str2bv(c->argv[1], 0, 0, &vals[0]);
- vals[1].bv_val = NULL;
- if(value_add(&c->be->be_update_refs, vals)) return(LDAP_OTHER);
- return(0);
-}
-
-/* XXX meaningless in ldif */
-
-int
-config_include(ConfigArgs *c) {
- char *savefname = ch_strdup(c->argv[1]);
- unsigned long savelineno = c->lineno;
- int rc;
- rc = read_config_file(savefname, c->depth + 1, c);
- free(savefname);
- c->lineno = savelineno - 1;
- return(rc);
-}
-
-#ifdef HAVE_TLS
-int
-config_tls_option(ConfigArgs *c) {
- int flag;
- switch(c->type) {
- case CFG_TLS_RAND: flag = LDAP_OPT_X_TLS_RANDOM_FILE; break;
- case CFG_TLS_CIPHER: flag = LDAP_OPT_X_TLS_CIPHER_SUITE; break;
- case CFG_TLS_CERT_FILE: flag = LDAP_OPT_X_TLS_CERTFILE; break;
- case CFG_TLS_CERT_KEY: flag = LDAP_OPT_X_TLS_KEYFILE; break;
- case CFG_TLS_CERT_PATH: flag = LDAP_OPT_X_TLS_CACERTDIR; break;
- case CFG_TLS_CA_FILE: flag = LDAP_OPT_X_TLS_CACERTFILE; break;
-#ifdef HAVE_OPENSSL_CRL
- case CFG_TLS_CRLCHECK: flag = LDAP_OPT_X_TLS_CRLCHECK; break;
-#endif
- default: Debug(LDAP_DEBUG_ANY, "%s: "
- "unknown tls_option <%x>\n",
- c->log, c->type, 0);
+ if ( bc->sb_realm ) {
+ ch_free( bc->sb_realm );
}
- return(ldap_pvt_tls_set_option(NULL, flag, c->argv[1]));
-}
-
-int
-config_tls_verify(ConfigArgs *c) {
- int i;
- if(isdigit((unsigned char)c->argv[1][0])) {
- i = atoi(c->argv[1]);
- return(ldap_pvt_tls_set_option(NULL, LDAP_OPT_X_TLS_REQUIRE_CERT, &i));
- } else {
- return(ldap_int_tls_config(NULL, LDAP_OPT_X_TLS_REQUIRE_CERT, c->argv[1]));
+ if ( bc->sb_authcId ) {
+ ch_free( bc->sb_authcId );
+ }
+ if ( bc->sb_authzId ) {
+ ch_free( bc->sb_authzId );
}
}
-#endif
+
/* -------------------------------------- */
return(0);
}
-
-#if 0
-/* Loads ucdata, returns 1 if loading, 0 if already loaded, -1 on error */
-static int
-load_ucdata( char *path )
-{
-#if 0
- static int loaded = 0;
- int err;
-
- if ( loaded ) {
- return( 0 );
- }
- err = ucdata_load( path ? path : SLAPD_DEFAULT_UCDATA, UCDATA_ALL );
- if ( err ) {
- Debug( LDAP_DEBUG_ANY, "error loading ucdata (error %d)\n",
- err, 0, 0 );
-
- return( -1 );
- }
- loaded = 1;
- return( 1 );
-#else
- /* ucdata is now hardcoded */
- return( 0 );
-#endif
-}
-#endif
-
void
config_destroy( )
{
ldap_charray_free( default_passwd_hash );
}
-static int
-add_syncrepl(
- Backend *be,
- char **cargv,
- int cargc
-)
-{
- syncinfo_t *si;
- int rc = 0;
-
- si = (syncinfo_t *) ch_calloc( 1, sizeof( syncinfo_t ) );
-
- if ( si == NULL ) {
- Debug( LDAP_DEBUG_ANY, "out of memory in add_syncrepl\n", 0, 0, 0 );
- return 1;
- }
-
- si->si_tls = SYNCINFO_TLS_OFF;
- si->si_bindmethod = LDAP_AUTH_SIMPLE;
- si->si_schemachecking = 0;
- ber_str2bv( "(objectclass=*)", STRLENOF("(objectclass=*)"), 1,
- &si->si_filterstr );
- si->si_base.bv_val = NULL;
- si->si_scope = LDAP_SCOPE_SUBTREE;
- si->si_attrsonly = 0;
- si->si_anlist = (AttributeName *) ch_calloc( 1, sizeof( AttributeName ));
- si->si_exanlist = (AttributeName *) ch_calloc( 1, sizeof( AttributeName ));
- si->si_attrs = NULL;
- si->si_allattrs = 0;
- si->si_allopattrs = 0;
- si->si_exattrs = NULL;
- si->si_type = LDAP_SYNC_REFRESH_ONLY;
- si->si_interval = 86400;
- si->si_retryinterval = NULL;
- si->si_retrynum_init = NULL;
- si->si_retrynum = NULL;
- si->si_manageDSAit = 0;
- si->si_tlimit = 0;
- si->si_slimit = 0;
-
- si->si_presentlist = NULL;
- LDAP_LIST_INIT( &si->si_nonpresentlist );
-
- rc = parse_syncrepl_line( cargv, cargc, si );
-
- if ( rc < 0 ) {
- Debug( LDAP_DEBUG_ANY, "failed to add syncinfo\n", 0, 0, 0 );
- syncinfo_free( si );
- return 1;
- } else {
- Debug( LDAP_DEBUG_CONFIG,
- "Config: ** successfully added syncrepl \"%s\"\n",
- BER_BVISNULL( &si->si_provideruri ) ?
- "(null)" : si->si_provideruri.bv_val, 0, 0 );
- if ( !si->si_schemachecking ) {
- SLAP_DBFLAGS(be) |= SLAP_DBFLAG_NO_SCHEMA_CHECK;
- }
- si->si_be = be;
- be->be_syncinfo = si;
- return 0;
- }
-}
-
-/* NOTE: used & documented in slapd.conf(5) */
-#define IDSTR "rid"
-#define PROVIDERSTR "provider"
-#define TYPESTR "type"
-#define INTERVALSTR "interval"
-#define SEARCHBASESTR "searchbase"
-#define FILTERSTR "filter"
-#define SCOPESTR "scope"
-#define ATTRSSTR "attrs"
-#define ATTRSONLYSTR "attrsonly"
-#define SLIMITSTR "sizelimit"
-#define TLIMITSTR "timelimit"
-#define SCHEMASTR "schemachecking"
-#define BINDMETHSTR "bindmethod"
-#define SIMPLESTR "simple"
-#define SASLSTR "sasl"
-#define BINDDNSTR "binddn"
-#define SASLMECHSTR "saslmech"
-#define AUTHCSTR "authcID"
-#define AUTHZSTR "authzID"
-#define CREDSTR "credentials"
-#define REALMSTR "realm"
-#define SECPROPSSTR "secprops"
-
-/* FIXME: undocumented */
-#define OLDAUTHCSTR "bindprincipal"
-#define STARTTLSSTR "starttls"
-#define CRITICALSTR "critical"
-#define EXATTRSSTR "exattrs"
-#define MANAGEDSAITSTR "manageDSAit"
-#define RETRYSTR "retry"
-
-/* FIXME: unused */
-#define LASTMODSTR "lastmod"
-#define LMGENSTR "gen"
-#define LMNOSTR "no"
-#define LMREQSTR "req"
-#define SRVTABSTR "srvtab"
-#define SUFFIXSTR "suffix"
-#define UPDATEDNSTR "updatedn"
-
-/* mandatory */
-#define GOT_ID 0x0001
-#define GOT_PROVIDER 0x0002
-#define GOT_METHOD 0x0004
-
-/* check */
-#define GOT_ALL (GOT_ID|GOT_PROVIDER|GOT_METHOD)
-
-static int
-parse_syncrepl_line(
- char **cargv,
- int cargc,
- syncinfo_t *si
-)
-{
- int gots = 0;
- int i;
- char *val;
-
- for ( i = 1; i < cargc; i++ ) {
- if ( !strncasecmp( cargv[ i ], IDSTR "=",
- STRLENOF( IDSTR "=" ) ) )
- {
- int tmp;
- /* '\0' string terminator accounts for '=' */
- val = cargv[ i ] + STRLENOF( IDSTR "=" );
- tmp= atoi( val );
- if ( tmp >= 1000 || tmp < 0 ) {
- fprintf( stderr, "Error: parse_syncrepl_line: "
- "syncrepl id %d is out of range [0..999]\n", tmp );
- return -1;
- }
- si->si_rid = tmp;
- gots |= GOT_ID;
- } else if ( !strncasecmp( cargv[ i ], PROVIDERSTR "=",
- STRLENOF( PROVIDERSTR "=" ) ) )
- {
- val = cargv[ i ] + STRLENOF( PROVIDERSTR "=" );
- ber_str2bv( val, 0, 1, &si->si_provideruri );
- gots |= GOT_PROVIDER;
- } else if ( !strncasecmp( cargv[ i ], STARTTLSSTR "=",
- STRLENOF(STARTTLSSTR "=") ) )
- {
- val = cargv[ i ] + STRLENOF( STARTTLSSTR "=" );
- if( !strcasecmp( val, CRITICALSTR ) ) {
- si->si_tls = SYNCINFO_TLS_CRITICAL;
- } else {
- si->si_tls = SYNCINFO_TLS_ON;
- }
- } else if ( !strncasecmp( cargv[ i ], BINDMETHSTR "=",
- STRLENOF( BINDMETHSTR "=" ) ) )
- {
- val = cargv[ i ] + STRLENOF( BINDMETHSTR "=" );
- if ( !strcasecmp( val, SIMPLESTR )) {
- si->si_bindmethod = LDAP_AUTH_SIMPLE;
- gots |= GOT_METHOD;
- } else if ( !strcasecmp( val, SASLSTR )) {
-#ifdef HAVE_CYRUS_SASL
- si->si_bindmethod = LDAP_AUTH_SASL;
- gots |= GOT_METHOD;
-#else /* HAVE_CYRUS_SASL */
- fprintf( stderr, "Error: parse_syncrepl_line: "
- "not compiled with SASL support\n" );
- return -1;
-#endif /* HAVE_CYRUS_SASL */
- } else {
- si->si_bindmethod = -1;
- }
- } else if ( !strncasecmp( cargv[ i ], BINDDNSTR "=",
- STRLENOF( BINDDNSTR "=" ) ) )
- {
- val = cargv[ i ] + STRLENOF( BINDDNSTR "=" );
- si->si_binddn = ch_strdup( val );
- } else if ( !strncasecmp( cargv[ i ], CREDSTR "=",
- STRLENOF( CREDSTR "=" ) ) )
- {
- val = cargv[ i ] + STRLENOF( CREDSTR "=" );
- si->si_passwd = ch_strdup( val );
- } else if ( !strncasecmp( cargv[ i ], SASLMECHSTR "=",
- STRLENOF( SASLMECHSTR "=" ) ) )
- {
- val = cargv[ i ] + STRLENOF( SASLMECHSTR "=" );
- si->si_saslmech = ch_strdup( val );
- } else if ( !strncasecmp( cargv[ i ], SECPROPSSTR "=",
- STRLENOF( SECPROPSSTR "=" ) ) )
- {
- val = cargv[ i ] + STRLENOF( SECPROPSSTR "=" );
- si->si_secprops = ch_strdup( val );
- } else if ( !strncasecmp( cargv[ i ], REALMSTR "=",
- STRLENOF( REALMSTR "=" ) ) )
- {
- val = cargv[ i ] + STRLENOF( REALMSTR "=" );
- si->si_realm = ch_strdup( val );
- } else if ( !strncasecmp( cargv[ i ], AUTHCSTR "=",
- STRLENOF( AUTHCSTR "=" ) ) )
- {
- val = cargv[ i ] + STRLENOF( AUTHCSTR "=" );
- if ( si->si_authcId )
- ch_free( si->si_authcId );
- si->si_authcId = ch_strdup( val );
- } else if ( !strncasecmp( cargv[ i ], OLDAUTHCSTR "=",
- STRLENOF( OLDAUTHCSTR "=" ) ) )
- {
- /* Old authcID is provided for some backwards compatibility */
- val = cargv[ i ] + STRLENOF( OLDAUTHCSTR "=" );
- if ( si->si_authcId )
- ch_free( si->si_authcId );
- si->si_authcId = ch_strdup( val );
- } else if ( !strncasecmp( cargv[ i ], AUTHZSTR "=",
- STRLENOF( AUTHZSTR "=" ) ) )
- {
- val = cargv[ i ] + STRLENOF( AUTHZSTR "=" );
- si->si_authzId = ch_strdup( val );
- } else if ( !strncasecmp( cargv[ i ], SCHEMASTR "=",
- STRLENOF( SCHEMASTR "=" ) ) )
- {
- val = cargv[ i ] + STRLENOF( SCHEMASTR "=" );
- if ( !strncasecmp( val, "on", STRLENOF( "on" ) )) {
- si->si_schemachecking = 1;
- } else if ( !strncasecmp( val, "off", STRLENOF( "off" ) ) ) {
- si->si_schemachecking = 0;
- } else {
- si->si_schemachecking = 1;
- }
- } else if ( !strncasecmp( cargv[ i ], FILTERSTR "=",
- STRLENOF( FILTERSTR "=" ) ) )
- {
- val = cargv[ i ] + STRLENOF( FILTERSTR "=" );
- ber_str2bv( val, 0, 1, &si->si_filterstr );
- } else if ( !strncasecmp( cargv[ i ], SEARCHBASESTR "=",
- STRLENOF( SEARCHBASESTR "=" ) ) )
- {
- struct berval bv;
- int rc;
-
- val = cargv[ i ] + STRLENOF( SEARCHBASESTR "=" );
- if ( si->si_base.bv_val ) {
- ch_free( si->si_base.bv_val );
- }
- ber_str2bv( val, 0, 0, &bv );
- rc = dnNormalize( 0, NULL, NULL, &bv, &si->si_base, NULL );
- if ( rc != LDAP_SUCCESS ) {
- fprintf( stderr, "Invalid base DN \"%s\": %d (%s)\n",
- val, rc, ldap_err2string( rc ) );
- return -1;
- }
- } else if ( !strncasecmp( cargv[ i ], SCOPESTR "=",
- STRLENOF( SCOPESTR "=" ) ) )
- {
- val = cargv[ i ] + STRLENOF( SCOPESTR "=" );
- if ( !strncasecmp( val, "base", STRLENOF( "base" ) )) {
- si->si_scope = LDAP_SCOPE_BASE;
- } else if ( !strncasecmp( val, "one", STRLENOF( "one" ) )) {
- si->si_scope = LDAP_SCOPE_ONELEVEL;
-#ifdef LDAP_SCOPE_SUBORDINATE
- } else if ( !strcasecmp( val, "subordinate" ) ||
- !strcasecmp( val, "children" ))
- {
- si->si_scope = LDAP_SCOPE_SUBORDINATE;
-#endif
- } else if ( !strncasecmp( val, "sub", STRLENOF( "sub" ) )) {
- si->si_scope = LDAP_SCOPE_SUBTREE;
- } else {
- fprintf( stderr, "Error: parse_syncrepl_line: "
- "unknown scope \"%s\"\n", val);
- return -1;
- }
- } else if ( !strncasecmp( cargv[ i ], ATTRSONLYSTR "=",
- STRLENOF( ATTRSONLYSTR "=" ) ) )
- {
- si->si_attrsonly = 1;
- } else if ( !strncasecmp( cargv[ i ], ATTRSSTR "=",
- STRLENOF( ATTRSSTR "=" ) ) )
- {
- val = cargv[ i ] + STRLENOF( ATTRSSTR "=" );
- if ( !strncasecmp( val, ":include:", STRLENOF(":include:") ) ) {
- char *attr_fname;
- attr_fname = ch_strdup( val + STRLENOF(":include:") );
- si->si_anlist = file2anlist( si->si_anlist, attr_fname, " ,\t" );
- if ( si->si_anlist == NULL ) {
- ch_free( attr_fname );
- return -1;
- }
- ch_free( attr_fname );
- } else {
- char *str, *s, *next;
- char delimstr[] = " ,\t";
- str = ch_strdup( val );
- for ( s = ldap_pvt_strtok( str, delimstr, &next );
- s != NULL;
- s = ldap_pvt_strtok( NULL, delimstr, &next ) )
- {
- if ( strlen(s) == 1 && *s == '*' ) {
- si->si_allattrs = 1;
- *(val + ( s - str )) = delimstr[0];
- }
- if ( strlen(s) == 1 && *s == '+' ) {
- si->si_allopattrs = 1;
- *(val + ( s - str )) = delimstr[0];
- }
- }
- ch_free( str );
- si->si_anlist = str2anlist( si->si_anlist, val, " ,\t" );
- if ( si->si_anlist == NULL ) {
- return -1;
- }
- }
- } else if ( !strncasecmp( cargv[ i ], EXATTRSSTR "=",
- STRLENOF( EXATTRSSTR "=" ) ) )
- {
- val = cargv[ i ] + STRLENOF( EXATTRSSTR "=" );
- if ( !strncasecmp( val, ":include:", STRLENOF(":include:") )) {
- char *attr_fname;
- attr_fname = ch_strdup( val + STRLENOF(":include:") );
- si->si_exanlist = file2anlist(
- si->si_exanlist, attr_fname, " ,\t" );
- if ( si->si_exanlist == NULL ) {
- ch_free( attr_fname );
- return -1;
- }
- ch_free( attr_fname );
- } else {
- si->si_exanlist = str2anlist( si->si_exanlist, val, " ,\t" );
- if ( si->si_exanlist == NULL ) {
- return -1;
- }
- }
- } else if ( !strncasecmp( cargv[ i ], TYPESTR "=",
- STRLENOF( TYPESTR "=" ) ) )
- {
- val = cargv[ i ] + STRLENOF( TYPESTR "=" );
- if ( !strncasecmp( val, "refreshOnly",
- STRLENOF("refreshOnly") ))
- {
- si->si_type = LDAP_SYNC_REFRESH_ONLY;
- } else if ( !strncasecmp( val, "refreshAndPersist",
- STRLENOF("refreshAndPersist") ))
- {
- si->si_type = LDAP_SYNC_REFRESH_AND_PERSIST;
- si->si_interval = 60;
- } else {
- fprintf( stderr, "Error: parse_syncrepl_line: "
- "unknown sync type \"%s\"\n", val);
- return -1;
- }
- } else if ( !strncasecmp( cargv[ i ], INTERVALSTR "=",
- STRLENOF( INTERVALSTR "=" ) ) )
- {
- val = cargv[ i ] + STRLENOF( INTERVALSTR "=" );
- if ( si->si_type == LDAP_SYNC_REFRESH_AND_PERSIST ) {
- si->si_interval = 0;
- } else {
- char *hstr;
- char *mstr;
- char *dstr;
- char *sstr;
- int dd, hh, mm, ss;
- dstr = val;
- hstr = strchr( dstr, ':' );
- if ( hstr == NULL ) {
- fprintf( stderr, "Error: parse_syncrepl_line: "
- "invalid interval \"%s\"\n", val );
- return -1;
- }
- *hstr++ = '\0';
- mstr = strchr( hstr, ':' );
- if ( mstr == NULL ) {
- fprintf( stderr, "Error: parse_syncrepl_line: "
- "invalid interval \"%s\"\n", val );
- return -1;
- }
- *mstr++ = '\0';
- sstr = strchr( mstr, ':' );
- if ( sstr == NULL ) {
- fprintf( stderr, "Error: parse_syncrepl_line: "
- "invalid interval \"%s\"\n", val );
- return -1;
- }
- *sstr++ = '\0';
-
- dd = atoi( dstr );
- hh = atoi( hstr );
- mm = atoi( mstr );
- ss = atoi( sstr );
- if (( hh > 24 ) || ( hh < 0 ) ||
- ( mm > 60 ) || ( mm < 0 ) ||
- ( ss > 60 ) || ( ss < 0 ) || ( dd < 0 )) {
- fprintf( stderr, "Error: parse_syncrepl_line: "
- "invalid interval \"%s\"\n", val );
- return -1;
- }
- si->si_interval = (( dd * 24 + hh ) * 60 + mm ) * 60 + ss;
- }
- if ( si->si_interval < 0 ) {
- fprintf( stderr, "Error: parse_syncrepl_line: "
- "invalid interval \"%ld\"\n",
- (long) si->si_interval);
- return -1;
- }
- } else if ( !strncasecmp( cargv[ i ], RETRYSTR "=",
- STRLENOF( RETRYSTR "=" ) ) )
- {
- char **retry_list;
- int j, k, n;
-
- val = cargv[ i ] + STRLENOF( RETRYSTR "=" );
- retry_list = (char **) ch_calloc( 1, sizeof( char * ));
- retry_list[0] = NULL;
-
- slap_str2clist( &retry_list, val, " ,\t" );
-
- for ( k = 0; retry_list && retry_list[k]; k++ ) ;
- n = k / 2;
- if ( k % 2 ) {
- fprintf( stderr,
- "Error: incomplete syncrepl retry list\n" );
- for ( k = 0; retry_list && retry_list[k]; k++ ) {
- ch_free( retry_list[k] );
- }
- ch_free( retry_list );
- exit( EXIT_FAILURE );
- }
- si->si_retryinterval = (time_t *) ch_calloc( n + 1, sizeof( time_t ));
- si->si_retrynum = (int *) ch_calloc( n + 1, sizeof( int ));
- si->si_retrynum_init = (int *) ch_calloc( n + 1, sizeof( int ));
- for ( j = 0; j < n; j++ ) {
- si->si_retryinterval[j] = atoi( retry_list[j*2] );
- if ( *retry_list[j*2+1] == '+' ) {
- si->si_retrynum_init[j] = -1;
- si->si_retrynum[j] = -1;
- j++;
- break;
- } else {
- si->si_retrynum_init[j] = atoi( retry_list[j*2+1] );
- si->si_retrynum[j] = atoi( retry_list[j*2+1] );
- }
- }
- si->si_retrynum_init[j] = -2;
- si->si_retrynum[j] = -2;
- si->si_retryinterval[j] = 0;
-
- for ( k = 0; retry_list && retry_list[k]; k++ ) {
- ch_free( retry_list[k] );
- }
- ch_free( retry_list );
- } else if ( !strncasecmp( cargv[ i ], MANAGEDSAITSTR "=",
- STRLENOF( MANAGEDSAITSTR "=" ) ) )
- {
- val = cargv[ i ] + STRLENOF( MANAGEDSAITSTR "=" );
- si->si_manageDSAit = atoi( val );
- } else if ( !strncasecmp( cargv[ i ], SLIMITSTR "=",
- STRLENOF( SLIMITSTR "=") ) )
- {
- val = cargv[ i ] + STRLENOF( SLIMITSTR "=" );
- si->si_slimit = atoi( val );
- } else if ( !strncasecmp( cargv[ i ], TLIMITSTR "=",
- STRLENOF( TLIMITSTR "=" ) ) )
- {
- val = cargv[ i ] + STRLENOF( TLIMITSTR "=" );
- si->si_tlimit = atoi( val );
- } else {
- fprintf( stderr, "Error: parse_syncrepl_line: "
- "unknown keyword \"%s\"\n", cargv[ i ] );
- return -1;
- }
- }
-
- if ( gots != GOT_ALL ) {
- fprintf( stderr,
- "Error: Malformed \"syncrepl\" line in slapd config file" );
- return -1;
- }
-
- return 0;
-}
-
char **
slap_str2clist( char ***out, char *in, const char *brkstr )
{
/* config.h - configuration abstraction structure */
-
/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
* <http://www.OpenLDAP.org/license.html>.
*/
-typedef struct config_table_s {
+typedef struct ConfigTable {
char *name;
+ char *what;
int min_args;
int max_args;
int length;
- char *what;
- unsigned long arg_type;
+ unsigned int arg_type;
void *arg_item;
char *attribute;
AttributeDescription *ad;
void *notify;
} ConfigTable;
-#define ARGS_USERLAND 0x0000ffff
-#define ARGS_TYPES 0x00ff0000
-#define ARGS_POINTER 0x001f0000
-#define ARGS_NUMERIC 0x000f0000
-#define ARG_INT 0x00010000
-#define ARG_LONG 0x00020000
-#define ARG_BER_LEN_T 0x00040000
-#define ARG_ON_OFF 0x00080000
-#define ARG_STRING 0x00100000
-#define ARG_BERVAL 0x00200000 /* XXX not yet */
-#define ARG_EXISTS 0x00400000 /* XXX not yet */
-#define ARG_IGNORED 0x00800000
+#define ARGS_USERLAND 0x00000fff
+#define ARGS_TYPES 0x000ff000
+#define ARGS_POINTER 0x0001f000
+#define ARGS_NUMERIC 0x0000f000
+#define ARG_INT 0x00001000
+#define ARG_LONG 0x00002000
+#define ARG_BER_LEN_T 0x00004000
+#define ARG_ON_OFF 0x00008000
+#define ARG_STRING 0x00010000
+#define ARG_DN 0x00020000
+#define ARG_EXISTS 0x00040000 /* XXX not yet */
+#define ARG_IGNORED 0x00080000
-#define ARGS_SYNTAX 0xff000000
-#define ARG_DB 0x01000000
-#define ARG_PRE_DB 0x02000000
-#define ARG_PAREN 0x04000000
-#define ARG_NONZERO 0x08000000
-#define ARG_UNIQUE 0x10000000 /* XXX not yet */
-#define ARG_SPECIAL 0x20000000 /* one special case */
+#define ARGS_SYNTAX 0xfff00000
+#define ARG_PRE_BI 0x00100000
+#define ARG_PRE_DB 0x00200000
+#define ARG_DB 0x00400000 /* Only applies to DB */
+#define ARG_MAY_DB 0x00800000 /* May apply to DB */
+#define ARG_PAREN 0x01000000
+#define ARG_NONZERO 0x02000000
+#define ARG_UNIQUE 0x10000000
+#define ARG_MUTEX 0x20000000 /* modify in single-thread mode */
#define ARG_OFFSET 0x40000000
#define ARG_MAGIC 0x80000000
#define ARG_BAD_CONF 0xdead0000 /* overload return values */
#define ARG_UNKNOWN 0xc0de0000
+extern ConfigTable config_back_cf_table[];
+
+typedef struct ConfigOCs {
+ char *def;
+ ObjectClass **oc;
+} ConfigOCs;
+
typedef struct config_args_s {
int argc;
char **argv;
unsigned long lineno;
char log[PATH_MAX + STRLENOF(": line 18446744073709551615") + 1];
int depth;
- int value_int; /* parsed first val */
- long value_long; /* for simple cases */
- ber_len_t value_ber_t;
- char *value_string;
+ /* parsed first val for simple cases */
+ union {
+ int v_int;
+ long v_long;
+ ber_len_t v_ber_t;
+ char *v_string;
+ struct {
+ struct berval vdn_dn;
+ struct berval vdn_ndn;
+ } v_dn;
+ } values;
+ /* return values for emit mode */
+ BerVarray rvalue_vals;
+ BerVarray rvalue_nvals;
int emit; /* emit instead of setting */
int type; /* ConfigTable.arg_type & ARGS_USERLAND */
BackendDB *be;
BackendInfo *bi;
} ConfigArgs;
+#define value_int values.v_int
+#define value_long values.v_long
+#define value_ber_t values.v_ber_t
+#define value_string values.v_string
+#define value_dn values.v_dn.vdn_dn
+#define value_ndn values.v_dn.vdn_ndn
+
typedef int (ConfigDriver)(ConfigArgs *c);
+
+int config_get_vals(ConfigTable *ct, ConfigArgs *c);
}
if ( op->o_cancel == SLAP_CANCEL_REQ ) {
- op->o_cancel = LDAP_TOO_LATE;
+ if ( rc == SLAPD_ABANDON )
+ op->o_cancel = SLAP_CANCEL_ACK;
+ else
+ op->o_cancel = LDAP_TOO_LATE;
}
while ( op->o_cancel != SLAP_CANCEL_NONE &&
op->o_cancel != SLAP_CANCEL_DONE )
int connection_write(ber_socket_t s)
{
Connection *c;
+ Operation *op;
assert( connections != NULL );
if ( ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_NEEDS_WRITE, NULL ) ) {
slapd_set_write( s, 1 );
}
+ /* If there are ops pending because of a writewaiter, start
+ * one up.
+ */
+ while ((op = LDAP_STAILQ_FIRST( &c->c_pending_ops )) != NULL) {
+ if ( !c->c_writewaiter ) break;
+ if ( c->c_n_ops_executing > connection_pool_max/2 ) {
+ break;
+ }
+ LDAP_STAILQ_REMOVE_HEAD( &c->c_pending_ops, o_next );
+ LDAP_STAILQ_NEXT(op, o_next) = NULL;
+ /* pending operations should not be marked for abandonment */
+ assert(!op->o_abandon);
+
+ c->c_n_ops_pending--;
+ c->c_n_ops_executing++;
+
+ connection_op_activate( op );
+
+ break;
+ }
connection_return( c );
ldap_pvt_thread_mutex_unlock( &connections_mutex );
return 0;
/* FIXME: should use BER library */
if( ( ctrl->ldctl_value.bv_len != 3 )
- && ( ctrl->ldctl_value.bv_val[0] != 0x01 )
- && ( ctrl->ldctl_value.bv_val[1] != 0x01 ))
+ || ( ctrl->ldctl_value.bv_val[0] != 0x01 )
+ || ( ctrl->ldctl_value.bv_val[1] != 0x01 ))
{
rs->sr_text = "subentries control value encoding is bogus";
return LDAP_PROTOCOL_ERROR;
? SLAP_CONTROL_CRITICAL
: SLAP_CONTROL_NONCRITICAL;
- if ( (void *)(ctrl->ldctl_value.bv_val[2] != 0x00))
+ if ( (void *)(ctrl->ldctl_value.bv_val[2] != 0x00)) {
set_subentries_visibility( op );
+ }
return LDAP_SUCCESS;
}
#endif
#ifdef LDAP_PF_LOCAL
case AF_LOCAL:
- addrlen = sizeof(struct sockaddr_un);
- break;
+#ifdef LOCAL_CREDS
+ {
+ int one = 1;
+ setsockopt(l.sl_sd, 0, LOCAL_CREDS, &one, sizeof one);
+ }
+#endif
+ addrlen = sizeof(struct sockaddr_un);
+ break;
#endif
}
#include <ac/socket.h>
#include <ac/string.h>
-
#include "slap.h"
+#ifdef LDAP_COMP_MATCH
+#include "component.h"
+#endif
+
static int test_filter_and( Operation *op, Entry *e, Filter *flist );
static int test_filter_or( Operation *op, Entry *e, Filter *flist );
static int test_substrings_filter( Operation *op, Entry *e, Filter *f);
for ( iAVA = 0; rdn[ iAVA ]; iAVA++ ) {
LDAPAVA *ava = rdn[ iAVA ];
- struct berval *bv = &ava->la_value, value;
+ struct berval *bv = &ava->la_value,
+ value = BER_BVNULL,
+ nbv = BER_BVNULL;
AttributeDescription *ad =
(AttributeDescription *)ava->la_private;
- int ret;
- const char *text;
+ int ret;
+ const char *text;
assert( ad );
}
}
+ if ( mra->ma_rule->smr_normalize ) {
+ /* see comment above */
+ if ( mra->ma_rule->smr_normalize(
+ SLAP_MR_VALUE_OF_ATTRIBUTE_SYNTAX,
+ mra->ma_rule->smr_syntax,
+ mra->ma_rule,
+ bv, &nbv, memctx ) != LDAP_SUCCESS )
+ {
+ /* FIXME: stop processing? */
+ rc = LDAP_SUCCESS;
+ ret = -1;
+ goto cleanup;
+ }
+
+ } else {
+ nbv = *bv;
+ }
+
/* check match */
rc = value_match( &ret, ad, mra->ma_rule, 0,
- bv, &value, &text );
- if ( value.bv_val != mra->ma_value.bv_val ) {
+ &nbv, &value, &text );
+
+cleanup:;
+ if ( !BER_BVISNULL( &value ) && value.bv_val != mra->ma_value.bv_val ) {
memfree( value.bv_val, memctx );
}
+ if ( !BER_BVISNULL( &nbv ) && nbv.bv_val != bv->bv_val ) {
+ memfree( nbv.bv_val, memctx );
+ }
+
if ( rc == LDAP_SUCCESS && ret == 0 ) rc = LDAP_COMPARE_TRUE;
if ( rc != LDAP_SUCCESS ) {
{
int rc;
Attribute *a;
+#ifdef LDAP_COMP_MATCH
+ int i, num_attr_vals = 0;
+ AttributeAliasing *a_alias = NULL;
+#endif
if ( !access_allowed( op, e,
ava->aa_desc, &ava->aa_value, ACL_SEARCH, NULL ) )
rc = LDAP_COMPARE_FALSE;
+#ifdef LDAP_COMP_MATCH
+ if ( is_aliased_attribute && ava->aa_cf )
+ {
+ a_alias = is_aliased_attribute ( ava->aa_desc );
+ if ( a_alias )
+ ava->aa_desc = a_alias->aa_aliased_ad;
+ else
+ ava->aa_cf = NULL;
+ }
+#endif
+
for(a = attrs_find( e->e_attrs, ava->aa_desc );
a != NULL;
a = attrs_find( a->a_next, ava->aa_desc ) )
continue;
}
+#ifdef LDAP_COMP_MATCH
+ if ( nibble_mem_allocator && ava->aa_cf && !a->a_comp_data ) {
+ /* Component Matching */
+ for ( num_attr_vals = 0; a->a_vals[num_attr_vals].bv_val != NULL; num_attr_vals++ );
+ if ( num_attr_vals <= 0 )/* no attribute value */
+ return LDAP_INAPPROPRIATE_MATCHING;
+ num_attr_vals++;/* for NULL termination */
+
+ /* following malloced will be freed by comp_tree_free () */
+ a->a_comp_data = malloc( sizeof( ComponentData ) + sizeof( ComponentSyntaxInfo* )*num_attr_vals );
+
+ if ( !a->a_comp_data ) {
+ return LDAP_NO_MEMORY;
+ }
+
+ a->a_comp_data->cd_tree = (ComponentSyntaxInfo**)((char*)a->a_comp_data + sizeof(ComponentData));
+ i = num_attr_vals;
+ for ( ; i ; i-- ) {
+ a->a_comp_data->cd_tree[ i-1 ] = (ComponentSyntaxInfo*)NULL;
+ }
+
+ a->a_comp_data->cd_mem_op = nibble_mem_allocator ( 1024*10*(num_attr_vals-1), 1024 );
+ if ( a->a_comp_data->cd_mem_op == NULL ) {
+ free ( a->a_comp_data );
+ a->a_comp_data = NULL;
+ return LDAP_OPERATIONS_ERROR;
+ }
+ }
+
+ i = 0;
+#endif
+
for ( bv = a->a_nvals; !BER_BVISNULL( bv ); bv++ ) {
int ret, match;
const char *text;
- ret = value_match( &match, a->a_desc, mr, 0,
- bv, &ava->aa_value, &text );
+#ifdef LDAP_COMP_MATCH
+ if( attr_converter && ava->aa_cf && a->a_comp_data ) {
+ /* Check if decoded component trees are already linked */
+ struct berval cf_bv = { 20, "componentFilterMatch" };
+ MatchingRule* cf_mr = mr_bvfind( &cf_bv );
+ MatchingRuleAssertion mra;
+ mra.ma_cf = ava->aa_cf;
+
+ if ( a->a_comp_data->cd_tree[i] == NULL )
+ a->a_comp_data->cd_tree[i] = attr_converter (a, a->a_desc->ad_type->sat_syntax, (a->a_vals + i));
+ /* decoding error */
+ if ( !a->a_comp_data->cd_tree[i] ) {
+ free_ComponentData ( a );
+ return LDAP_OPERATIONS_ERROR;
+ }
+
+ ret = value_match( &match, a->a_desc, cf_mr, 0,
+ (struct berval*)a->a_comp_data->cd_tree[i++], (void*)&mra, &text );
+ if ( ret == LDAP_INAPPROPRIATE_MATCHING ) {
+ /* cached component tree is broken, just remove it */
+ free_ComponentData ( a );
+ return ret;
+ }
+ if ( a_alias )
+ ava->aa_desc = a_alias->aa_aliasing_ad;
+ }
+ else
+#endif
+ {
+
+ ret = value_match( &match, a->a_desc, mr, 0,
+ bv, &ava->aa_value, &text );
+ }
if( ret != LDAP_SUCCESS ) {
rc = ret;
}
}
+#ifdef LDAP_COMP_MATCH
+ if ( a_alias )
+ ava->aa_desc = a_alias->aa_aliasing_ad;
+#endif
+
return rc;
}
#include "slap.h"
+static slap_verbmasks idxstr[] = {
+ { BER_BVC("pres"), SLAP_INDEX_PRESENT },
+ { BER_BVC("eq"), SLAP_INDEX_EQUALITY },
+ { BER_BVC("approx"), SLAP_INDEX_APPROX },
+ { BER_BVC("subinitial"), SLAP_INDEX_SUBSTR_INITIAL },
+ { BER_BVC("subany"), SLAP_INDEX_SUBSTR_ANY },
+ { BER_BVC("subfinal"), SLAP_INDEX_SUBSTR_FINAL },
+ { BER_BVC("sub"), SLAP_INDEX_SUBSTR_DEFAULT },
+ { BER_BVC("substr"), 0 },
+ { BER_BVC("notags"), SLAP_INDEX_NOTAGS },
+ { BER_BVC("nolang"), 0 }, /* backwards compat */
+ { BER_BVC("nosubtypes"), SLAP_INDEX_NOSUBTYPES },
+ { BER_BVNULL, 0 }
+};
+
+
int slap_str2index( const char *str, slap_mask_t *idx )
{
- if ( strcasecmp( str, "pres" ) == 0 ) {
- *idx = SLAP_INDEX_PRESENT;
- } else if ( strcasecmp( str, "eq" ) == 0 ) {
- *idx = SLAP_INDEX_EQUALITY;
- } else if ( strcasecmp( str, "approx" ) == 0 ) {
- *idx = SLAP_INDEX_APPROX;
- } else if ( strcasecmp( str, "subinitial" ) == 0 ) {
- *idx = SLAP_INDEX_SUBSTR_INITIAL;
- } else if ( strcasecmp( str, "subany" ) == 0 ) {
- *idx = SLAP_INDEX_SUBSTR_ANY;
- } else if ( strcasecmp( str, "subfinal" ) == 0 ) {
- *idx = SLAP_INDEX_SUBSTR_FINAL;
- } else if ( strcasecmp( str, "substr" ) == 0 ||
- strcasecmp( str, "sub" ) == 0 )
- {
- *idx = SLAP_INDEX_SUBSTR_DEFAULT;
- } else if ( strcasecmp( str, "nolang" ) == 0 || /* backwards compat */
- strcasecmp( str, "notags" ) == 0 ) {
- *idx = SLAP_INDEX_NOTAGS;
- } else if ( strcasecmp( str, "nosubtypes" ) == 0 ) {
- *idx = SLAP_INDEX_NOSUBTYPES;
- } else {
- return LDAP_OTHER;
- }
+ int i;
+
+ i = verb_to_mask( str, idxstr );
+ if ( BER_BVISNULL(&idxstr[i].word) ) return LDAP_OTHER;
+ while ( !idxstr[i].mask ) i--;
+ *idx = idxstr[i].mask;
+
return LDAP_SUCCESS;
}
+
+void slap_index2bvlen( slap_mask_t idx, struct berval *bv )
+{
+ int i;
+
+ bv->bv_len = 0;
+
+ for ( i=0; !BER_BVISNULL( &idxstr[i].word ); i++ ) {
+ if ( !idxstr[i].mask ) continue;
+ if ( IS_SLAP_INDEX( idx, idxstr[i].mask )) {
+ if ( (idxstr[i].mask & SLAP_INDEX_SUBSTR) &&
+ ((idx & SLAP_INDEX_SUBSTR_DEFAULT) != idxstr[i].mask))
+ continue;
+ if ( bv->bv_len ) bv->bv_len++;
+ bv->bv_len += idxstr[i].word.bv_len;
+ }
+ }
+}
+
+/* caller must provide buffer space, after calling index2bvlen */
+void slap_index2bv( slap_mask_t idx, struct berval *bv )
+{
+ int i;
+ char *ptr;
+
+ if ( !bv->bv_len ) return;
+
+ ptr = bv->bv_val;
+ for ( i=0; !BER_BVISNULL( &idxstr[i].word ); i++ ) {
+ if ( !idxstr[i].mask ) continue;
+ if ( IS_SLAP_INDEX( idx, idxstr[i].mask )) {
+ if ( (idxstr[i].mask & SLAP_INDEX_SUBSTR) &&
+ ((idx & SLAP_INDEX_SUBSTR_DEFAULT) != idxstr[i].mask))
+ continue;
+ if ( ptr != bv->bv_val ) *ptr++ = ',';
+ ptr = lutil_strcopy( ptr, idxstr[i].word.bv_val );
+ }
+ }
+}
#include <ac/string.h>
#include "slap.h"
+#include "lutil.h"
/* define to get an error if requesting limit higher than hard */
#undef ABOVE_HARD_LIMIT_IS_ERROR
return 0;
}
+static const char *lmpats[] = {
+ "exact",
+ "exact",
+ "onelvel",
+ "subtree",
+ "children",
+ "regex",
+ "anonymous",
+ "users",
+ "*"
+};
+
+/* Caller must provide an adequately sized buffer in bv */
+void
+limits_unparse( struct slap_limits *lim, struct berval *bv )
+{
+ struct berval btmp;
+ char *ptr;
+ int lm;
+
+ if ( !bv || !bv->bv_val ) return;
+
+ ptr = bv->bv_val;
+
+ if (( lim->lm_flags & SLAP_LIMITS_TYPE_MASK ) == SLAP_LIMITS_TYPE_GROUP ) {
+ ptr = lutil_strcopy( ptr, "group/" );
+ ptr = lutil_strcopy( ptr, lim->lm_group_oc->soc_cname.bv_val );
+ *ptr++ = '/';
+ ptr = lutil_strcopy( ptr, lim->lm_group_ad->ad_cname.bv_val );
+ ptr = lutil_strcopy( ptr, "=\"" );
+ ptr = lutil_strcopy( ptr, lim->lm_pat.bv_val );
+ *ptr++ = '"';
+ } else {
+ lm = lim->lm_flags & SLAP_LIMITS_MASK;
+ switch( lm ) {
+ case SLAP_LIMITS_ANONYMOUS:
+ case SLAP_LIMITS_USERS:
+ case SLAP_LIMITS_ANY:
+ ptr = lutil_strcopy( ptr, lmpats[lm] );
+ break;
+ case SLAP_LIMITS_UNDEFINED:
+ case SLAP_LIMITS_EXACT:
+ case SLAP_LIMITS_ONE:
+ case SLAP_LIMITS_SUBTREE:
+ case SLAP_LIMITS_CHILDREN:
+ case SLAP_LIMITS_REGEX:
+ ptr = lutil_strcopy( ptr, "dn." );
+ ptr = lutil_strcopy( ptr, lmpats[lm] );
+ *ptr++ = '=';
+ *ptr++ = '"';
+ ptr = lutil_strcopy( ptr, lim->lm_pat.bv_val );
+ *ptr++ = '"';
+ break;
+ }
+ }
+ *ptr++ = ' ';
+ bv->bv_len = ptr - bv->bv_val;
+ btmp.bv_val = ptr;
+ btmp.bv_len = 0;
+ limits_unparse_one( &lim->lm_limits, SLAP_LIMIT_SIZE|SLAP_LIMIT_TIME, &btmp );
+ bv->bv_len += btmp.bv_len;
+}
+
+/* Caller must provide an adequately sized buffer in bv */
+void
+limits_unparse_one( struct slap_limits_set *lim, int which, struct berval *bv )
+{
+ char *ptr;
+
+ if ( !bv || !bv->bv_val ) return;
+
+ ptr = bv->bv_val;
+
+ if ( which & SLAP_LIMIT_SIZE ) {
+ if ( lim->lms_s_soft != SLAPD_DEFAULT_SIZELIMIT ) {
+
+ /* If same as global limit, drop it */
+ if ( lim != &frontendDB->be_def_limit &&
+ lim->lms_s_soft == frontendDB->be_def_limit.lms_s_soft )
+ goto s_hard;
+ /* If there's also a hard limit, fully qualify this one */
+ else if ( lim->lms_s_hard )
+ ptr = lutil_strcopy( ptr, " size.soft=" );
+
+ /* If doing both size & time, qualify this */
+ else if ( which & SLAP_LIMIT_TIME )
+ ptr = lutil_strcopy( ptr, " size=" );
+
+ if ( lim->lms_s_soft == -1 )
+ ptr = lutil_strcopy( ptr, "unlimited" );
+ else
+ ptr += sprintf( ptr, "%d", lim->lms_s_soft );
+ *ptr++ = ' ';
+ }
+s_hard:
+ if ( lim->lms_s_hard ) {
+ ptr = lutil_strcopy( ptr, " size.hard=" );
+ if ( lim->lms_s_hard == -1 )
+ ptr = lutil_strcopy( ptr, "unlimited" );
+ else
+ ptr += sprintf( ptr, "%d", lim->lms_s_hard );
+ *ptr++ = ' ';
+ }
+ if ( lim->lms_s_unchecked != -1 ) {
+ ptr = lutil_strcopy( ptr, " size.unchecked=" );
+ if ( lim->lms_s_unchecked == 0 )
+ ptr = lutil_strcopy( ptr, "disabled" );
+ else
+ ptr += sprintf( ptr, "%d", lim->lms_s_unchecked );
+ *ptr++ = ' ';
+ }
+ if ( lim->lms_s_pr_hide ) {
+ ptr = lutil_strcopy( ptr, " size.pr=noEstimate " );
+ }
+ if ( lim->lms_s_pr ) {
+ ptr = lutil_strcopy( ptr, " size.pr=" );
+ if ( lim->lms_s_pr == -1 )
+ ptr = lutil_strcopy( ptr, "unlimited" );
+ else
+ ptr += sprintf( ptr, "%d", lim->lms_s_pr );
+ *ptr++ = ' ';
+ }
+ if ( lim->lms_s_pr_total ) {
+ ptr = lutil_strcopy( ptr, " size.prtotal=" );
+ if ( lim->lms_s_pr_total == -1 )
+ ptr = lutil_strcopy( ptr, "unlimited" );
+ else if ( lim->lms_s_pr_total == -2 )
+ ptr = lutil_strcopy( ptr, "disabled" );
+ else
+ ptr += sprintf( ptr, "%d", lim->lms_s_pr_total );
+ *ptr++ = ' ';
+ }
+ }
+ if ( which & SLAP_LIMIT_TIME ) {
+ if ( lim->lms_t_soft != SLAPD_DEFAULT_TIMELIMIT ) {
+
+ /* If same as global limit, drop it */
+ if ( lim != &frontendDB->be_def_limit &&
+ lim->lms_t_soft == frontendDB->be_def_limit.lms_t_soft )
+ goto t_hard;
+
+ /* If there's also a hard limit, fully qualify this one */
+ else if ( lim->lms_t_hard )
+ ptr = lutil_strcopy( ptr, " time.soft=" );
+
+ /* If doing both size & time, qualify this */
+ else if ( which & SLAP_LIMIT_SIZE )
+ ptr = lutil_strcopy( ptr, " time=" );
+
+ if ( lim->lms_t_soft == -1 )
+ ptr = lutil_strcopy( ptr, "unlimited" );
+ else
+ ptr += sprintf( ptr, "%d", lim->lms_t_soft );
+ *ptr++ = ' ';
+ }
+t_hard:
+ if ( lim->lms_t_hard ) {
+ ptr = lutil_strcopy( ptr, " time.hard=" );
+ if ( lim->lms_t_hard == -1 )
+ ptr = lutil_strcopy( ptr, "unlimited" );
+ else
+ ptr += sprintf( ptr, "%d", lim->lms_t_hard );
+ *ptr++ = ' ';
+ }
+ }
+ if ( ptr != bv->bv_val ) {
+ ptr--;
+ *ptr = '\0';
+ bv->bv_len = ptr - bv->bv_val;
+ }
+}
int
limits_check( Operation *op, SlapReply *rs )
#include <ac/socket.h>
#include "slap.h"
+#include "lutil.h"
static LDAP_SLIST_HEAD(OidMacroList, slap_oid_macro) om_list
= LDAP_SLIST_HEAD_INITIALIZER(om_list);
}
LDAP_SLIST_FOREACH( om, &om_list, som_next ) {
- char **names = om->som_names;
+ BerVarray names = om->som_names;
if( names == NULL ) {
continue;
}
- for( ; *names != NULL ; names++ ) {
- int pos = dscompare(*names, oid, ':');
+ for( ; !BER_BVISNULL( names ) ; names++ ) {
+ int pos = dscompare(names->bv_val, oid, ':');
if( pos ) {
int suflen = strlen(oid + pos);
om = LDAP_SLIST_FIRST( &om_list );
LDAP_SLIST_REMOVE_HEAD( &om_list, som_next );
- ldap_charray_free(om->som_names);
+ ber_bvarray_free(om->som_names);
+ ber_bvarray_free(om->som_subs);
free(om->som_oid.bv_val);
free(om);
{
char *oid;
OidMacro *om;
+ struct berval bv;
if (argc != 3) {
fprintf( stderr, "%s: line %d: too many arguments\n",
LDAP_SLIST_NEXT( om, som_next ) = NULL;
om->som_names = NULL;
- ldap_charray_add( &om->som_names, argv[1] );
+ om->som_subs = NULL;
+ ber_str2bv( argv[1], 0, 1, &bv );
+ ber_bvarray_add( &om->som_names, &bv );
+ ber_str2bv( argv[2], 0, 1, &bv );
+ ber_bvarray_add( &om->som_subs, &bv );
om->som_oid.bv_val = oidm_find( argv[2] );
if (!om->som_oid.bv_val) {
LDAP_SLIST_INSERT_HEAD( &om_list, om, som_next );
return 0;
}
+
+void oidm_unparse( BerVarray *res )
+{
+ OidMacro *om;
+ int i, j, num;
+ struct berval bv, *bva = NULL, idx;
+ char ibuf[32], *ptr;
+
+ /* count the result size */
+ i = 0;
+ LDAP_SLIST_FOREACH( om, &om_list, som_next ) {
+ for ( j=0; !BER_BVISNULL(&om->som_names[j]); j++ );
+ i += j;
+ }
+ num = i;
+ bva = ch_malloc( (num+1) * sizeof(struct berval) );
+ BER_BVZERO( bva+num );
+ idx.bv_val = ibuf;
+ LDAP_SLIST_FOREACH( om, &om_list, som_next ) {
+ for ( j=0; !BER_BVISNULL(&om->som_names[j]); j++ );
+ for ( i=num-j, j=0; i<num; i++,j++ ) {
+ idx.bv_len = sprintf(idx.bv_val, "{%d}", i );
+ bva[i].bv_len = idx.bv_len + om->som_names[j].bv_len +
+ om->som_subs[j].bv_len + 1;
+ bva[i].bv_val = ch_malloc( bva[i].bv_len + 1 );
+ ptr = lutil_strcopy( bva[i].bv_val, ibuf );
+ ptr = lutil_strcopy( ptr, om->som_names[j].bv_val );
+ *ptr++ = ' ';
+ ptr = lutil_strcopy( ptr, om->som_subs[j].bv_val );
+ }
+ num -= j;
+ }
+ *res = bva;
+}
#include <lber_pvt.h>
#include <lutil.h>
+#include <lutil_sha1.h>
static const char *defhash[] = {
#ifdef LUTIL_SHA1_BYTES
{
struct berval id = {0, NULL}, hash, *rsp = NULL;
req_pwdexop_s *qpw = &op->oq_pwdexop;
+ req_extended_s qext = op->oq_extended;
Modifications *ml;
- Operation op2;
slap_callback cb = { NULL, slap_null_cb, NULL, NULL };
slap_callback cb2 = { NULL, slap_replog_cb, NULL, NULL };
int i, nhash;
rs->sr_err = LDAP_OTHER;
} else {
- op2 = *op;
- op2.o_tag = LDAP_REQ_MODIFY;
- op2.o_callback = &cb2;
- op2.orm_modlist = qpw->rs_mods;
+ slap_callback *sc = op->o_callback;
+
+ op->o_tag = LDAP_REQ_MODIFY;
+ op->o_callback = &cb2;
+ op->orm_modlist = qpw->rs_mods;
cb2.sc_private = qpw; /* let Modify know this was pwdMod,
* if it cares... */
- rs->sr_err = slap_mods_opattrs( &op2, ml, qpw->rs_modtail, &rs->sr_text,
+ rs->sr_err = slap_mods_opattrs( op, ml, qpw->rs_modtail, &rs->sr_text,
NULL, 0, 1 );
if ( rs->sr_err == LDAP_SUCCESS ) {
- rs->sr_err = op2.o_bd->be_modify( &op2, rs );
- /* FIXME: in case it got rewritten... */
- op->o_req_dn = op2.o_req_dn;
- op->o_req_ndn = op2.o_req_ndn;
+ rs->sr_err = op->o_bd->be_modify( op, rs );
}
if ( rs->sr_err == LDAP_SUCCESS ) {
rs->sr_rspdata = rsp;
} else if ( rsp ) {
ber_bvfree( rsp );
}
+ op->o_tag = LDAP_REQ_EXTENDED;
+ op->o_callback = sc;
}
slap_mods_free( qpw->rs_mods );
if ( rsp ) {
}
rc = rs->sr_err;
+ op->oq_extended = qext;
error_return:;
if ( !BER_BVISNULL( &op->o_req_dn ) ) {
LDAP_SLAPD_F (slap_access_t) str2access LDAP_P(( const char *str ));
#define ACCESSMASK_MAXLEN sizeof("unknown (+wrscan)")
-LDAP_SLAPD_F (char *) accessmask2str LDAP_P(( slap_mask_t mask, char* ));
+LDAP_SLAPD_F (char *) accessmask2str LDAP_P(( slap_mask_t mask, char*, int debug ));
LDAP_SLAPD_F (slap_mask_t) str2accessmask LDAP_P(( const char *str ));
+LDAP_SLAPD_F (void) acl_unparse LDAP_P(( AccessControl*, struct berval* ));
LDAP_SLAPD_F (void) acl_destroy LDAP_P(( AccessControl*, AccessControl* ));
LDAP_SLAPD_F (void) acl_free LDAP_P(( AccessControl *a ));
LDAP_SLAPD_F (void) config_destroy LDAP_P ((void));
LDAP_SLAPD_F (char **) slap_str2clist LDAP_P((
char ***, char *, const char * ));
+LDAP_SLAPD_F (int) verb_to_mask LDAP_P((
+ const char *word, slap_verbmasks *v ));
+LDAP_SLAPD_F (int) verbs_to_mask LDAP_P((
+ int argc, char *argv[], slap_verbmasks *v, slap_mask_t *m ));
+LDAP_SLAPD_F (int) mask_to_verbs LDAP_P((
+ slap_verbmasks *v, slap_mask_t m, BerVarray *bva ));
+LDAP_SLAPD_F (int) bindconf_parse LDAP_P((
+ const char *word, slap_bindconf *bc ));
+LDAP_SLAPD_F (int) bindconf_unparse LDAP_P((
+ slap_bindconf *bc, struct berval *bv ));
+LDAP_SLAPD_F (void) bindconf_free LDAP_P(( slap_bindconf *bc ));
+
#ifdef LDAP_SLAPI
LDAP_SLAPD_V (int) slapi_plugins_used;
#endif
* index.c
*/
LDAP_SLAPD_F (int) slap_str2index LDAP_P(( const char *str, slap_mask_t *idx ));
+LDAP_SLAPD_F (void) slap_index2bvlen LDAP_P(( slap_mask_t idx, struct berval *bv ));
+LDAP_SLAPD_F (void) slap_index2bv LDAP_P(( slap_mask_t idx, struct berval *bv ));
/*
* init.c
struct slap_limits_set *limit ));
LDAP_SLAPD_F (int) limits_check LDAP_P((
Operation *op, SlapReply *rs ));
+LDAP_SLAPD_F (void) limits_unparse_one LDAP_P((
+ struct slap_limits_set *limit, int which, struct berval *bv ));
+LDAP_SLAPD_F (void) limits_unparse LDAP_P((
+ struct slap_limits *limit, struct berval *bv ));
/*
* lock.c
*/
LDAP_SLAPD_F(char *) oidm_find(char *oid);
LDAP_SLAPD_F (void) oidm_destroy LDAP_P(( void ));
+LDAP_SLAPD_F (void) oidm_unparse LDAP_P(( BerVarray *bva ));
LDAP_SLAPD_F (int) parse_oidm LDAP_P((
const char *fname, int lineno, int argc, char **argv ));
* repl.c
*/
LDAP_SLAPD_F (int) add_replica_info LDAP_P(( Backend *be,
- const char *host ));
+ const char *uri, const char *host ));
LDAP_SLAPD_F (int) add_replica_suffix LDAP_P(( Backend *be,
int nr, const char *suffix ));
LDAP_SLAPD_F (int) add_replica_attrs LDAP_P(( Backend *be,
*/
LDAP_SLAPD_F (int) slap_sasl_init(void);
LDAP_SLAPD_F (char *) slap_sasl_secprops( const char * );
+LDAP_SLAPD_F (void) slap_sasl_secprops_unparse( struct berval * );
LDAP_SLAPD_F (int) slap_sasl_destroy(void);
LDAP_SLAPD_F (int) slap_sasl_open( Connection *c, int reopen );
Operation *op,
SlapReply *rs );
-LDAP_SLAPD_F (int) slap_sasl_config(
- int cargc,
- char **cargv,
- char *line,
- const char *fname,
- int lineno );
-
LDAP_SLAPD_F (int) slap_sasl_getdn( Connection *conn, Operation *op,
struct berval *id, char *user_realm, struct berval *dn, int flags );
struct berval *authzid ));
LDAP_SLAPD_F (int) slap_sasl_regexp_config LDAP_P((
const char *match, const char *replace ));
+LDAP_SLAPD_F (void) slap_sasl_regexp_unparse LDAP_P(( BerVarray *bva ));
LDAP_SLAPD_F (int) slap_sasl_setpolicy LDAP_P(( const char * ));
+LDAP_SLAPD_F (const char *) slap_sasl_getpolicy LDAP_P(( void ));
#ifdef SLAP_AUTH_REWRITE
LDAP_SLAPD_F (int) slap_sasl_rewrite_config LDAP_P((
const char *fname,
int
add_replica_info(
Backend *be,
+ const char *uri,
const char *host
)
{
be->be_replica[ i ]
= ch_calloc( sizeof( struct slap_replica_info ), 1 );
- be->be_replica[ i ]->ri_host = ch_strdup( host );
+ be->be_replica[ i ]->ri_uri = uri;
+ be->be_replica[ i ]->ri_host = host;
be->be_replica[ i ]->ri_nsuffix = NULL;
be->be_replica[ i ]->ri_attrs = NULL;
be->be_replica[ i + 1 ] = NULL;
clean2:;
if ( op->o_callback ) {
int first = 1;
- slap_callback *sc = op->o_callback,
- *sc_next = op->o_callback;
+ slap_callback *sc = op->o_callback, *sc_next;
for ( sc_next = op->o_callback; sc_next; op->o_callback = sc_next) {
sc_next = op->o_callback->sc_next;
if ( op->o_callback->sc_cleanup ) {
(void)op->o_callback->sc_cleanup( op, rs );
- if ( first && op->o_callback == NULL ) {
- sc = NULL;
+ if ( first && op->o_callback != sc ) {
+ sc = op->o_callback;
}
}
first = 0;
}
-
op->o_callback = sc;
}
error_return:;
if ( op->o_callback ) {
int first = 1;
- slap_callback *sc = op->o_callback,
- *sc_next = op->o_callback;
+ slap_callback *sc = op->o_callback, *sc_next;
for ( sc_next = op->o_callback; sc_next; op->o_callback = sc_next) {
sc_next = op->o_callback->sc_next;
if ( op->o_callback->sc_cleanup ) {
(void)op->o_callback->sc_cleanup( op, rs );
- if ( first && op->o_callback == NULL ) {
- sc = NULL;
+ if ( first && op->o_callback != sc ) {
+ sc = op->o_callback;
}
}
first = 0;
}
-
op->o_callback = sc;
}
rel:
if ( op->o_callback ) {
int first = 1;
- slap_callback *sc = op->o_callback,
- *sc_next = op->o_callback;
+ slap_callback *sc = op->o_callback, *sc_next;
for ( sc_next = op->o_callback; sc_next; op->o_callback = sc_next) {
sc_next = op->o_callback->sc_next;
if ( op->o_callback->sc_cleanup ) {
(void)op->o_callback->sc_cleanup( op, rs );
- if ( first && op->o_callback == NULL ) {
- sc = NULL;
+ if ( first && op->o_callback != sc ) {
+ sc = op->o_callback;
}
}
first = 0;
}
-
op->o_callback = sc;
}
= slap_schema.si_ad_supportedFeatures;
AttributeDescription *ad_monitorContext
= slap_schema.si_ad_monitorContext;
+ AttributeDescription *ad_configContext
+ = slap_schema.si_ad_configContext;
AttributeDescription *ad_ref
= slap_schema.si_ad_ref;
}
continue;
}
+ if ( SLAP_CONFIG( &backends[i] )) {
+ vals[0] = backends[i].be_suffix[0];
+ nvals[0] = backends[i].be_nsuffix[0];
+ if( attr_merge( e, ad_configContext, vals, nvals ) ) {
+ return LDAP_OTHER;
+ }
+ continue;
+ }
if ( SLAP_GLUE_SUBORDINATE( &backends[i] ) && !SLAP_GLUE_ADVERTISE( &backends[i] ) ) {
continue;
}
static struct berval ext_bv = BER_BVC( "EXTERNAL" );
-int slap_sasl_config( int cargc, char **cargv, char *line,
- const char *fname, int lineno )
-{
- /* set SASL proxy authorization policy */
- if ( !strcasecmp( cargv[0], "authz-policy" ) ||
- !strcasecmp( cargv[0], "sasl-authz-policy" ))
- {
- if ( cargc != 2 ) {
- Debug( LDAP_DEBUG_ANY,
- "%s: line %d: missing policy in"
- " \"%s <policy>\" line\n",
- cargv[0], fname, lineno );
-
- return( 1 );
- }
- if ( slap_sasl_setpolicy( cargv[1] ) ) {
- Debug( LDAP_DEBUG_ANY, "%s: line %d: "
- "unable to parse value \"%s\" in \"authz-policy "
- "<policy>\" line.\n",
- fname, lineno, cargv[1] );
- return( 1 );
- }
-
- } else if ( !strcasecmp( cargv[0], "authz-regexp" ) ||
- !strcasecmp( cargv[0], "sasl-regexp" ) ||
- !strcasecmp( cargv[0], "saslregexp" ) )
- {
- int rc;
- if ( cargc != 3 ) {
- Debug( LDAP_DEBUG_ANY,
- "%s: line %d: need 2 args in "
- "\"authz-regexp <match> <replace>\"\n",
- fname, lineno, 0 );
-
- return( 1 );
- }
- rc = slap_sasl_regexp_config( cargv[1], cargv[2] );
- if ( rc ) {
- return rc;
- }
-
-#ifdef HAVE_CYRUS_SASL
- /* set SASL host */
- } else if ( strcasecmp( cargv[0], "sasl-host" ) == 0 ) {
- if ( cargc < 2 ) {
- Debug( LDAP_DEBUG_ANY,
- "%s: line %d: missing host in \"sasl-host <host>\" line\n",
- fname, lineno, 0 );
-
- return( 1 );
- }
-
- if ( global_host != NULL ) {
- Debug( LDAP_DEBUG_ANY,
- "%s: line %d: already set sasl-host!\n",
- fname, lineno, 0 );
-
- return 1;
-
- } else {
- global_host = ch_strdup( cargv[1] );
- }
-
- /* set SASL realm */
- } else if ( strcasecmp( cargv[0], "sasl-realm" ) == 0 ) {
- if ( cargc < 2 ) {
- Debug( LDAP_DEBUG_ANY, "%s: line %d: "
- "missing realm in \"sasl-realm <realm>\" line.\n",
- fname, lineno, 0 );
-
- return( 1 );
- }
-
- if ( global_realm != NULL ) {
- Debug( LDAP_DEBUG_ANY,
- "%s: line %d: already set sasl-realm!\n",
- fname, lineno, 0 );
-
- return 1;
-
- } else {
- global_realm = ch_strdup( cargv[1] );
- }
-
- /* SASL security properties */
- } else if ( strcasecmp( cargv[0], "sasl-secprops" ) == 0 ) {
- char *txt;
-
- if ( cargc < 2 ) {
- Debug( LDAP_DEBUG_ANY, "%s: line %d: "
- "missing flags in \"sasl-secprops <properties>\" line\n",
- fname, lineno, 0 );
-
- return 1;
- }
-
- txt = slap_sasl_secprops( cargv[1] );
- if ( txt != NULL ) {
- Debug( LDAP_DEBUG_ANY,
- "%s: line %d: sasl-secprops: %s\n",
- fname, lineno, txt );
-
- return 1;
- }
-#endif /* HAVE_CYRUS_SASL */
- }
-
- return LDAP_SUCCESS;
-}
-
#ifdef HAVE_CYRUS_SASL
int
#endif
}
+void slap_sasl_secprops_unparse( struct berval *bv )
+{
+#ifdef HAVE_CYRUS_SASL
+ ldap_pvt_sasl_secprops_unparse( &sasl_secprops, bv );
+#endif
+}
+
#ifdef HAVE_CYRUS_SASL
int
slap_sasl_setpass( Operation *op, SlapReply *rs )
#define SASL_AUTHZ_TO 0x02
#define SASL_AUTHZ_AND 0x10
+static const char *policy_txt[] = {
+ "none", "from", "to", "any"
+};
+
static int authz_policy = SASL_AUTHZ_NONE;
static
return rc;
}
+const char * slap_sasl_getpolicy()
+{
+ if ( authz_policy == (SASL_AUTHZ_FROM | SASL_AUTHZ_TO | SASL_AUTHZ_AND) )
+ return "all";
+ else
+ return policy_txt[authz_policy];
+}
+
int slap_parse_user( struct berval *id, struct berval *user,
struct berval *realm, struct berval *mech )
{
int slap_sasl_regexp_config( const char *match, const char *replace )
{
-#ifdef SLAP_AUTH_REWRITE
- return slap_sasl_regexp_rewrite_config( "sasl-regexp", 0,
- match, replace, AUTHID_CONTEXT );
-#else /* ! SLAP_AUTH_REWRITE */
int rc;
SaslRegexp_t *reg;
reg->sr_match = ch_strdup( match );
reg->sr_replace = ch_strdup( replace );
+#ifdef SLAP_AUTH_REWRITE
+ rc = slap_sasl_regexp_rewrite_config( "sasl-regexp", 0,
+ match, replace, AUTHID_CONTEXT );
+ if ( rc == LDAP_SUCCESS ) nSaslRegexp++;
+ return rc;
+#else /* ! SLAP_AUTH_REWRITE */
+
/* Precompile matching pattern */
rc = regcomp( ®->sr_workspace, reg->sr_match, REG_EXTENDED|REG_ICASE );
if ( rc ) {
#endif /* ! SLAP_AUTH_REWRITE */
}
+void slap_sasl_regexp_unparse( BerVarray *out )
+{
+ int i;
+ struct berval bv;
+ BerVarray bva = NULL;
+ char ibuf[32], *ptr;
+ struct berval idx;
+
+ if ( !nSaslRegexp ) return;
+
+ idx.bv_val = ibuf;
+ bva = ch_malloc( (nSaslRegexp+1) * sizeof(struct berval) );
+ BER_BVZERO(bva+nSaslRegexp);
+ for ( i=0; i<nSaslRegexp; i++ ) {
+ idx.bv_len = sprintf( idx.bv_val, "{%d}", i);
+ bva[i].bv_len = idx.bv_len + strlen( SaslRegexp[i].sr_match ) +
+ strlen( SaslRegexp[i].sr_replace ) + 5;
+ bva[i].bv_val = ch_malloc( bva[i].bv_len+1 );
+ ptr = lutil_strcopy( bva[i].bv_val, ibuf );
+ *ptr++ = '"';
+ ptr = lutil_strcopy( ptr, SaslRegexp[i].sr_match );
+ ptr = lutil_strcopy( ptr, "\" \"" );
+ ptr = lutil_strcopy( ptr, SaslRegexp[i].sr_replace );
+ *ptr++ = '"';
+ *ptr = '\0';
+ }
+ *out = bva;
+}
+
/* Perform replacement on regexp matches */
static void slap_sasl_rx_exp(
const char *rep,
NULL, NULL,
NULL, NULL, NULL, NULL, NULL,
offsetof(struct slap_internal_schema, si_ad_monitorContext) },
+ { "configContext", "( 1.3.6.1.4.1.4203.666.11.1.1 "
+ "NAME 'configContext' "
+ "DESC 'config context' "
+ "SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 "
+ "SINGLE-VALUE NO-USER-MODIFICATION "
+ "USAGE dSAOperation )",
+ rootDseAttribute, SLAP_AT_HIDE,
+ NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL,
+ offsetof(struct slap_internal_schema, si_ad_configContext) },
{ "vendorName", "( 1.3.6.1.1.4 NAME 'vendorName' "
"DESC 'RFC3045: name of implementation vendor' "
"EQUALITY caseExactMatch "
#define SLAP_MAX_WORKER_THREADS (16)
-#define SLAP_MAX_SYNCREPL_THREADS (8)
-
#define SLAP_SB_MAX_INCOMING_DEFAULT ((1<<18) - 1)
#define SLAP_SB_MAX_INCOMING_AUTH ((1<<24) - 1)
typedef struct slap_oid_macro {
struct berval som_oid;
- char **som_names;
+ BerVarray som_names;
+ BerVarray som_subs;
LDAP_SLIST_ENTRY(slap_oid_macro) som_next;
} OidMacro;
AttributeDescription *si_ad_monitorContext;
AttributeDescription *si_ad_vendorName;
AttributeDescription *si_ad_vendorVersion;
+ AttributeDescription *si_ad_configContext;
/* subentry attribute descriptions */
AttributeDescription *si_ad_administrativeRole;
typedef struct slap_attr_assertion {
AttributeDescription *aa_desc;
struct berval aa_value;
+#ifdef LDAP_COMP_MATCH
+ struct slap_component_filter *aa_cf;/* for attribute aliasing */
+#endif
} AttributeAssertion;
typedef struct slap_ss_assertion {
/*
* "dynamic" ACL infrastructure (for ACIs and more)
*/
-typedef int (*slap_dynacl_parse)( const char *fname, int lineno, slap_style_t, const char *, void **privp );
-typedef int (*slap_dynacl_print)( void *priv );
-typedef int (*slap_dynacl_mask)(
+typedef int (slap_dynacl_parse)( const char *fname, int lineno, slap_style_t, const char *, void **privp );
+typedef int (slap_dynacl_unparse)( void *priv, struct berval *bv );
+typedef int (slap_dynacl_mask)(
void *priv,
struct slap_op *op,
Entry *e,
regmatch_t *matches,
slap_access_t *grant,
slap_access_t *deny );
-typedef int (*slap_dynacl_destroy)( void *priv );
+typedef int (slap_dynacl_destroy)( void *priv );
typedef struct slap_dynacl_t {
char *da_name;
- slap_dynacl_parse da_parse;
- slap_dynacl_print da_print;
- slap_dynacl_mask da_mask;
- slap_dynacl_destroy da_destroy;
+ slap_dynacl_parse *da_parse;
+ slap_dynacl_unparse *da_unparse;
+ slap_dynacl_mask *da_mask;
+ slap_dynacl_destroy *da_destroy;
void *da_private;
struct slap_dynacl_t *da_next;
#define SLAP_TOOL_READONLY 0x0400
#define SLAP_TOOL_QUICK 0x0800
+#define SB_TLS_OFF 0
+#define SB_TLS_ON 1
+#define SB_TLS_CRITICAL 2
+
+typedef struct slap_bindconf {
+ int sb_tls;
+ int sb_method;
+ char *sb_binddn;
+ char *sb_cred;
+ char *sb_saslmech;
+ char *sb_secprops;
+ char *sb_realm;
+ char *sb_authcId;
+ char *sb_authzId;
+} slap_bindconf;
+
struct slap_replica_info {
- char *ri_host; /* supersedes be_replica */
- BerVarray ri_nsuffix; /* array of suffixes this replica accepts */
+ const char *ri_uri; /* supersedes be_replica */
+ const char *ri_host; /* points to host part of uri */
+ BerVarray ri_nsuffix; /* array of suffixes this replica accepts */
AttributeName *ri_attrs; /* attrs to replicate, NULL=all */
- int ri_exclude; /* 1 => exclude ri_attrs */
+ int ri_exclude; /* 1 => exclude ri_attrs */
+ slap_bindconf ri_bindconf; /* for back-config */
};
+typedef struct slap_verbmasks {
+ struct berval word;
+ const int mask;
+} slap_verbmasks;
+
+#define SLAP_LIMIT_TIME 1
+#define SLAP_LIMIT_SIZE 2
+
struct slap_limits_set {
/* time limits */
int lms_t_soft;
* syncinfo structure for syncrepl
*/
-#define SLAP_SYNC_SID_SIZE 3
#define SLAP_SYNC_RID_SIZE 3
#define SLAP_SYNCUUID_SET_SIZE 256
typedef struct syncinfo_s {
struct slap_backend_db *si_be;
long si_rid;
- struct berval si_provideruri;
-#define SYNCINFO_TLS_OFF 0
-#define SYNCINFO_TLS_ON 1
-#define SYNCINFO_TLS_CRITICAL 2
- int si_tls;
- int si_bindmethod;
- char *si_binddn;
- char *si_passwd;
- char *si_saslmech;
- char *si_secprops;
- char *si_realm;
- char *si_authcId;
- char *si_authzId;
- int si_schemachecking;
+ struct berval si_provideruri;
+ slap_bindconf si_bindconf;
struct berval si_filterstr;
struct berval si_base;
int si_scope;
int si_attrsonly;
+ char *si_anfile;
AttributeName *si_anlist;
AttributeName *si_exanlist;
char **si_attrs;
+ char **si_exattrs;
int si_allattrs;
int si_allopattrs;
- char **si_exattrs;
+ int si_schemachecking;
int si_type;
time_t si_interval;
time_t *si_retryinterval;
Avlnode *si_presentlist;
LDAP *si_ld;
LDAP_LIST_HEAD(np, nonpresent_entry) si_nonpresentlist;
+ ldap_pvt_thread_mutex_t si_mutex;
} syncinfo_t;
LDAP_TAILQ_HEAD( be_pcl, slap_csn_entry );
ldap_pvt_thread_mutex_t *be_pcl_mutexp;
syncinfo_t *be_syncinfo; /* For syncrepl */
- char *be_realm;
void *be_pb; /* Netscape plugin */
+ struct ConfigTable *be_cf_table;
void *be_private; /* anything the backend database needs */
};
AttributeName *rs_attrs;
Filter *rs_filter;
struct berval rs_filterstr;
- int rs_post_search_id;
} req_search_s;
typedef struct req_compare_s {
typedef ID (BI_tool_entry_modify) LDAP_P(( BackendDB *be, Entry *e,
struct berval *text ));
+struct ConfigTable; /* config.h */
+
struct slap_backend_info {
char *bi_type; /* type of backend */
slap_mask_t bi_flags; /* backend flags */
#define SLAP_BFLAG_MONITOR 0x0001U /* a monitor backend */
+#define SLAP_BFLAG_CONFIG 0x0002U /* a config backend */
#define SLAP_BFLAG_NOLASTMODCMD 0x0010U
#define SLAP_BFLAG_INCREMENT 0x0100U
#define SLAP_BFLAG_ALIASES 0x1000U
#define SLAP_BFLAGS(be) ((be)->bd_info->bi_flags)
#define SLAP_MONITOR(be) (SLAP_BFLAGS(be) & SLAP_BFLAG_MONITOR)
+#define SLAP_CONFIG(be) (SLAP_BFLAGS(be) & SLAP_BFLAG_CONFIG)
#define SLAP_INCREMENT(be) (SLAP_BFLAGS(be) & SLAP_BFLAG_INCREMENT)
#define SLAP_ALIASES(be) (SLAP_BFLAGS(be) & SLAP_BFLAG_ALIASES)
#define SLAP_REFERRALS(be) (SLAP_BFLAGS(be) & SLAP_BFLAG_REFERRALS)
char bi_ctrls[SLAP_MAX_CIDS + 1];
unsigned int bi_nDB; /* number of databases of this type */
+ struct ConfigTable *bi_cf_table;
void *bi_private; /* anything the backend type needs */
};
#define ors_attrs oq_search.rs_attrs
#define ors_filter oq_search.rs_filter
#define ors_filterstr oq_search.rs_filterstr
-#define ors_post_search_id oq_search.rs_post_search_id
#define orr_newrdn oq_modrdn.rs_newrdn
#define orr_nnewrdn oq_modrdn.rs_nnewrdn
desc->ad_cname.bv_val,
val.bv_val ? "=" : "",
val.bv_val ? val.bv_val : "",
- accessmask2str( mask, accessmaskbuf ) );
+ accessmask2str( mask, accessmaskbuf, 1 ) );
}
rc = 0;
attr = NULL;
static char csnbuf[ LDAP_LUTIL_CSNSTR_BUFSIZE ];
static char maxcsnbuf[ LDAP_LUTIL_CSNSTR_BUFSIZE ];
-static const char *progname = "slapadd";
-
-static ldap_pvt_thread_cond_t put_cond1;
-static ldap_pvt_thread_cond_t put_cond2;
-static ldap_pvt_thread_mutex_t put_mutex1;
-static ldap_pvt_thread_mutex_t put_mutex2;
-static Entry *put_e;
-static struct berval bvtext;
-static int put_lineno;
-static int put_rc;
-
-static int use_thread = 0; /*FIXME need a new switch for this */
-
-static void *do_put(void *ptr)
-{
- ID id;
- Entry *e;
- int lineno;
-
- ldap_pvt_thread_mutex_lock( &put_mutex1 );
- do {
- ldap_pvt_thread_cond_wait( &put_cond1, &put_mutex1 );
- if ( put_rc ) {
- break;
- }
- ldap_pvt_thread_mutex_lock( &put_mutex2 );
- ldap_pvt_thread_cond_signal( &put_cond2 );
- ldap_pvt_thread_mutex_unlock( &put_mutex2 );
-
- e = put_e;
- lineno = put_lineno;
-
- if ( !dryrun ) {
- id = be->be_entry_put( be, e, &bvtext );
- if( id == NOID ) {
- fprintf( stderr, "%s: could not add entry dn=\"%s\" "
- "(line=%d): %s\n", progname, e->e_dn,
- lineno, bvtext.bv_val );
- entry_free( e );
- if ( continuemode ) continue;
- put_rc = EXIT_FAILURE;
- break;
- }
- }
-
- if ( verbose ) {
- if ( dryrun ) {
- fprintf( stderr, "added: \"%s\"\n",
- e->e_dn );
- } else {
- fprintf( stderr, "added: \"%s\" (%08lx)\n",
- e->e_dn, (long) id );
- }
- }
-
- entry_free( e );
-
- } while (1);
- ldap_pvt_thread_mutex_unlock( &put_mutex1 );
- return NULL;
-}
int
slapadd( int argc, char **argv )
const char *text;
char textbuf[SLAP_TEXT_BUFLEN] = { '\0' };
size_t textlen = sizeof textbuf;
+ const char *progname = "slapadd";
struct berval csn;
struct berval maxcsn;
Entry *ctxcsn_e;
ID ctxcsn_id, id;
int ret;
+ struct berval bvtext;
int i, checkvals;
struct berval mc;
- ldap_pvt_thread_t put_tid;
-
slap_tool_init( progname, SLAPADD, argc, argv );
if( !be->be_entry_open ||
checkvals = (slapMode & SLAP_TOOL_QUICK) ? 0 : 1;
- if ( use_thread ) {
- ldap_pvt_thread_initialize();
- ldap_pvt_thread_cond_init( &put_cond1 );
- ldap_pvt_thread_cond_init( &put_cond2 );
- ldap_pvt_thread_mutex_init( &put_mutex1 );
- ldap_pvt_thread_mutex_init( &put_mutex2 );
- rc = ldap_pvt_thread_create( &put_tid, 0, do_put, NULL );
- if ( rc ) {
- fprintf( stderr, "%s: could not create thread.\n",
- progname );
- exit( EXIT_FAILURE );
- }
- ldap_pvt_thread_mutex_lock( &put_mutex2 );
- }
-
lmax = 0;
lineno = 0;
}
}
- if ( use_thread ) {
- ldap_pvt_thread_mutex_lock( &put_mutex1 );
- if (put_rc) {
- rc = put_rc;
- ldap_pvt_thread_mutex_unlock( &put_mutex1 );
- break;
- }
- put_e = e;
- put_lineno = lineno;
- ldap_pvt_thread_cond_signal( &put_cond1 );
- ldap_pvt_thread_mutex_unlock( &put_mutex1 );
- /* Make sure writer wakes up */
- ldap_pvt_thread_cond_wait( &put_cond2, &put_mutex2 );
- continue;
- }
-
if ( !dryrun ) {
id = be->be_entry_put( be, e, &bvtext );
if( id == NOID ) {
}
}
+done:;
entry_free( e );
}
- if ( use_thread ) {
- ldap_pvt_thread_mutex_unlock( &put_mutex2 );
- ldap_pvt_thread_mutex_lock( &put_mutex1 );
- /* Tell child thread to stop if it hasn't aborted */
- if ( !put_rc ) {
- put_rc = EXIT_FAILURE;
- ldap_pvt_thread_cond_signal( &put_cond1 );
- }
- ldap_pvt_thread_mutex_unlock( &put_mutex1 );
- ldap_pvt_thread_join( put_tid, NULL );
- ldap_pvt_thread_mutex_destroy( &put_mutex2 );
- ldap_pvt_thread_mutex_destroy( &put_mutex1 );
- ldap_pvt_thread_cond_destroy( &put_cond2 );
- ldap_pvt_thread_cond_destroy( &put_cond1 );
- }
-
bvtext.bv_len = textlen;
bvtext.bv_val = textbuf;
bvtext.bv_val[0] = '\0';
break;
case 'n': /* which config file db to index */
- dbnum = atoi( optarg ) - 1;
+ dbnum = atoi( optarg );
break;
case 'q': /* turn on quick */
break;
}
+ ldap_syslog = 0;
+
if ( ldiffile == NULL ) {
ldiffp = tool == SLAPCAT ? stdout : stdin;
}
#endif
- rc = slap_init( mode, progname );
+ rc = slap_schema_init();
if ( rc != 0 ) {
- fprintf( stderr, "%s: slap_init failed!\n", progname );
+ fprintf( stderr, "%s: slap_schema_init failed!\n", progname );
exit( EXIT_FAILURE );
}
- rc = slap_schema_init();
+ rc = slap_init( mode, progname );
if ( rc != 0 ) {
- fprintf( stderr, "%s: slap_schema_init failed!\n", progname );
+ fprintf( stderr, "%s: slap_init failed!\n", progname );
exit( EXIT_FAILURE );
}
}
at_oc_cache = 1;
- ldap_syslog = 0;
switch ( tool ) {
case SLAPADD:
exit( EXIT_FAILURE );
}
- be = &backends[dbnum=0];
+ be = &backends[dbnum=1];
/* If just doing the first by default and it is a
* glue subordinate, find the master.
*/
/* fall through */
case LDAP_MOD_DELETE:
case LDAP_MOD_REPLACE:
+ case LDAP_MOD_INCREMENT:
break;
default:
#include <ldap.h>
#include <lutil.h>
+#include <lutil_sha1.h>
#include "ldap_defaults.h"
int
slappasswd( int argc, char *argv[] )
{
+#ifdef LUTIL_SHA1_BYTES
char *scheme = "{SSHA}";
+#else
+ char *scheme = "{SMD5}";
+#endif
+
char *newpw = NULL;
char *pwfile = NULL;
const char *text;
c[0].ldctl_iscritical = si->si_type < 0;
ctrls[0] = &c[0];
- if ( si->si_authzId ) {
+ if ( si->si_bindconf.sb_authzId ) {
c[1].ldctl_oid = LDAP_CONTROL_PROXY_AUTHZ;
- ber_str2bv( si->si_authzId, 0, 0, &c[1].ldctl_value );
+ ber_str2bv( si->si_bindconf.sb_authzId, 0, 0, &c[1].ldctl_value );
c[1].ldctl_iscritical = 1;
ctrls[1] = &c[1];
ctrls[2] = NULL;
/* Bind to master */
- if ( si->si_tls ) {
+ if ( si->si_bindconf.sb_tls ) {
rc = ldap_start_tls_s( si->si_ld, NULL, NULL );
if( rc != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_ANY,
"%s: ldap_start_tls failed (%d)\n",
- si->si_tls == SYNCINFO_TLS_CRITICAL ? "Error" : "Warning",
+ si->si_bindconf.sb_tls == SB_TLS_CRITICAL ? "Error" : "Warning",
rc, 0 );
- if( si->si_tls == SYNCINFO_TLS_CRITICAL ) goto done;
+ if( si->si_bindconf.sb_tls == SB_TLS_CRITICAL ) goto done;
}
}
- if ( si->si_bindmethod == LDAP_AUTH_SASL ) {
+ if ( si->si_bindconf.sb_method == LDAP_AUTH_SASL ) {
#ifdef HAVE_CYRUS_SASL
void *defaults;
- if ( si->si_secprops != NULL ) {
+ if ( si->si_bindconf.sb_secprops != NULL ) {
rc = ldap_set_option( si->si_ld,
- LDAP_OPT_X_SASL_SECPROPS, si->si_secprops);
+ LDAP_OPT_X_SASL_SECPROPS, si->si_bindconf.sb_secprops);
if( rc != LDAP_OPT_SUCCESS ) {
Debug( LDAP_DEBUG_ANY, "Error: ldap_set_option "
"(%s,SECPROPS,\"%s\") failed!\n",
- si->si_provideruri.bv_val, si->si_secprops, 0 );
+ si->si_provideruri.bv_val, si->si_bindconf.sb_secprops, 0 );
goto done;
}
}
- defaults = lutil_sasl_defaults( si->si_ld, si->si_saslmech,
- si->si_realm, si->si_authcId, si->si_passwd, si->si_authzId );
+ defaults = lutil_sasl_defaults( si->si_ld, si->si_bindconf.sb_saslmech,
+ si->si_bindconf.sb_realm, si->si_bindconf.sb_authcId,
+ si->si_bindconf.sb_cred, si->si_bindconf.sb_authzId );
rc = ldap_sasl_interactive_bind_s( si->si_ld,
- si->si_binddn,
- si->si_saslmech,
+ si->si_bindconf.sb_binddn,
+ si->si_bindconf.sb_saslmech,
NULL, NULL,
LDAP_SASL_QUIET,
lutil_sasl_interact,
/* FIXME (see above comment) */
/* if Kerberos credentials cache is not active, retry */
- if ( strcmp( si->si_saslmech, "GSSAPI" ) == 0 &&
+ if ( strcmp( si->si_bindconf.sb_saslmech, "GSSAPI" ) == 0 &&
rc == LDAP_LOCAL_ERROR )
{
rc = LDAP_SERVER_DOWN;
#endif
} else {
- rc = ldap_bind_s( si->si_ld,
- si->si_binddn, si->si_passwd, si->si_bindmethod );
+ rc = ldap_bind_s( si->si_ld, si->si_bindconf.sb_binddn,
+ si->si_bindconf.sb_cred, si->si_bindconf.sb_method );
if ( rc != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_ANY, "do_syncrep1: "
"ldap_bind_s failed (%d)\n", rc, 0, 0 );
msg != NULL;
msg = ldap_next_message( si->si_ld, msg ) )
{
+ if ( slapd_shutdown ) {
+ rc = -2;
+ goto done;
+ }
switch( ldap_msgtype( msg ) ) {
case LDAP_RES_SEARCH_ENTRY:
ldap_get_entry_controls( si->si_ld, msg, &rctrls );
if ( si == NULL )
return NULL;
+ ldap_pvt_thread_mutex_lock( &si->si_mutex );
+
switch( abs( si->si_type )) {
case LDAP_SYNC_REFRESH_ONLY:
case LDAP_SYNC_REFRESH_AND_PERSIST:
break;
default:
+ ldap_pvt_thread_mutex_unlock( &si->si_mutex );
return NULL;
}
ldap_unbind( si->si_ld );
si->si_ld = NULL;
}
+ ldap_pvt_thread_mutex_unlock( &si->si_mutex );
return NULL;
}
}
ldap_pvt_thread_mutex_unlock( &slapd_rq.rq_mutex );
+ ldap_pvt_thread_mutex_unlock( &si->si_mutex );
return NULL;
}
SlapReply rs_add = {REP_RESULT};
SlapReply rs_modify = {REP_RESULT};
Filter f = {0};
- AttributeAssertion ava = {0};
+ AttributeAssertion ava = { NULL, BER_BVNULL, NULL };
int rc = LDAP_SUCCESS;
int ret = LDAP_SUCCESS;
if ( uuids ) {
Filter uf;
- AttributeAssertion eq;
+ AttributeAssertion eq = { NULL, BER_BVNULL, NULL };
int i;
op->ors_attrsonly = 1;
void
syncinfo_free( syncinfo_t *sie )
{
+ ldap_pvt_thread_mutex_destroy( &sie->si_mutex );
if ( !BER_BVISNULL( &sie->si_provideruri ) ) {
ch_free( sie->si_provideruri.bv_val );
}
- if ( sie->si_binddn ) {
- ch_free( sie->si_binddn );
- }
- if ( sie->si_passwd ) {
- ch_free( sie->si_passwd );
- }
- if ( sie->si_saslmech ) {
- ch_free( sie->si_saslmech );
- }
- if ( sie->si_secprops ) {
- ch_free( sie->si_secprops );
- }
- if ( sie->si_realm ) {
- ch_free( sie->si_realm );
- }
- if ( sie->si_authcId ) {
- ch_free( sie->si_authcId );
- }
- if ( sie->si_authzId ) {
- ch_free( sie->si_authzId );
- }
+
+ bindconf_free( &sie->si_bindconf );
+
if ( sie->si_filterstr.bv_val ) {
ch_free( sie->si_filterstr.bv_val );
}