#! /bin/sh
# $OpenLDAP$
-# from OpenLDAP: pkg/ldap/configure.in,v 1.408.2.22 2002/10/28 19:51:11 kurt Exp
+# from OpenLDAP: pkg/ldap/configure.in,v 1.408.2.23 2002/10/29 01:38:30 kurt Exp
# Copyright 1998-2002 The OpenLDAP Foundation. All Rights Reserved.
#
ol_link_sql=no
if test $ol_enable_sql != no ; then
+ for ac_hdr in sql.h sqlext.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:19262: 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 19267 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:19272: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+{ echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
+
+fi
+done
+
+
echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
-echo "configure:19259: checking for SQLDriverConnect in -liodbc" >&5
+echo "configure:19302: 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 19267 "configure"
+#line 19310 "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:19278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19321: \"$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:19303: checking for SQLDriverConnect in -lodbc" >&5
+echo "configure:19346: 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 19311 "configure"
+#line 19354 "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:19322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19365: \"$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:19361: checking for $ac_hdr" >&5
+echo "configure:19404: 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 19366 "configure"
+#line 19409 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:19371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:19414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ol_link_termcap = no ; then
echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
-echo "configure:19400: checking for tputs in -ltermcap" >&5
+echo "configure:19443: checking for tputs in -ltermcap" >&5
ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ltermcap $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 19408 "configure"
+#line 19451 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
tputs()
; return 0; }
EOF
-if { (eval echo configure:19419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test $ol_link_termcap = no ; then
echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
-echo "configure:19452: checking for initscr in -lncurses" >&5
+echo "configure:19495: checking for initscr in -lncurses" >&5
ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 19460 "configure"
+#line 19503 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
initscr()
; return 0; }
EOF
-if { (eval echo configure:19471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19514: \"$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:19517: checking for $ac_hdr" >&5
+echo "configure:19560: 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 19522 "configure"
+#line 19565 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:19527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:19570: \"$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:19556: checking for sasl_client_init in -lsasl2" >&5
+echo "configure:19599: 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 19564 "configure"
+#line 19607 "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:19575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19618: \"$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:19594: checking for sasl_client_init in -lsasl" >&5
+echo "configure:19637: 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 19602 "configure"
+#line 19645 "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:19613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19656: \"$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:19649: checking Cyrus SASL library version" >&5
+echo "configure:19692: 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 19655 "configure"
+#line 19698 "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:19706: checking for sasl_version" >&5
+echo "configure:19749: 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 19711 "configure"
+#line 19754 "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:19735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19778: \"$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:19794: checking fetch(3) library" >&5
+echo "configure:19837: 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 19800 "configure"
+#line 19843 "configure"
#include "confdefs.h"
#include <sys/param.h>
struct url *u = fetchParseURL("file:///");
; return 0; }
EOF
-if { (eval echo configure:19810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_lib_fetch=yes
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:19848: checking for $ac_hdr" >&5
+echo "configure:19891: 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 19853 "configure"
+#line 19896 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:19858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:19901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
save_LIBS="$LIBS"
LIBS="$TERMCAP_LIBS $LIBS"
echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
-echo "configure:19889: checking for readline in -lreadline" >&5
+echo "configure:19932: checking for readline in -lreadline" >&5
ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lreadline $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 19897 "configure"
+#line 19940 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
readline()
; return 0; }
EOF
-if { (eval echo configure:19908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:19951: \"$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="$TLS_LIBS $LIBS"
echo $ac_n "checking for crypt""... $ac_c" 1>&6
-echo "configure:19953: checking for crypt" >&5
+echo "configure:19996: 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 19958 "configure"
+#line 20001 "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:19982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20025: \"$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:20002: checking for crypt in -lcrypt" >&5
+echo "configure:20045: 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 20010 "configure"
+#line 20053 "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:20021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20064: \"$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:20066: checking for setproctitle" >&5
+echo "configure:20109: 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 20071 "configure"
+#line 20114 "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:20095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20138: \"$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:20114: checking for setproctitle in -lutil" >&5
+echo "configure:20157: 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 20122 "configure"
+#line 20165 "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:20133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20176: \"$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:20173: checking for $ac_hdr" >&5
+echo "configure:20216: 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 20178 "configure"
+#line 20221 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:20183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:20226: \"$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:20212: checking for SLPOpen in -lslp" >&5
+echo "configure:20255: 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 20220 "configure"
+#line 20263 "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:20231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:20274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:20266: checking for ANSI C header files" >&5
+echo "configure:20309: 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 20271 "configure"
+#line 20314 "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:20279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:20322: \"$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 20296 "configure"
+#line 20339 "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 20314 "configure"
+#line 20357 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 20335 "configure"
+#line 20378 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
exit (0); }
EOF
-if { (eval echo configure:20353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:20396: \"$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:20377: checking for mode_t" >&5
+echo "configure:20420: 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 20382 "configure"
+#line 20425 "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:20413: checking for off_t" >&5
+echo "configure:20456: 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 20418 "configure"
+#line 20461 "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:20449: checking for pid_t" >&5
+echo "configure:20492: 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 20454 "configure"
+#line 20497 "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:20485: checking for ptrdiff_t" >&5
+echo "configure:20528: 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 20490 "configure"
+#line 20533 "configure"
#include "confdefs.h"
#include <stddef.h>
int main() {
ptrdiff_t p
; return 0; }
EOF
-if { (eval echo configure:20497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:20540: \"$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:20518: checking return type of signal handlers" >&5
+echo "configure:20561: 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 20523 "configure"
+#line 20566 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:20540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:20583: \"$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:20559: checking for size_t" >&5
+echo "configure:20602: 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 20564 "configure"
+#line 20607 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:20596: checking for ssize_t" >&5
+echo "configure:20639: 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 20601 "configure"
+#line 20644 "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:20632: checking for caddr_t" >&5
+echo "configure:20675: 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 20637 "configure"
+#line 20680 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
-echo "configure:20669: checking for socklen_t" >&5
+echo "configure:20712: 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 20674 "configure"
+#line 20717 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
socklen_t len;
; return 0; }
EOF
-if { (eval echo configure:20688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:20731: \"$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:20709: checking for member st_blksize in aggregate type struct stat" >&5
+echo "configure:20752: 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 20714 "configure"
+#line 20757 "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:20722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:20765: \"$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:20744: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:20787: 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 20749 "configure"
+#line 20792 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:20758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:20801: \"$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:20779: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:20822: 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 20784 "configure"
+#line 20827 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:20792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:20835: \"$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:20813: checking for uid_t in sys/types.h" >&5
+echo "configure:20856: 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 20818 "configure"
+#line 20861 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
fi
echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
-echo "configure:20847: checking for sig_atomic_t" >&5
+echo "configure:20890: 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 20852 "configure"
+#line 20895 "configure"
#include "confdefs.h"
#include <signal.h>
int main() {
sig_atomic_t atomic;
; return 0; }
EOF
-if { (eval echo configure:20859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:20902: \"$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:20883: checking struct passwd for pw_gecos" >&5
+echo "configure:20926: 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 20889 "configure"
+#line 20932 "configure"
#include "confdefs.h"
#include <pwd.h>
int main() {
; return 0; }
EOF
-if { (eval echo configure:20899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:20942: \"$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:20921: checking struct passwd for pw_passwd" >&5
+echo "configure:20964: 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 20927 "configure"
+#line 20970 "configure"
#include "confdefs.h"
#include <pwd.h>
int main() {
; return 0; }
EOF
-if { (eval echo configure:20937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:20980: \"$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:20959: checking if toupper() requires islower()" >&5
+echo "configure:21002: 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 20968 "configure"
+#line 21011 "configure"
#include "confdefs.h"
#include <ctype.h>
exit(1);
}
EOF
-if { (eval echo configure:20980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:21023: \"$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:21003: checking for working const" >&5
+echo "configure:21046: 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 21008 "configure"
+#line 21051 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:21057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21100: \"$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:21078: checking if compiler understands volatile" >&5
+echo "configure:21121: 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 21083 "configure"
+#line 21126 "configure"
#include "confdefs.h"
int x, y, z;
int main() {
*b = 0;
; return 0; }
EOF
-if { (eval echo configure:21092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21135: \"$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:21122: checking whether byte ordering is bigendian" >&5
+echo "configure:21165: 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 21129 "configure"
+#line 21172 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:21140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21183: \"$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 21144 "configure"
+#line 21187 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:21155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21198: \"$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 21175 "configure"
+#line 21218 "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:21188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:21231: \"$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:21214: checking size of short" >&5
+echo "configure:21257: 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 21220 "configure"
+#line 21263 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
switch (0) case 0: case (sizeof (short) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:21230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21273: \"$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:21253: checking size of int" >&5
+echo "configure:21296: 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 21259 "configure"
+#line 21302 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
switch (0) case 0: case (sizeof (int) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:21269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21312: \"$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:21292: checking size of long" >&5
+echo "configure:21335: 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 21298 "configure"
+#line 21341 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
switch (0) case 0: case (sizeof (long) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:21308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:21351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_long=$ac_size
else
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:21359: checking for 8-bit clean memcmp" >&5
+echo "configure:21402: 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 21367 "configure"
+#line 21410 "configure"
#include "confdefs.h"
main()
}
EOF
-if { (eval echo configure:21377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:21420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
echo $ac_n "checking for strftime""... $ac_c" 1>&6
-echo "configure:21395: checking for strftime" >&5
+echo "configure:21438: 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 21400 "configure"
+#line 21443 "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:21424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21467: \"$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:21446: checking for strftime in -lintl" >&5
+echo "configure:21489: 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 21454 "configure"
+#line 21497 "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:21465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21508: \"$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:21493: checking for inet_aton()" >&5
+echo "configure:21536: 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 21498 "configure"
+#line 21541 "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:21520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21563: \"$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:21542: checking for _spawnlp" >&5
+echo "configure:21585: 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 21547 "configure"
+#line 21590 "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:21571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21614: \"$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:21595: checking for _snprintf" >&5
+echo "configure:21638: 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 21600 "configure"
+#line 21643 "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:21624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21667: \"$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:21650: checking for _vsnprintf" >&5
+echo "configure:21693: 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 21655 "configure"
+#line 21698 "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:21679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21722: \"$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:21705: checking for vprintf" >&5
+echo "configure:21748: 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 21710 "configure"
+#line 21753 "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:21734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21777: \"$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:21758: checking for _doprnt" >&5
+echo "configure:21801: 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 21763 "configure"
+#line 21806 "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:21787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21830: \"$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:21816: checking for $ac_func" >&5
+echo "configure:21859: 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 21821 "configure"
+#line 21864 "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:21845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:21927: checking for $ac_func" >&5
+echo "configure:21970: 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 21932 "configure"
+#line 21975 "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:21956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:21999: \"$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
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:21984: checking for $ac_func" >&5
+echo "configure:22027: 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 21989 "configure"
+#line 22032 "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:22013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
# Check Configuration
echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
-echo "configure:22060: checking declaration of sys_errlist" >&5
+echo "configure:22103: 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 22066 "configure"
+#line 22109 "configure"
#include "confdefs.h"
#include <stdio.h>
char *c = (char *) *sys_errlist
; return 0; }
EOF
-if { (eval echo configure:22079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:22122: \"$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:22102: checking existence of sys_errlist" >&5
+echo "configure:22145: 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 22108 "configure"
+#line 22151 "configure"
#include "confdefs.h"
#include <errno.h>
int main() {
char *c = (char *) *sys_errlist
; return 0; }
EOF
-if { (eval echo configure:22115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:22158: \"$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
dnl SQL
ol_link_sql=no
if test $ol_enable_sql != no ; then
+ AC_CHECK_HEADERS(sql.h sqlext.h,[],[
+ AC_MSG_ERROR([could not locate SQL headers])
+ ])
+
AC_CHECK_LIB(iodbc,SQLDriverConnect,[have_iodbc=yes],[have_iodbc=no])
if test $have_iodbc = yes ; then
ol_link_sql="-liodbc"
/* Define if you have the <slp.h> header file. */
#undef HAVE_SLP_H
+/* Define if you have the <sql.h> header file. */
+#undef HAVE_SQL_H
+
+/* Define if you have the <sqlext.h> header file. */
+#undef HAVE_SQLEXT_H
+
/* Define if you have the <ssl.h> header file. */
#undef HAVE_SSL_H
DB_ENV *ldbm_Env = NULL; /* real or fake, depending on db and version */
#endif
+/* Let's make the version comparisons a little easier... */
+#undef DB_VERSION_X
+#ifdef HAVE_BERKELEY_DB
+#define DB_VERSION_X ((DB_VERSION_MAJOR<<16)|(DB_VERSION_MINOR<<8)|DB_VERSION_PATCH)
+#endif
+
/*******************************************************************
* *
* Create some special functions to initialize Berkeley DB for *
return NULL;
}
-#if DB_VERSION_MAJOR > 3 || DB_VERSION_MINOR >= 3
+#if DB_VERSION_X >= 0x030300
/* This interface appeared in 3.3 */
env->set_alloc( env, ldbm_malloc, NULL, NULL );
#endif
envFlags |= DB_THREAD;
#endif
-#if DB_VERSION_MAJOR > 3 || DB_VERSION_MINOR > 0
+#if DB_VERSION_X >= 0x030100
err = env->open( env, home, envFlags, 0 );
#else
/* 3.0.x requires an extra argument */
return NULL;
}
-#if DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR < 3
+#if DB_VERSION_X < 0x030300
ret->set_malloc( ret, ldbm_malloc );
#endif
__atoe(n2);
name = n2;
#endif
-#if DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR > 0 && DB_VERSION_PATCH >= 17
+#if DB_VERSION_X >= 0x040111
err = ret->open( ret, NULL, name, NULL, DB_TYPE, rw, mode);
#else
err = ret->open( ret, name, NULL, DB_TYPE, rw, mode);
LDBM_RLOCK;
/* acquire a cursor for the DB */
-# if DB_VERSION_MAJOR >= 3 || (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR > 5)
+# if DB_VERSION_X >= 0x020600
rc = ldbm->cursor( ldbm, NULL, &dbci, 0 );
# else
rc = ldbm->cursor( ldbm, NULL, &dbci );
return( 0 );
}
-/* Convert a delimited string into a list of AttributeNames; Add on
- * to an existing list if it was given.
+/*
+ * Convert a delimited string into a list of AttributeNames;
+ * add on to an existing list if it was given. If the string
+ * is not a valid attribute name, if a '-' is prepended it is
+ * skipped and the remaining name is tried again; if a '+' is
+ * prepended, an objectclass name is searched instead.
+ *
+ * NOTE: currently, if a valid attribute name is not found,
+ * the same string is also checked as valid objectclass name;
+ * however, this behavior is deprecated.
*/
AttributeName *
str2anlist( AttributeName *an, char *in, const char *brkstr )
slap_bv2ad(&adname, &anew->an_desc, &text);
if ( !anew->an_desc ) {
free( an );
- /* overwrites input string on error! */
+ /*
+ * overwrites input string
+ * on error!
+ */
strcpy( in, s );
return NULL;
}
} break;
+
case '+': {
struct berval ocname;
ocname.bv_len = anew->an_name.bv_len - 1;
anew->an_oc = oc_bvfind( &ocname );
if ( !anew->an_oc ) {
free( an );
- /* overwrites input string on error! */
+ /*
+ * overwrites input string
+ * on error!
+ */
strcpy( in, s );
return NULL;
}
} break;
+
default:
/* old (deprecated) way */
anew->an_oc = oc_bvfind( &anew->an_name );
return -1;
}
- attr_merge( e, ad_attributeTypes, vals );
+ if( attr_merge( e, ad_attributeTypes, vals ) )
+ return -1;
ldap_memfree( vals[0].bv_val );
}
return 0;
static void bdb_lru_print(Cache *cache);
#endif
+#if 0 /* unused */
static int
bdb_cache_entry_rdwr_lock(Entry *e, int rw)
{
else
return ldap_pvt_thread_rdwr_runlock(&BEI(e)->bei_rdwr);
}
+#endif /* unused */
static int
bdb_cache_entry_rdwr_init(Entry *e)
if( rc != LDAP_SUCCESS ) return 1;
/* size of the cache in entries */
- } else if ( strcasecmp( argv[0], "cachesize" ) == 0 ) {
+ } else if ( strcasecmp( argv[0], "cachesize" ) == 0 ) {
if ( argc < 2 ) {
fprintf( stderr,
"%s: line %d: missing size in \"cachesize <size>\" line\n",
return 0;
}
+#if 0 /* unused */
static int idl_delete( ID *ids, ID id )
{
unsigned x = bdb_idl_search( ids, id );
return 0;
}
+#endif /* unused */
static char *
bdb_show_key(
typedef void * db_malloc(size_t);
typedef void * db_realloc(void *, size_t);
+#if 0
static int
bdb_open( BackendInfo *bi )
{
return 0;
}
-#if 0
static int
bdb_destroy( BackendInfo *bi )
{
#ifdef NEW_LOGGING
LDAP_LOG( BACK_BDB, ENTRY, "bdb_db_initialize\n", 0, 0, 0 );
#else
- Debug( LDAP_DEBUG_TRACE, "bdb_open: initialize BDB backend\n",
+ Debug( LDAP_DEBUG_TRACE, "bdb_initialize: initialize BDB backend\n",
0, 0, 0 );
#endif
"\texpected: %s \tgot: %s\n", DB_VERSION_STRING, version, 0 );
#else
Debug( LDAP_DEBUG_ANY,
- "bdb_open: version mismatch\n"
+ "bdb_initialize: version mismatch\n"
"\texpected: " DB_VERSION_STRING "\n"
"\tgot: %s \n", version, 0, 0 );
#endif
#ifdef NEW_LOGGING
LDAP_LOG( BACK_BDB, DETAIL1,
- "bdb_db_initialize: bdb_open: %s\n", version, 0, 0 );
+ "bdb_db_initialize: %s\n", version, 0, 0 );
#else
- Debug( LDAP_DEBUG_ANY, "bdb_open: %s\n",
+ Debug( LDAP_DEBUG_ANY, "bdb_initialize: %s\n",
version, 0, 0 );
#endif
}
case REWRITE_REGEXEC_UNWILLING:
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
- NULL, "Unwilling to perform", NULL, NULL );
+ NULL, "Operation not allowed", NULL, NULL );
return( -1 );
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OTHER,
- NULL, "Operations error", NULL, NULL );
+ NULL, "Rewrite error", NULL, NULL );
return( -1 );
}
#else /* !ENABLE_REWRITE */
#ifdef ENABLE_REWRITE
/*
* FIXME: dn-valued attrs should be rewritten
- * to allow their use in ACLs at the back-ldap
- * level.
+ * to allow their use in ACLs at back-ldap level.
*/
if ( strcmp( a->a_desc->ad_type->sat_syntax->ssyn_oid,
SLAPD_DN_SYNTAX ) == 0 ) {
- ldap_dnattr_rewrite( li->rwinfo, a->a_vals, conn );
+ /*
+ * FIXME: rewrite could fail; in this case
+ * the operation should give up, right?
+ */
+ (void)ldap_dnattr_rewrite( li->rwinfo, a->a_vals, conn );
}
#endif /* ENABLE_REWRITE */
case REWRITE_REGEXEC_UNWILLING:
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
- NULL, "Unwilling to perform", NULL, NULL );
+ NULL, "Operation not allowed", NULL, NULL );
return( -1 );
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OTHER,
- NULL, "Operations error", NULL, NULL );
+ NULL, "Rewrite error", NULL, NULL );
return( -1 );
}
#else /* !ENABLE_REWRITE */
if (err != LDAP_SUCCESS) {
err = ldap_back_map_result(err);
send_ldap_result( conn, op, err,
- NULL, "ldap_init failed", NULL, NULL );
+ NULL, "ldap_initialize() failed", NULL, NULL );
return( NULL );
}
/* Set LDAP version. This will always succeed: If the client
&lc->bound_dn.bv_val ) ) {
case REWRITE_REGEXEC_OK:
if ( lc->bound_dn.bv_val == NULL ) {
- ber_dupbv( &lc->bound_dn, &lc->conn->c_dn );
+ ber_dupbv( &lc->bound_dn,
+ &lc->conn->c_dn );
}
#ifdef NEW_LOGGING
LDAP_LOG( BACK_LDAP, DETAIL1,
case REWRITE_REGEXEC_UNWILLING:
send_ldap_result( conn, op,
LDAP_UNWILLING_TO_PERFORM,
- NULL, "Unwilling to perform",
+ NULL, "Operation not allowed",
NULL, NULL );
return( NULL );
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op,
LDAP_OTHER,
- NULL, "Operations error",
+ NULL, "Rewrite error",
NULL, NULL );
return( NULL );
}
+
#else /* !ENABLE_REWRITE */
struct berval bv;
ldap_back_dn_massage( li, &lc->conn->c_dn, &bv, 0, 1 );
- if ( bv.bv_val == lc->conn->c_dn.bv_val )
+ if ( bv.bv_val == lc->conn->c_dn.bv_val ) {
ber_dupbv( &lc->bound_dn, &bv );
- else
+ } else {
lc->bound_dn = bv;
+ }
#endif /* !ENABLE_REWRITE */
+
} else {
lc->bound_dn.bv_val = NULL;
lc->bound_dn.bv_len = 0;
case REWRITE_REGEXEC_UNWILLING:
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
- NULL, "Unwilling to perform", NULL, NULL );
+ NULL, "Operation not allowed", NULL, NULL );
return( -1 );
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OTHER,
- NULL, "Operations error", NULL, NULL );
+ NULL, "Rewrite error", NULL, NULL );
return( -1 );
}
#else /* !ENABLE_REWRITE */
case REWRITE_REGEXEC_UNWILLING:
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
- NULL, "Unwilling to perform", NULL, NULL );
+ NULL, "Operation not allowed", NULL, NULL );
return( -1 );
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OTHER,
- NULL, "Operations error", NULL, NULL );
+ NULL, "Rewrite error", NULL, NULL );
return( -1 );
}
#else /* !ENABLE_REWRITE */
case REWRITE_REGEXEC_UNWILLING:
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
- NULL, "Unwilling to perform", NULL, NULL );
+ NULL, "Operation not allowed", NULL, NULL );
return( -1 );
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OTHER,
- NULL, "Operations error", NULL, NULL );
+ NULL, "Rewrite error", NULL, NULL );
return( -1 );
}
#else /* !ENABLE_REWRITE */
ml->sml_bvalues, conn );
}
#endif /* ENABLE_REWRITE */
-
- for (j = 0; ml->sml_bvalues[j].bv_val; j++);
- mods[i].mod_bvalues = (struct berval **)ch_malloc((j+1) *
- sizeof(struct berval *));
- for (j = 0; ml->sml_bvalues[j].bv_val; j++)
- mods[i].mod_bvalues[j] = &ml->sml_bvalues[j];
- mods[i].mod_bvalues[j] = NULL;
+
+ if ( ml->sml_bvalues != NULL ) {
+ for (j = 0; ml->sml_bvalues[j].bv_val; j++);
+ mods[i].mod_bvalues = (struct berval **)ch_malloc((j+1) *
+ sizeof(struct berval *));
+ for (j = 0; ml->sml_bvalues[j].bv_val; j++)
+ mods[i].mod_bvalues[j] = &ml->sml_bvalues[j];
+ mods[i].mod_bvalues[j] = NULL;
+ } else {
+ mods[i].mod_bvalues = NULL;
+ }
+
i++;
}
modv[i] = 0;
case REWRITE_REGEXEC_UNWILLING:
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
- NULL, "Unwilling to perform",
+ NULL, "Operation not allowed",
NULL, NULL );
return( -1 );
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OTHER,
- NULL, "Operations error",
+ NULL, "Rewrite error",
NULL, NULL );
return( -1 );
}
case REWRITE_REGEXEC_UNWILLING:
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
- NULL, "Unwilling to perform", NULL, NULL );
+ NULL, "Operation not allowed", NULL, NULL );
return( -1 );
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OTHER,
- NULL, "Operations error", NULL, NULL );
+ NULL, "Rewrite error", NULL, NULL );
return( -1 );
}
#else /* !ENABLE_REWRITE */
case REWRITE_REGEXEC_UNWILLING:
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
- NULL, "Unwilling to perform", NULL, NULL );
+ NULL, "Operation not allowed", NULL, NULL );
rc = -1;
goto finish;
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OTHER,
- NULL, "Operations error", NULL, NULL );
+ NULL, "Rewrite error", NULL, NULL );
rc = -1;
goto finish;
}
case REWRITE_REGEXEC_UNWILLING:
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
- NULL, "Unwilling to perform", NULL, NULL );
+ NULL, "Operation not allowed", NULL, NULL );
+ rc = -1;
+ goto finish;
+
case REWRITE_REGEXEC_ERR:
+ send_ldap_result( conn, op, LDAP_OTHER,
+ NULL, "Rewrite error", NULL, NULL );
rc = -1;
goto finish;
}
mapped_attrs[count] = NULL;
}
- if ((msgid = ldap_search(lc->ld, mbase.bv_val, scope, mapped_filter, mapped_attrs,
- attrsonly)) == -1)
- {
+ msgid = ldap_search(lc->ld, mbase.bv_val, scope, mapped_filter,
+ mapped_attrs, attrsonly);
+ if ( msgid == -1 ) {
fail:;
rc = ldap_back_op_result(lc, op);
goto finish;
break;
case REWRITE_REGEXEC_UNWILLING:
- send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
- NULL, "Unwilling to perform",
- NULL, NULL );
case REWRITE_REGEXEC_ERR:
- rc = -1;
- goto finish;
+ /* FIXME: no error, but no matched ... */
+ mmatch = NULL;
+ break;
}
}
if ( v2refs ) {
sres = LDAP_REFERRAL;
}
+
send_search_result( conn, op, sres,
mmatch, err, v2refs, NULL, count );
case REWRITE_REGEXEC_UNWILLING:
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
- NULL, NULL, NULL, NULL );
+ NULL, "Operation not allowed", NULL, NULL );
return -1;
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OTHER,
- NULL, NULL, NULL, NULL );
+ NULL, "Rewrite error", NULL, NULL );
return -1;
}
case REWRITE_REGEXEC_UNWILLING:
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
- NULL, "Unwilling to perform",
+ NULL, "Operation not allowed",
NULL, NULL );
return -1;
case REWRITE_REGEXEC_UNWILLING:
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
- NULL, "Unwilling to perform",
+ NULL, "Operation not allowed",
NULL, NULL );
rc = -1;
goto cleanup;
case REWRITE_REGEXEC_UNWILLING:
send_ldap_result( conn, op,
LDAP_UNWILLING_TO_PERFORM,
- NULL, "Unwilling to perform",
+ NULL, "Operation not allowed",
NULL, NULL );
return LDAP_UNWILLING_TO_PERFORM;
case REWRITE_REGEXEC_UNWILLING:
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
- NULL, NULL, NULL, NULL );
+ NULL, "Operation not allowed", NULL, NULL );
return -1;
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OTHER,
- NULL, NULL, NULL, NULL );
+ NULL, "Rewrite error", NULL, NULL );
return -1;
}
case REWRITE_REGEXEC_UNWILLING:
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
- NULL, NULL, NULL, NULL );
+ NULL, "Operation not allowed", NULL, NULL );
return -1;
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OTHER,
- NULL, NULL, NULL, NULL );
+ NULL, "Rewrite error", NULL, NULL );
return -1;
}
ml->sml_bvalues, conn );
}
- for (j = 0; ml->sml_bvalues[ j ].bv_val; j++);
- mods[ i ].mod_bvalues = (struct berval **)ch_malloc((j+1) *
- sizeof(struct berval *));
- for (j = 0; ml->sml_bvalues[ j ].bv_val; j++)
- mods[ i ].mod_bvalues[ j ] = &ml->sml_bvalues[j];
- mods[ i ].mod_bvalues[ j ] = NULL;
+ if ( ml->sml_bvalues != NULL ){
+ for (j = 0; ml->sml_bvalues[ j ].bv_val; j++);
+ mods[ i ].mod_bvalues = (struct berval **)ch_malloc((j+1) *
+ sizeof(struct berval *));
+ for (j = 0; ml->sml_bvalues[ j ].bv_val; j++)
+ mods[ i ].mod_bvalues[ j ] = &ml->sml_bvalues[j];
+ mods[ i ].mod_bvalues[ j ] = NULL;
+
+ } else {
+ mods[ i ].mod_bvalues = NULL;
+ }
+
i++;
}
modv[ i ] = 0;
case REWRITE_REGEXEC_UNWILLING:
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
- NULL, NULL, NULL, NULL );
+ NULL, "Operation not allowed",
+ NULL, NULL );
return -1;
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OTHER,
- NULL, NULL, NULL, NULL );
+ NULL, "Rewrite error", NULL, NULL );
return -1;
}
}
case REWRITE_REGEXEC_UNWILLING:
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
- NULL, NULL, NULL, NULL );
+ NULL, "Operation not allowed", NULL, NULL );
return -1;
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OTHER,
- NULL, NULL, NULL, NULL );
+ NULL, "Rewrite error", NULL, NULL );
return -1;
}
case REWRITE_REGEXEC_UNWILLING:
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
- NULL, NULL, NULL, NULL );
+ NULL, "Operation not allowed",
+ NULL, NULL );
rc = -1;
goto finish;
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OTHER,
- NULL, NULL, NULL, NULL );
+ NULL, "rewrite error", NULL, NULL );
rc = -1;
goto finish;
}
case REWRITE_REGEXEC_UNWILLING:
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
- NULL, NULL, NULL, NULL );
+ NULL, "Operation not allowed",
+ NULL, NULL );
rc = -1;
goto finish;
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OTHER,
- NULL, NULL, NULL, NULL );
+ NULL, "Rewrite error", NULL, NULL );
rc = -1;
goto finish;
}
break;
case REWRITE_REGEXEC_UNWILLING:
- send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
- NULL, NULL, NULL, NULL );
- rc = -1;
- goto finish;
case REWRITE_REGEXEC_ERR:
- send_ldap_result( conn, op, LDAP_OTHER,
- NULL, NULL, NULL, NULL );
- rc = -1;
- goto finish;
+ /* FIXME: no error, but no matched ... */
+ mmatch = NULL;
+ break;
}
}
}
break;
- case REWRITE_REGEXEC_ERR:
case REWRITE_REGEXEC_UNWILLING:
+ return LDAP_UNWILLING_TO_PERFORM;
+
+ case REWRITE_REGEXEC_ERR:
return LDAP_OTHER;
}
#ifdef SLAPD_SQL
#include <stdio.h>
-#include <string.h>
+#include "ac/string.h"
#include <sys/types.h>
#include "slap.h"
#include "back-sql.h"
#include <stdio.h>
#include <sys/types.h>
-#include <string.h>
+#include "ac/string.h"
#include "slap.h"
#include "ldap_pvt.h"
#include "back-sql.h"
if ( ( opattrs || ad_inlist( slap_schema.si_ad_hasSubordinates, attrs ) )
-#ifdef SLAP_X_FILTER_HASSUBORDINATES
- && attr_find( e->e_attrs, slap_schema.si_ad_hasSubordinates ) == NULL
-#endif /* SLAP_X_FILTER_HASSUBORDINATES */
- ) {
+ && attr_find( e->e_attrs, slap_schema.si_ad_hasSubordinates ) == NULL ) {
rc = backsql_get_db_conn( be, conn, &dbh );
if ( rc != LDAP_SUCCESS ) {
#include <stdio.h>
#include <sys/types.h>
-#include <string.h>
+#include "ac/string.h"
#include "slap.h"
#include "lber_pvt.h"
#include "ldap_pvt.h"
&bsi->oc->oc->soc_cname,
'\'' );
-#if defined(SLAP_X_FILTER_HASSUBORDINATES) || defined(SLAP_X_MRA_MATCH_DNATTRS)
} else if ( ad == slap_schema.si_ad_hasSubordinates || ad == NULL ) {
/*
* FIXME: this is not robust; e.g. a filter
backsql_attrlist_add( bsi, NULL );
}
goto done;
-#endif /* SLAP_X_FILTER_HASSUBORDINATES || SLAP_X_MRA_MATCH_DNATTRS */
} else {
at = backsql_ad2at( bsi->oc, ad );
*/
for ( eid = srch_info.id_list; eid != NULL;
eid = backsql_free_entryID( eid, 1 ) ) {
-#ifdef SLAP_X_FILTER_HASSUBORDINATES
Attribute *hasSubordinate = NULL,
*a = NULL;
-#endif /* SLAP_X_FILTER_HASSUBORDINATES */
/* check for abandon */
if ( op->o_abandon ) {
continue;
}
-#ifdef SLAP_X_FILTER_HASSUBORDINATES
/*
* We use this flag since we need to parse the filter
* anyway; we should have used the frontend API function
continue;
}
}
-#endif /* SLAP_X_FILTER_HASSUBORDINATES */
if ( test_filter( be, conn, op, entry, filter )
== LDAP_COMPARE_TRUE ) {
-#ifdef SLAP_X_FILTER_HASSUBORDINATES
if ( hasSubordinate && !( srch_info.bsi_flags & BSQL_SF_ALL_OPER )
&& !ad_inlist( slap_schema.si_ad_hasSubordinates, attrs ) ) {
a->a_next = NULL;
attr_free( hasSubordinate );
hasSubordinate = NULL;
}
-#endif /* SLAP_X_FILTER_HASSUBORDINATES */
#if 0 /* noop is masked SLAP_CTRL_UPDATE */
if ( op->o_noop ) {
vals[0].bv_val = cargv[1];
vals[0].bv_len = strlen( vals[0].bv_val );
- value_add( &default_referral, vals );
+ if( value_add( &default_referral, vals ) )
+ return LDAP_OTHER;
#ifdef NEW_LOGGING
} else if ( strcasecmp( cargv[0], "logfile" ) == 0 ) {
vals[0].bv_val = cargv[1];
vals[0].bv_len = strlen( vals[0].bv_val );
- value_add( &be->be_update_refs, vals );
+ if( value_add( &be->be_update_refs, vals ) )
+ return LDAP_OTHER;
/* replication log file to which changes are appended */
} else if ( strcasecmp( cargv[0], "replogfile" ) == 0 ) {
Debug( LDAP_DEBUG_TRACE, "Merging cr [%ld] %s\n",
(long) vals[0].bv_len, vals[0].bv_val, 0 );
#endif
- attr_merge( e, ad_ditContentRules, vals );
+ if( attr_merge( e, ad_ditContentRules, vals ) )
+ return -1;
ldap_memfree( vals[0].bv_val );
}
#endif
return( LDAP_SUCCESS );
}
-#ifdef SLAP_X_FILTER_HASSUBORDINATES
-static int filter_has_subordinates_list(
- Filter *filter );
-
-/*
- * FIXME: we could detect the need to filter
- * for hasSubordinates when parsing the filter ...
- */
-
-static int
-filter_has_subordinates_list(
- Filter *fl )
-{
- Filter *f;
-
- for ( f = fl; f != NULL; f = f->f_next ) {
- int rc;
-
- rc = filter_has_subordinates( f );
-
- if ( rc ) {
- return rc;
- }
- }
-
- return 0;
-}
-
-int
-filter_has_subordinates(
- Filter *f )
-{
- AttributeDescription *ad = NULL;
-
- switch ( f->f_choice ) {
- case LDAP_FILTER_PRESENT:
- ad = f->f_desc;
- break;
-
- case LDAP_FILTER_EQUALITY:
- case LDAP_FILTER_APPROX:
- case LDAP_FILTER_GE:
- case LDAP_FILTER_LE:
- ad = f->f_ava->aa_desc;
- break;
-
- case LDAP_FILTER_SUBSTRINGS:
- ad = f->f_sub_desc;
- break;
-
- case LDAP_FILTER_EXT:
- /* could be null; however here it is harmless */
- ad = f->f_mra->ma_desc;
- break;
-
- case LDAP_FILTER_NOT:
- return filter_has_subordinates( f->f_not );
-
- case LDAP_FILTER_AND:
- return filter_has_subordinates_list( f->f_and );
-
- case LDAP_FILTER_OR:
- return filter_has_subordinates_list( f->f_or );
-
- case SLAPD_FILTER_COMPUTED:
- /*
- * something wrong?
- */
- return 0;
-
- default:
- /*
- * this means a new type of filter has been implemented,
- * which is not handled yet in this function; we should
- * issue a developer's warning, e.g. an assertion
- */
- assert( 0 );
- return -1;
- }
-
- if ( ad == slap_schema.si_ad_hasSubordinates ) {
- return 1;
- }
-
- return 0;
-}
-
-#endif /* SLAP_X_FILTER_HASSUBORDINATES */
-
#else
Debug( LDAP_DEBUG_ANY,
"main: TLS init def ctx failed: %d\n",
- 0, 0, 0 );
+ rc, 0, 0 );
#endif
rc = 1;
SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 20 );
#ifdef NEW_LOGGING
LDAP_LOG( SLAPD, ERR,
"module_load: module %s: unknown registration type (%d).\n",
- file_name, 0);
+ file_name, rc, 0);
#else
Debug(LDAP_DEBUG_CONFIG, "module %s: unknown registration type (%d)\n",
file_name, rc, 0);
Debug( LDAP_DEBUG_TRACE, "Merging mr [%lu] %s\n",
mr->smr_str.bv_len, mr->smr_str.bv_val, 0 );
#endif
- attr_merge_one( e, ad_matchingRules, &mr->smr_str );
+ if( attr_merge_one( e, ad_matchingRules, &mr->smr_str ) )
+ return -1;
}
return 0;
}
Debug( LDAP_DEBUG_TRACE, "Merging mru [%lu] %s\n",
mru->smru_str.bv_len, mru->smru_str.bv_val, 0 );
#endif
- attr_merge_one( e, ad_matchingRuleUse, &mru->smru_str );
+ if( attr_merge_one( e, ad_matchingRuleUse, &mru->smru_str ) )
+ return -1;
}
return 0;
}
Debug( LDAP_DEBUG_TRACE, "Merging oc [%ld] %s\n",
(long) vals[0].bv_len, vals[0].bv_val, 0 );
#endif
- attr_merge( e, ad_objectClasses, vals );
+ if( attr_merge( e, ad_objectClasses, vals ) )
+ return -1;
ldap_memfree( vals[0].bv_val );
}
return 0;
}
}
- v2 = ch_malloc( len+i+sizeof("Referral:") );
+ v2 = SLAP_MALLOC( len+i+sizeof("Referral:") );
+ if( v2 == NULL ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG( OPERATION, ERR, "v2ref: SLAP_MALLOC failed", 0, 0, 0 );
+#else
+ Debug( LDAP_DEBUG_ANY, "v2ref: SLAP_MALLOC failed", 0, 0, 0 );
+#endif
+ return NULL;
+ }
+
if( text != NULL ) {
strcpy(v2, text);
if( i ) {
len += sizeof("Referral:");
for( i=0; ref[i].bv_val != NULL; i++ ) {
- v2 = ch_realloc( v2, len + ref[i].bv_len + 1 );
+ v2 = SLAP_REALLOC( v2, len + ref[i].bv_len + 1 );
+ if( v2 == NULL ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG( OPERATION, ERR, "v2ref: SLAP_MALLOC failed", 0, 0, 0 );
+#else
+ Debug( LDAP_DEBUG_ANY, "v2ref: SLAP_MALLOC failed", 0, 0, 0 );
+#endif
+ return NULL;
+ }
v2[len-1] = '\n';
AC_MEMCPY(&v2[len], ref[i].bv_val, ref[i].bv_len );
len += ref[i].bv_len;
size = i * sizeof(char *) + k;
if ( size > 0 ) {
char *a_flags;
- e_flags = ch_calloc ( 1, i * sizeof(char *) + k );
+ e_flags = SLAP_CALLOC ( 1, i * sizeof(char *) + k );
+ if( e_flags == NULL ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG( OPERATION, ERR,
+ "send_search_entry: conn %lu SLAP_CALLOC failed\n",
+ conn ? conn->c_connid : 0, 0, 0 );
+#else
+ Debug( LDAP_DEBUG_ANY,
+ "send_search_entry: SLAP_CALLOC failed\n", 0, 0, 0 );
+#endif
+ ber_free( ber, 1 );
+
+ send_ldap_result( conn, op, LDAP_OTHER,
+ NULL, "memory error",
+ NULL, NULL );
+ goto error_return;
+ }
a_flags = (char *)(e_flags + i);
memset( a_flags, 0, k );
for ( a = e->e_attrs, i=0; a != NULL; a = a->a_next, i++ ) {
* Reuse previous memory - we likely need less space
* for operational attributes
*/
- tmp = ch_realloc ( e_flags, i * sizeof(char *) + k );
+ tmp = SLAP_REALLOC ( e_flags, i * sizeof(char *) + k );
if ( tmp == NULL ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, ERR,
if( op->o_protocol < LDAP_VERSION3 ) {
/* save the references for the result */
if( refs[0].bv_val != NULL ) {
- value_add( v2refs, refs );
+ if( value_add( v2refs, refs ) )
+ return LDAP_OTHER;
}
return 0;
}
vals[1].bv_val = NULL;
- e = (Entry *) ch_calloc( 1, sizeof(Entry) );
+ e = (Entry *) SLAP_CALLOC( 1, sizeof(Entry) );
+
+ if( e == NULL ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG( OPERATION, ERR,
+ "root_dse_info: SLAP_CALLOC failed", 0, 0, 0 );
+#else
+ Debug( LDAP_DEBUG_ANY,
+ "root_dse_info: SLAP_CALLOC failed", 0, 0, 0 );
+#endif
+ return LDAP_OTHER;
+ }
e->e_attrs = NULL;
e->e_name.bv_val = ch_strdup( LDAP_ROOT_DSE );
vals[0].bv_val = "top";
vals[0].bv_len = sizeof("top")-1;
- attr_merge( e, ad_objectClass, vals );
+ if( attr_merge( e, ad_objectClass, vals ) )
+ return LDAP_OTHER;
vals[0].bv_val = "OpenLDAProotDSE";
vals[0].bv_len = sizeof("OpenLDAProotDSE")-1;
- attr_merge( e, ad_objectClass, vals );
- attr_merge( e, ad_structuralObjectClass, vals );
+ if( attr_merge( e, ad_objectClass, vals ) )
+ return LDAP_OTHER;
+ if( attr_merge( e, ad_structuralObjectClass, vals ) )
+ return LDAP_OTHER;
for ( i = 0; i < nbackends; i++ ) {
if ( backends[i].be_flags & SLAP_BFLAG_MONITOR ) {
vals[0] = backends[i].be_suffix[0];
- attr_merge( e, ad_monitorContext, vals );
+ if( attr_merge( e, ad_monitorContext, vals ) )
+ return LDAP_OTHER;
continue;
}
if ( backends[i].be_flags & SLAP_BFLAG_GLUE_SUBORDINATE ) {
}
for ( j = 0; backends[i].be_suffix[j].bv_val != NULL; j++ ) {
vals[0] = backends[i].be_suffix[j];
- attr_merge( e, ad_namingContexts, vals );
+ if( attr_merge( e, ad_namingContexts, vals ) )
+ return LDAP_OTHER;
}
}
/* supportedControl */
for ( i=0; (vals[0].bv_val = get_supported_ctrl(i)) != NULL; i++ ) {
vals[0].bv_len = strlen( vals[0].bv_val );
- attr_merge( e, ad_supportedControl, vals );
+ if( attr_merge( e, ad_supportedControl, vals ) )
+ return LDAP_OTHER;
}
/* supportedExtension */
for ( i=0; (bv = get_supported_extop(i)) != NULL; i++ ) {
vals[0] = *bv;
- attr_merge( e, ad_supportedExtension, vals );
+ if( attr_merge( e, ad_supportedExtension, vals ) )
+ return LDAP_OTHER;
}
/* supportedFeatures */
- attr_merge( e, ad_supportedFeatures, supportedFeatures );
+ if( attr_merge( e, ad_supportedFeatures, supportedFeatures ) )
+ return LDAP_OTHER;
/* supportedLDAPVersion */
for ( i=LDAP_VERSION_MIN; i<=LDAP_VERSION_MAX; i++ ) {
snprintf(buf, sizeof buf, "%d", i);
vals[0].bv_val = buf;
vals[0].bv_len = strlen( vals[0].bv_val );
- attr_merge( e, ad_supportedLDAPVersion, vals );
+ if( attr_merge( e, ad_supportedLDAPVersion, vals ) )
+ return LDAP_OTHER;
}
/* supportedSASLMechanism */
for ( i=0; supportedSASLMechanisms[i] != NULL; i++ ) {
vals[0].bv_val = supportedSASLMechanisms[i];
vals[0].bv_len = strlen( vals[0].bv_val );
- attr_merge( e, ad_supportedSASLMechanisms, vals );
+ if( attr_merge( e, ad_supportedSASLMechanisms, vals ) )
+ return LDAP_OTHER;
}
ldap_charray_free( supportedSASLMechanisms );
}
if ( default_referral != NULL ) {
- attr_merge( e, ad_ref, default_referral );
+ if( attr_merge( e, ad_ref, default_referral ) )
+ return LDAP_OTHER;
}
if( usr_attr != NULL) {
Attribute *a;
for( a = usr_attr->e_attrs; a != NULL; a = a->a_next ) {
- attr_merge( e, a->a_desc, a->a_vals );
+ if( attr_merge( e, a->a_desc, a->a_vals ) )
+ return LDAP_OTHER;
}
}
return EXIT_FAILURE;
}
- usr_attr = (Entry *) ch_calloc( 1, sizeof(Entry) );
+ usr_attr = (Entry *) SLAP_CALLOC( 1, sizeof(Entry) );
+ if( usr_attr == NULL ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG( OPERATION, ERR,
+ "read_root_dse_file: SLAP_CALLOC failed", 0, 0, 0 );
+#else
+ Debug( LDAP_DEBUG_ANY,
+ "read_root_dse_file: SLAP_CALLOC failed", 0, 0, 0 );
+#endif
+ return LDAP_OTHER;
+ }
usr_attr->e_attrs = NULL;
while( ldif_read_record( fp, &lineno, &buf, &lmax ) ) {
if( e == NULL ) {
fprintf( stderr, "root_dse: could not parse entry (line=%d)\n",
lineno );
- entry_free( e );
entry_free( usr_attr );
usr_attr = NULL;
return EXIT_FAILURE;
*/
for(a = e->e_attrs; a != NULL; a = a->a_next) {
- attr_merge( usr_attr, a->a_desc, a->a_vals );
+ if( attr_merge( usr_attr, a->a_desc, a->a_vals ) )
+ return LDAP_OTHER;
}
entry_free( e );
Entry *e;
struct berval vals[5];
- e = (Entry *) ch_calloc( 1, sizeof(Entry) );
+ e = (Entry *) SLAP_CALLOC( 1, sizeof(Entry) );
+ if( e == NULL ) {
+ /* Out of memory, do something about it */
+#ifdef NEW_LOGGING
+ LDAP_LOG( OPERATION, ERR,
+ "schema_info: SLAP_CALLOC failed - out of memory.\n", 0, 0,0 );
+#else
+ Debug( LDAP_DEBUG_ANY,
+ "schema_info: SLAP_CALLOC failed - out of memory.\n", 0, 0, 0 );
+#endif
+ *text = "out of memory";
+ return LDAP_OTHER;
+ }
e->e_attrs = NULL;
/* backend-specific schema info should be created by the
vals[0].bv_val = "subentry";
vals[0].bv_len = sizeof("subentry")-1;
- attr_merge_one( e, ad_structuralObjectClass, vals );
+ if( attr_merge_one( e, ad_structuralObjectClass, vals ) ) {
+ /* Out of memory, do something about it */
+ entry_free( e );
+ *text = "out of memory";
+ return LDAP_OTHER;
+ }
vals[0].bv_val = "top";
vals[0].bv_len = sizeof("top")-1;
vals[3].bv_val = "extensibleObject";
vals[3].bv_len = sizeof("extensibleObject")-1;
vals[4].bv_val = NULL;
- attr_merge( e, ad_objectClass, vals );
+ if( attr_merge( e, ad_objectClass, vals ) ) {
+ /* Out of memory, do something about it */
+ entry_free( e );
+ *text = "out of memory";
+ return LDAP_OTHER;
+ }
{
int rc;
return LDAP_OTHER;
}
- attr_merge_one( e, desc, vals );
+ if( attr_merge_one( e, desc, vals ) ) {
+ /* Out of memory, do something about it */
+ entry_free( e );
+ *text = "out of memory";
+ return LDAP_OTHER;
+ }
}
{
vals[0].bv_val = timebuf;
vals[0].bv_len = strlen( timebuf );
- attr_merge_one( e, ad_createTimestamp, vals );
- attr_merge_one( e, ad_modifyTimestamp, vals );
+ if( attr_merge_one( e, ad_createTimestamp, vals ) ) {
+ /* Out of memory, do something about it */
+ entry_free( e );
+ *text = "out of memory";
+ return LDAP_OTHER;
+ }
+ if( attr_merge_one( e, ad_modifyTimestamp, vals ) ) {
+ /* Out of memory, do something about it */
+ entry_free( e );
+ *text = "out of memory";
+ return LDAP_OTHER;
+ }
}
if ( syn_schema_info( e )
if ( ssyn->ssyn_oid ) {
sir = (struct sindexrec *)
- ch_calloc( 1, sizeof(struct sindexrec) );
+ SLAP_CALLOC( 1, sizeof(struct sindexrec) );
+ if( sir == NULL ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG( OPERATION, ERR,
+ "syn_insert: SLAP_CALLOC Error\n", 0, 0, 0 );
+#else
+ Debug( LDAP_DEBUG_ANY, "SLAP_CALLOC Error\n", 0, 0, 0 );
+#endif
+ return LDAP_OTHER;
+ }
sir->sir_name = ssyn->ssyn_oid;
sir->sir_syn = ssyn;
if ( avl_insert( &syn_index, (caddr_t) sir,
Syntax *ssyn;
int code;
- ssyn = (Syntax *) ch_calloc( 1, sizeof(Syntax) );
+ ssyn = (Syntax *) SLAP_CALLOC( 1, sizeof(Syntax) );
+ if( ssyn == NULL ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG( OPERATION, ERR,
+ "syn_add: SLAP_CALLOC Error\n", 0, 0, 0 );
+#else
+ Debug( LDAP_DEBUG_ANY, "SLAP_CALLOC Error\n", 0, 0, 0 );
+#endif
+ return LDAP_OTHER;
+ }
AC_MEMCPY( &ssyn->ssyn_syn, syn, sizeof(LDAPSyntax) );
#endif
#endif
- attr_merge( e, ad_ldapSyntaxes, vals );
+ if( attr_merge( e, ad_ldapSyntaxes, vals ) )
+ return -1;
ldap_memfree( vals[0].bv_val );
}
return 0;
; /* NULL */
if ( *vals == NULL ) {
- *vals = (BerVarray) ch_malloc( (nn + 1)
+ *vals = (BerVarray) SLAP_MALLOC( (nn + 1)
* sizeof(struct berval) );
+ if( *vals == NULL ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG( OPERATION, ERR,
+ "value_add: SLAP_MALLOC failed.\n", 0, 0, 0 );
+#else
+ Debug(LDAP_DEBUG_TRACE,
+ "value_add: SLAP_MALLOC failed.\n", 0, 0, 0 );
+#endif
+ return LBER_ERROR_MEMORY;
+ }
n = 0;
} else {
for ( n = 0; (*vals)[n].bv_val != NULL; n++ ) {
; /* Empty */
}
- *vals = (BerVarray) ch_realloc( (char *) *vals,
+ *vals = (BerVarray) SLAP_REALLOC( (char *) *vals,
(n + nn + 1) * sizeof(struct berval) );
+ if( *vals == NULL ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG( OPERATION, ERR,
+ "value_add: SLAP_MALLOC failed.\n", 0, 0, 0 );
+#else
+ Debug(LDAP_DEBUG_TRACE,
+ "value_add: SLAP_MALLOC failed.\n", 0, 0, 0 );
+#endif
+ return LBER_ERROR_MEMORY;
+ }
}
v2 = *vals + n;
BerVarray v2;
if ( *vals == NULL ) {
- *vals = (BerVarray) ch_malloc( 2 * sizeof(struct berval) );
+ *vals = (BerVarray) SLAP_MALLOC( 2 * sizeof(struct berval) );
+ if( *vals == NULL ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG( OPERATION, ERR,
+ "value_add_one: SLAP_MALLOC failed.\n", 0, 0, 0 );
+#else
+ Debug(LDAP_DEBUG_TRACE,
+ "value_add_one: SLAP_MALLOC failed.\n", 0, 0, 0 );
+#endif
+ return LBER_ERROR_MEMORY;
+ }
n = 0;
} else {
for ( n = 0; (*vals)[n].bv_val != NULL; n++ ) {
; /* Empty */
}
- *vals = (BerVarray) ch_realloc( (char *) *vals,
+ *vals = (BerVarray) SLAP_REALLOC( (char *) *vals,
(n + 2) * sizeof(struct berval) );
+ if( *vals == NULL ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG( OPERATION, ERR,
+ "value_add_one: SLAP_MALLOC failed.\n", 0, 0, 0 );
+#else
+ Debug(LDAP_DEBUG_TRACE,
+ "value_add_one: SLAP_MALLOC failed.\n", 0, 0, 0 );
+#endif
+ return LBER_ERROR_MEMORY;
+ }
}
v2 = *vals + n;
--- /dev/null
+dn:
+vendorName: The OpenLDAP Project <http://www.openldap.org/>
pidfile ./test-db/slapd.pid
argsfile ./test-db/slapd.args
+#
+rootdse ./data/rootdse.ldif
+
#######################################################################
# ldbm database definitions
#######################################################################
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Cleaning up in $REPLDIR..."
-rm -f $REPLDIR/[!C]*
+rm -rf $REPLDIR/[!C]*
echo "Starting master slapd on TCP/IP port $PORT..."
. $CONFFILTER $BACKEND $MONITORDB < $MASTERCONF > $DBCONF
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
'objectclass=*' > /dev/null 2>&1
RC=$?
-done
if test $RC = 0 ; then
break
fi
echo "Waiting 5 seconds for slapd to start..."
sleep 5
+done
echo "Using ldapsearch to check that slave slapd is running..."
for i in 0 1 2 3 4 5; do