fi
for ac_hdr in \
- stddef.h \
- errno.h \
- fcntl.h \
- filio.h \
- getopt.h \
- limits.h \
- malloc.h \
- regex.h \
- sgtty.h \
- sys/file.h \
- sys/errno.h \
- sys/ioctl.h \
- sys/param.h \
- sys/socket.h\
- sys/time.h \
- sys/types.h \
- syslog.h \
- termios.h \
- unistd.h \
+ stddef.h \
+ errno.h \
+ fcntl.h \
+ filio.h \
+ getopt.h \
+ limits.h \
+ malloc.h \
+ regex.h \
+ sgtty.h \
+ sys/file.h \
+ sys/errno.h \
+ sys/ioctl.h \
+ sys/param.h \
+ sys/socket.h \
+ sys/syslog.h \
+ sys/time.h \
+ sys/types.h \
+ syslog.h \
+ termios.h \
+ unistd.h \
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4985: checking for $ac_hdr" >&5
+echo "configure:4986: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4990 "configure"
+#line 4991 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:5023: checking for uid_t in sys/types.h" >&5
+echo "configure:5024: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5028 "configure"
+#line 5029 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
fi
echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
-echo "configure:5057: checking type of array argument to getgroups" >&5
+echo "configure:5058: checking type of array argument to getgroups" >&5
if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_type_getgroups=cross
else
cat > conftest.$ac_ext <<EOF
-#line 5065 "configure"
+#line 5066 "configure"
#include "confdefs.h"
/* Thanks to Mike Rendell for this test. */
}
EOF
-if { (eval echo configure:5090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_type_getgroups=gid_t
else
if test $ac_cv_type_getgroups = cross; then
cat > conftest.$ac_ext <<EOF
-#line 5104 "configure"
+#line 5105 "configure"
#include "confdefs.h"
#include <unistd.h>
EOF
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:5128: checking for mode_t" >&5
+echo "configure:5129: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5133 "configure"
+#line 5134 "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:5161: checking for off_t" >&5
+echo "configure:5162: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5166 "configure"
+#line 5167 "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:5194: checking for pid_t" >&5
+echo "configure:5195: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5199 "configure"
+#line 5200 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:5227: checking return type of signal handlers" >&5
+echo "configure:5228: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5232 "configure"
+#line 5233 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:5249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5250: \"$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:5268: checking for size_t" >&5
+echo "configure:5269: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5273 "configure"
+#line 5274 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:5301: checking for uid_t in sys/types.h" >&5
+echo "configure:5302: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5306 "configure"
+#line 5307 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
fi
echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
-echo "configure:5335: checking for st_blksize in struct stat" >&5
+echo "configure:5336: checking for st_blksize in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5340 "configure"
+#line 5341 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
struct stat s; s.st_blksize;
; return 0; }
EOF
-if { (eval echo configure:5348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_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:5369: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:5370: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5374 "configure"
+#line 5375 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:5383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5384: \"$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:5404: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:5405: checking whether struct tm is in sys/time.h or time.h" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5409 "configure"
+#line 5410 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:5417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
-echo "configure:5440: checking if toupper() requires islower()" >&5
+echo "configure:5441: checking if toupper() requires islower()" >&5
if eval "test \"`echo '$''{'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 5449 "configure"
+#line 5450 "configure"
#include "confdefs.h"
#include <ctype.h>
exit(1);
}
EOF
-if { (eval echo configure:5461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./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:5484: checking for working const" >&5
+echo "configure:5485: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5489 "configure"
+#line 5490 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:5561: checking for 8-bit clean memcmp" >&5
+echo "configure:5562: checking for 8-bit clean memcmp" >&5
if eval "test \"`echo '$''{'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 5569 "configure"
+#line 5570 "configure"
#include "confdefs.h"
main()
}
EOF
-if { (eval echo configure:5579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
echo $ac_n "checking for strftime""... $ac_c" 1>&6
-echo "configure:5597: checking for strftime" >&5
+echo "configure:5598: checking for strftime" >&5
if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5602 "configure"
+#line 5603 "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:5625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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:5647: checking for strftime in -lintl" >&5
+echo "configure:5648: checking for strftime in -lintl" >&5
ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'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 5655 "configure"
+#line 5656 "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:5666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:5693: checking for vprintf" >&5
+echo "configure:5694: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5698 "configure"
+#line 5699 "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:5721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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:5745: checking for _doprnt" >&5
+echo "configure:5746: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5750 "configure"
+#line 5751 "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:5773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func__doprnt=yes"
else
fi
echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
-echo "configure:5798: checking for wait3 that fills in rusage" >&5
+echo "configure:5799: checking for wait3 that fills in rusage" >&5
if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_func_wait3_rusage=no
else
cat > conftest.$ac_ext <<EOF
-#line 5806 "configure"
+#line 5807 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
}
}
EOF
-if { (eval echo configure:5837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_func_wait3_rusage=yes
else
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5891: checking for $ac_func" >&5
+echo "configure:5892: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5896 "configure"
+#line 5897 "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:5919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
for ac_func in getopt strdup tempnam
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5947: checking for $ac_func" >&5
+echo "configure:5948: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5952 "configure"
+#line 5953 "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:5975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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:6005: checking declaration of sys_errlist" >&5
+echo "configure:6006: checking declaration of sys_errlist" >&5
if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6011 "configure"
+#line 6012 "configure"
#include "confdefs.h"
#include <stdio.h>
char *c = (char *) *sys_errlist
; return 0; }
EOF
-if { (eval echo configure:6021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_dcl_sys_errlist=yes
else
EOF
echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
-echo "configure:6042: checking existence of sys_errlist" >&5
+echo "configure:6043: checking existence of sys_errlist" >&5
if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6048 "configure"
+#line 6049 "configure"
#include "confdefs.h"
#include <errno.h>
int main() {
char *c = (char *) *sys_errlist
; return 0; }
EOF
-if { (eval echo configure:6055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ol_cv_have_sys_errlist=yes
else
AC_HEADER_STDC
AC_HEADER_DIRENT
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS( \
- stddef.h \
- errno.h \
- fcntl.h \
- filio.h \
- getopt.h \
- limits.h \
- malloc.h \
- regex.h \
- sgtty.h \
- sys/file.h \
- sys/errno.h \
- sys/ioctl.h \
- sys/param.h \
- sys/socket.h\
- sys/time.h \
- sys/types.h \
- syslog.h \
- termios.h \
- unistd.h \
+AC_CHECK_HEADERS( \
+ stddef.h \
+ errno.h \
+ fcntl.h \
+ filio.h \
+ getopt.h \
+ limits.h \
+ malloc.h \
+ regex.h \
+ sgtty.h \
+ sys/file.h \
+ sys/errno.h \
+ sys/ioctl.h \
+ sys/param.h \
+ sys/socket.h \
+ sys/syslog.h \
+ sys/time.h \
+ sys/types.h \
+ syslog.h \
+ termios.h \
+ unistd.h \
)
dnl ----------------------------------------------------------------
#ifndef _AC_SYSLOG_H_
#define _AC_SYSLOG_H_
-#ifdef HAVE_SYSLOG_H
+#if defined( HAVE_SYSLOG_H )
#include <syslog.h>
+#elif defined ( HAVE_SYS_SYSLOG_H )
+#include <sys/syslog.h>
+#endif
#if defined( LOG_NDELAY ) && defined( LOG_NOWAIT )
# define OPENLOG_OPTIONS ( LOG_PID | LOG_NDELAY | LOG_NOWAIT )
# define OPENLOG_OPTIONS ( LOG_PID )
#endif
-#endif /* syslog.h */
-
#endif /* _AC_SYSLOG_H_ */
/* Define if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
+/* Define if you have the <sys/syslog.h> header file. */
+#undef HAVE_SYS_SYSLOG_H
+
/* Define if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define if you have the <sys/socket.h> header file. */
/* #undef HAVE_SYS_SOCKET_H */
+/* Define if you have the <sys/syslog.h> header file. */
+/* #undef HAVE_SYS_SYSLOG_H */
+
/* Define if you have the <sys/time.h> header file. */
/* #undef HAVE_SYS_TIME_H */
* is provided ``as is'' without express or implied warranty.
*/
+#include "portable.h"
+
#include <stdio.h>
+
+#include <ac/socket.h>
+
#include <quipu/commonarg.h>
#include <quipu/attrvalue.h>
#include <quipu/ds_error.h>
#include <quipu/abandon.h>
#include <quipu/dap2.h>
#include <quipu/dua.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
#include "lber.h"
#include "ldap.h"
#include "common.h"
* is provided ``as is'' without express or implied warranty.
*/
+#include "portable.h"
+
#include <stdio.h>
+
+#include <ac/socket.h>
+
#include <quipu/commonarg.h>
#include <quipu/attrvalue.h>
#include <quipu/ds_error.h>
#include <quipu/add.h>
#include <quipu/dap2.h>
#include <quipu/dua.h>
-#include <sys/types.h>
-#include <sys/socket.h>
#include "lber.h"
#include "ldap.h"
#include "common.h"
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
extern int ldap_compat;
#define ADDTAG (ldap_compat == 20 ? OLD_LDAP_RES_ADD : LDAP_RES_ADD)
#else
* is provided ``as is'' without express or implied warranty.
*/
+#include "portable.h"
+
#include <stdio.h>
-#include <string.h>
+
+#include <ac/errno.h>
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
+
#include <quipu/commonarg.h>
#include <quipu/ds_error.h>
-#include <sys/errno.h>
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <sys/time.h>
#include "lber.h"
#include "ldap.h"
+
#if ISODEPACKAGE == IC
#include <ll/isoaddrs.h>
#else
#include <isoaddrs.h>
#endif
#include "common.h"
-#ifdef SVR4
-#if !defined(_AIX) && !defined(__osf__)
-#include <sys/filio.h>
+
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
#endif
+#ifdef HAVE_SYS_FILIO_H
+#include <sys/filio.h>
#endif
#ifdef __hpux
* is provided ``as is'' without express or implied warranty.
*/
+#include "portable.h"
+
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <netinet/in.h>
+
+#include <ac/socket.h>
+
#include <quipu/commonarg.h>
#include <quipu/attrvalue.h>
#include <quipu/ds_error.h>
#include <quipu/bind.h>
#include <quipu/compare.h>
+
#include "lber.h"
#include "ldap.h"
#include "common.h"
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
extern int ldap_compat;
#define BINDTAG (ldap_compat == 20 ? OLD_LDAP_RES_BIND : LDAP_RES_BIND)
#else
LDAP_PROTOCOL_ERROR, NULL, "Decoding error" );
return( 0 );
}
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( ldap_compat == 30 )
method = ber_skip_tag( ber, &len );
else
struct DSError dse;
char *dn = dsaconn->c_dn;
int err;
-#ifdef KERBEROS
+#ifdef HAVE_KERBEROS
u_long nonce;
#endif
extern DN ldap_str2dn();
}
switch ( dsaconn->c_method ) {
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_AUTH_SIMPLE:
#endif
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
case LDAP_AUTH_SIMPLE_30:
#endif
case LDAP_AUTH_SIMPLE: /* x.500 simple authentication */
ba.dba_version = DBA_VERSION_V1988;
break;
-#ifdef KERBEROS
-#ifdef COMPAT20
+#ifdef HAVE_KERBEROS
+#ifdef LDAP_COMPAT20
case OLD_LDAP_AUTH_KRBV4:
#endif
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
case LDAP_AUTH_KRBV41_30:
#endif
case LDAP_AUTH_KRBV41: /* kerberos authentication to ldap server */
dsaconn->c_credlen ) );
break;
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_AUTH_KRBV42:
#endif
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
case LDAP_AUTH_KRBV42_30:
#endif
case LDAP_AUTH_KRBV42: /* kerberos authentication to x500 dsa */
Debug( LDAP_DEBUG_TRACE, "dap_bind successful\n", 0, 0, 0 );
-#ifdef KERBEROS
+#ifdef HAVE_KERBEROS
/* XXX why doesn't this work??
if ( dsaconn->c_method == LDAP_AUTH_KRBV42 &&
kerberos_check_mutual( &br, nonce ) != 0 ) {
* donated by Eric Rosenquist and BNR
*/
+#include "portable.h"
+
#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
+
+#include <ac/ctype.h>
+#include <ac/socket.h>
+#include <ac/string.h>
+
#include <quipu/commonarg.h>
#include <quipu/attrvalue.h>
#include <quipu/ds_error.h>
#include <quipu/ds_search.h>
#include <quipu/dap2.h>
#include <quipu/dua.h>
+
#include "lber.h"
#include "ldap.h"
#include "common.h"
* is provided ``as is'' without express or implied warranty.
*/
+#ifndef _LDAPD_COMMON_H
+#define _LDAPD_COMMON_H 1
+
/*
* This structure represents an association to a dsa. There is one of
* these for each association open (a new association is made for each
LDAPMod *m_mods; /* for modify operations only */
BerElement *m_ber; /* the unparsed ber for the op */
struct conn *m_conn; /* connection structure */
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
int m_cldap; /* connectionless transport? (CLDAP) */
struct sockaddr m_clientaddr; /* client address (if using CLDAP) */
DN m_searchbase; /* base used in search */
-#endif /* CLDAP */
+#endif /* LDAP_CONNECTIONLESS */
struct msg *m_next;
};
#define DEFAULT_TIMEOUT 3600 /* idle client connections */
#define DEFAULT_REFERRAL_TIMEOUT 900 /* DSA connections */
-#ifdef NEEDPROTOS
#include "proto-ldapd.h"
-#else
-extern struct msg *add_msg();
-extern struct msg *get_msg();
-extern struct msg *get_cldap_msg();
-extern int del_msg();
-
-extern struct conn *conn_getfd();
-extern struct conn *conn_find();
-extern struct conn *conn_dup();
-extern void conn_del();
-extern AttributeValue ldap_str2AttrV();
-extern DN ldap_str2dn();
-extern void ldap_str2alg();
-extern void ldap_print_algid();
-#endif /* don't need protos */
+#endif
* is provided ``as is'' without express or implied warranty.
*/
+#include "portable.h"
+
#include <stdio.h>
+
+#include <ac/socket.h>
+
#include <quipu/commonarg.h>
#include <quipu/attrvalue.h>
#include <quipu/ds_error.h>
#include <quipu/compare.h>
#include <quipu/dap2.h>
#include <quipu/dua.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
#include "lber.h"
#include "ldap.h"
#include "common.h"
-#ifdef COMPAT20
+#ifdef HAVE_COMPAT20
extern int ldap_compat;
#define COMPTAG (ldap_compat == 20 ? OLD_LDAP_RES_COMPARE : LDAP_RES_COMPARE)
#else
* is provided ``as is'' without express or implied warranty.
*/
+#include "portable.h"
+
#include <stdio.h>
+
#include <quipu/commonarg.h>
#include <quipu/attrvalue.h>
#include <quipu/ds_error.h>
#include <quipu/remove.h>
#include <quipu/dap2.h>
#include <quipu/dua.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+
#include "lber.h"
#include "ldap.h"
#include "common.h"
-#ifdef COMPAT20
+#ifdef HAVE_COMPAT20
extern int ldap_compat;
#define DELTAG (ldap_compat == 20 ? OLD_LDAP_RES_DELETE : LDAP_RES_DELETE)
#else
* is provided ``as is'' without express or implied warranty.
*/
+#include "portable.h"
+
#include <stdio.h>
-#include <sys/types.h>
-#ifdef SVR4
+
+#include <ac/signal.h>
+#include <ac/unistd.h>
+
#include <sys/stat.h>
-#endif /* svr4 */
#include <fcntl.h>
#include <sys/file.h>
#include <sys/ioctl.h>
-#include <signal.h>
-#include "portable.h"
-
-#ifdef USE_SYSCONF
-#include <unistd.h>
-#endif /* USE_SYSCONF */
detach()
extern int ldap_debug;
#endif
-#ifdef USE_SYSCONF
+#ifdef HAVE_SYSCONF
nbits = sysconf( _SC_OPEN_MAX );
-#else /* USE_SYSCONF */
+#elif HAVE_GETDTABLESIZE
nbits = getdtablesize();
-#endif /* USE_SYSCONF */
+#else
+ nbits = FD_SETSIZE
+#endif
+
+#ifdef FD_SETSIZE
+ if( nbits > FD_SETSIZE ) {
+ nbits = FD_SETSIZE;
+ }
+#endif /* FD_SETSIZE */
#ifdef LDAP_DEBUG
if ( ldap_debug == 0 ) {
(void) dup2( sd, 2 );
close( sd );
-#ifdef USE_SETSID
+#ifdef HAVE_SETSID
setsid();
-#else /* USE_SETSID */
+#else /* HAVE_SETSID */
if ( (sd = open( "/dev/tty", O_RDWR )) != -1 ) {
(void) ioctl( sd, TIOCNOTTY, NULL );
(void) close( sd );
}
-#endif /* USE_SETSID */
+#endif /* HAVE_SETSID */
#ifdef LDAP_DEBUG
}
#endif
* is provided ``as is'' without express or implied warranty.
*/
+#include "portable.h"
+
#include <stdio.h>
+
+#include <ac/ctype.h>
+#include <ac/socket.h>
+
#include <quipu/ds_error.h>
#include <quipu/attrvalue.h>
#include <quipu/name.h>
#include <quipu/commonarg.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <ctype.h>
+
#include "lber.h"
#include "ldap.h"
* is provided ``as is'' without express or implied warranty.
*/
-#ifdef KERBEROS
+#include "portable.h"
+
+#ifdef HAVE_KERBEROS
#include <stdio.h>
-#include <sys/types.h>
-#include "krb.h"
-#include <sys/socket.h>
-#include <netdb.h>
-#include <netinet/in.h>
+
+#include <ac/krb.h>
+#include <ac/socket.h>
+
#include <quipu/bind.h>
#if ISODEPACKAGE == IC
#include <quipu/DAS-types.h>
#else
#include <pepsy/DAS-types.h>
#endif
+
#include "lber.h"
#include "ldap.h"
#include "common.h"
* University of Minnesota Microcomputer Workstation and Networks Center
*/
+#include "portable.h"
+
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <sys/wait.h>
-#include <signal.h>
-#ifdef _AIX
-#include <sys/select.h>
-#endif
-#include <syslog.h>
+
+#include <ac/signal.h>
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/syslog.h>
+#include <ac/time.h>
+#include <ac/unistd.h>
+#include <ac/wait.h>
+
#include <quipu/commonarg.h>
#include <quipu/ds_error.h>
-#include "portable.h"
+
#include "lber.h"
#include "ldap.h"
#include "common.h"
-#ifdef USE_SYSCONF
-#include <unistd.h>
-#endif /* USE_SYSCONF */
+#ifdef HAVE_TCPD
+#include <tcpd.h>
+
+int allow_severity = LOG_INFO;
+int deny_severity = LOG_NOTICE;
+#endif /* TCP_WRAPPERS */
void log_and_exit();
static set_socket();
static do_queries();
-static SIG_FN wait4child();
-#ifdef CLDAP
+static RETSIGTYPE wait4child();
+#ifdef LDAP_CONNECTIONLESS
static udp_init();
#endif
int ldap_debug;
#endif
int version;
-#ifdef COMPAT
+#ifdef LDAP_COMPAT
int ldap_compat;
#endif
int dosyslog;
int do_tcp = 1;
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
int do_udp = 0;
#endif
int idletime = DEFAULT_TIMEOUT;
int referral_connection_timeout = DEFAULT_REFERRAL_TIMEOUT;
struct timeval conn_start_tv;
-#ifdef KERBEROS
+#ifdef HAVE_KERBEROS
char *krb_ldap_service = "ldapserver";
char *krb_x500_service = "x500dsa";
char *krb_x500_instance;
char *name;
{
fprintf( stderr, "usage: %s [-d debuglvl] [-p port] [-l] [-c dsa] [-r referraltimeout]", name );
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
fprintf( stderr, " [ -U | -t timeout ]" );
#else
fprintf( stderr, " [ -t timeout ]" );
#endif
fprintf( stderr, " [-I]" );
-#ifdef KERBEROS
+#ifdef HAVE_KERBEROS
fprintf( stderr, " [-i dsainstance]" );
#endif
fprintf( stderr, "\n" );
char **argv;
{
int tcps, ns;
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
int udps;
#endif
int myport = LDAP_PORT;
int len;
int dsapargc;
char **dsapargv;
- SIG_FN wait4child();
+ RETSIGTYPE wait4child();
#ifndef NOSETPROCTITLE
char title[80];
extern char **Argv;
dsapargv[2] = 0;
dsapargv[3] = 0;
dsapargc = 1;
-#ifdef KERBEROS
+#ifdef HAVE_KERBEROS
kerberos_keyfile = "";
#endif
idletime = atoi( optarg );
break;
-#ifdef KERBEROS
+#ifdef HAVE_KERBEROS
case 'f': /* kerberos key file */
kerberos_keyfile = strdup( optarg );
break;
RunFromInetd = 1;
break;
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
case 'U': /* UDP only (no TCP) */
do_tcp = 0;
do_udp = 1;
break;
#endif /* NOTYET */
-#endif /* CLDAP */
+#endif /* LDAP_CONNECTIONLESS */
default:
usage( argv[0] );
exit( 1 );
}
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
if ( do_udp && !do_tcp && idletime != DEFAULT_TIMEOUT ) {
usage( argv[ 0 ] );
exit( 1 );
Debug( LDAP_DEBUG_TRACE, "%s", Versionstr, 0, 0 );
-#ifdef USE_SYSCONF
+#ifdef HAVE_SYSCONF
dtblsize = sysconf( _SC_OPEN_MAX );
-#else /* USE_SYSCONF */
+#elif HAVE_GETDTABLESIZE
dtblsize = getdtablesize();
-#endif /* USE_SYSCONF */
+#else
+ dtblsize = FD_SETSIZE;
+#endif
+
+#ifdef FD_SETSIZE
+ if( dtblsize > FD_SETSIZE ) {
+ dtblsize = FD_SETSIZE;
+ }
+#endif /* FD_SETSIZE */
#ifndef NOSETPROCTITLE
/* for setproctitle */
len = sizeof( socktype );
getsockopt( ns, SOL_SOCKET, SO_TYPE, &socktype, &len );
if ( socktype == SOCK_DGRAM ) {
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
Debug( LDAP_DEBUG_ARGS,
"CLDAP request from unknown (%s)\n",
inet_ntoa( from.sin_addr ), 0, 0 );
conn_start_tv.tv_sec = 0;
udp_init( 0, 0 );
do_queries( ns, 1 );
-#else /* CLDAP */
+#else /* LDAP_CONNECTIONLESS */
Debug( LDAP_DEBUG_ARGS,
- "Compile with -DCLDAP for UDP support\n",0,0,0 );
-#endif /* CLDAP */
+ "Compile with -DLDAP_CONNECTIONLESS for UDP support\n",0,0,0 );
+#endif /* LDAP_CONNECTIONLESS */
exit( 0 );
}
if ( do_tcp )
tcps = set_socket( myport, 0 );
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
if ( do_udp )
udps = udp_init( myport, 1 );
#endif
*/
#ifndef NOSETPROCTITLE
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
sprintf( title, "listening %s/%s %d", do_tcp ? "tcp" : "",
do_udp ? "udp" : "", myport );
#else
FD_ZERO( &readfds );
if ( do_tcp )
FD_SET( tcps, &readfds );
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
if ( do_udp )
FD_SET( udps, &readfds );
#endif
continue;
}
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
if ( do_udp && FD_ISSET( udps, &readfds ) ) {
do_queries( udps, 1 );
}
hp = gethostbyaddr( (char *) &(from.sin_addr.s_addr),
sizeof(from.sin_addr.s_addr), AF_INET );
+
+#ifdef HAVE_TCPD
+ if ( !hosts_ctl("ldapd", (hp == NULL) ? "unknown" : hp->h_name,
+ inet_ntoa( from.sin_addr ), STRING_UNKNOWN ) {
+
+ Debug( LDAP_DEBUG_ARGS, "connection from %s (%s) denied.\n",
+ (hp == NULL) ? "unknown" : hp->h_name,
+ inet_ntoa( from.sin_addr ), 0 );
+
+ if ( dosyslog ) {
+ syslog( LOG_NOTICE, "connection from %s (%s) denied.",
+ (hp == NULL) ? "unknown" : hp->h_name,
+ inet_ntoa( from.sin_addr ) );
+ }
+
+ close(ns);
+ continue;
+ }
+#endif /* TCP_WRAPPERS */
+
Debug( LDAP_DEBUG_ARGS, "connection from %s (%s)\n",
(hp == NULL) ? "unknown" : hp->h_name,
inet_ntoa( from.sin_addr ), 0 );
+
if ( dosyslog ) {
syslog( LOG_INFO, "connection from %s (%s)",
(hp == NULL) ? "unknown" : hp->h_name,
int rc, i;
struct timeval timeout;
Sockbuf sb;
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
struct sockaddr saddr, faddr;
struct sockaddr *saddrlist[ 1 ];
-#endif /* CLDAP */
+#endif /* LDAP_CONNECTIONLESS */
Debug( LDAP_DEBUG_TRACE, "do_queries%s\n",
udp ? " udp" : "", 0, 0 );
(void) memset( (void *) &sb, '\0', sizeof( sb ) );
sb.sb_sd = clientsock;
sb.sb_naddr = ( udp ) ? 1 : 0;
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
sb.sb_addrs = (void **)saddrlist;
sb.sb_fromaddr = &faddr;
sb.sb_useaddr = saddrlist[ 0 ] = &saddr;
return( s );
}
-static SIG_FN wait4child()
+static RETSIGTYPE wait4child()
{
- WAITSTATUSTYPE status;
+#ifndef HAVE_WAITPID
+ WAITSTATUSTYPE status;
+#endif
Debug( LDAP_DEBUG_TRACE, "parent: catching child status\n", 0, 0, 0 );
-#ifdef USE_WAITPID
- while( waitpid( (pid_t) -1, 0, WAIT_FLAGS ) > 0 )
+#ifdef HAVE_WAITPID
+ while( waitpid( (pid_t) -1, NULL, WAIT_FLAGS ) > 0 )
; /* NULL */
#else
- while ( wait3( &status, WAIT_FLAGS, 0 ) > 0 )
- ; /* NULL */
+ while ( wait3( &status, WAIT_FLAGS, 0 ) > 0 )
+ ; /* NULL */
#endif
(void) SIGNAL( SIGCHLD, (void *) wait4child );
}
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
static int
udp_init(
int port,
* is provided ``as is'' without express or implied warranty.
*/
+#include "portable.h"
+
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+
#include <quipu/commonarg.h>
#include <quipu/ds_error.h>
+
#include "lber.h"
#include "ldap.h"
#include "common.h"
new->m_conn->c_refcnt++;
new->m_next = NULL;
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
new->m_cldap = udp;
new->m_searchbase = NULLDN;
conn_free( cur->m_conn );
modlist_free( cur->m_mods );
ber_free( cur->m_ber, 1 );
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
if ( cur->m_searchbase != NULLDN ) {
dn_free( cur->m_searchbase );
}
-#endif /* CLDAP */
+#endif /* LDAP_CONNECTIONLESS */
free( (char *) cur );
return( 0 );
}
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
struct msg *
get_cldap_msg(
int msgid,
return( tmp );
}
-#endif /* CLDAP */
+#endif /* LDAP_CONNECTIONLESS */
* is provided ``as is'' without express or implied warranty.
*/
+#include "portable.h"
+
#include <stdio.h>
-#include <ctype.h>
+
+#include <ac/ctype.h>
+#include <ac/socket.h>
+
#include <quipu/commonarg.h>
#include <quipu/attrvalue.h>
#include <quipu/ds_error.h>
#include <quipu/modify.h>
#include <quipu/dap2.h>
#include <quipu/dua.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
#include "lber.h"
#include "ldap.h"
#include "common.h"
extern short ldap_octetstring_syntax;
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
extern int ldap_compat;
#define MODTAG (ldap_compat == 20 ? OLD_LDAP_RES_MODIFY : LDAP_RES_MODIFY)
#else
* is provided ``as is'' without express or implied warranty.
*/
+#include "portable.h"
+
#include <stdio.h>
+
+#include <ac/socket.h>
+
#include <quipu/commonarg.h>
#include <quipu/attrvalue.h>
#include <quipu/ds_error.h>
#include <quipu/modifyrdn.h>
#include <quipu/dap2.h>
#include <quipu/dua.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
#include "lber.h"
#include "ldap.h"
#include "common.h"
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
extern int ldap_compat;
#define MODRDNTAG (ldap_compat == 20 ? OLD_LDAP_RES_MODRDN : LDAP_RES_MODRDN)
#else
-#ifndef _PROTO_LDAPD
-#define _PROTO_LDAPD
+#ifndef _PROTO_LDAPD_H
+#define _PROTO_LDAPD_H
+
+#include <ldap_cdefs.h>
/*
* abandon.c
*/
-int do_abandon( struct conn *dsaconn, BerElement *ber, int msgid );
+int do_abandon LDAP_P(( struct conn *dsaconn, BerElement *ber, int msgid ));
/*
* add.c
*/
-int do_add( Sockbuf *clientsb, struct msg *m, BerElement *ber );
+int do_add LDAP_P(( Sockbuf *clientsb, struct msg *m, BerElement *ber ));
/*
* association.c
*/
-struct conn *conn_dup( struct conn *cn );
-int conn_init();
-void conn_free( struct conn *conn );
-void conn_del( struct conn *conn );
-void conn_badfds();
-struct conn *conn_getfd( fd_set *fds );
-void conn_add( struct conn *new );
-struct conn *conn_find( struct conn *c );
-void conn_add( struct conn *new );
-void conn_close();
-int isclosed( int ad );
+struct conn *conn_dup LDAP_P(( struct conn *cn ));
+int conn_init LDAP_P(());
+void conn_free LDAP_P(( struct conn *conn ));
+void conn_del LDAP_P(( struct conn *conn ));
+void conn_badfds LDAP_P(());
+struct conn *conn_getfd LDAP_P(( fd_set *fds ));
+void conn_add LDAP_P(( struct conn *new ));
+struct conn *conn_find LDAP_P(( struct conn *c ));
+void conn_add LDAP_P(( struct conn *new ));
+void conn_close LDAP_P(());
+int isclosed LDAP_P(( int ad ));
/*
* bind.c
*/
-int do_bind( Sockbuf *clientsb, struct msg *m, BerElement *ber, int *bound );
-int do_bind_real( struct conn *dsaconn, int *bound, char **matched );
+int do_bind LDAP_P(( Sockbuf *clientsb, struct msg *m, BerElement *ber, int *bound ));
+int do_bind_real LDAP_P(( struct conn *dsaconn, int *bound, char **matched ));
/*
* certificate.c
*/
-int ldap_certif_print( PS ps, struct certificate *parm, int format );
-void ldap_print_algid( PS ps, struct alg_id *parm, int format );
-struct certificate *ldap_str2cert( char *str );
-void ldap_str2alg( char *str, struct alg_id *alg );
-void certif_init();
+int ldap_certif_print LDAP_P(( PS ps, struct certificate *parm, int format ));
+void ldap_print_algid LDAP_P(( PS ps, struct alg_id *parm, int format ));
+struct certificate *ldap_str2cert LDAP_P(( char *str ));
+void ldap_str2alg LDAP_P(( char *str, struct alg_id *alg ));
+void certif_init LDAP_P(());
/*
* compare.c
*/
-int do_compare( Sockbuf *clientsb, struct msg *m, BerElement *ber );
+int do_compare LDAP_P(( Sockbuf *clientsb, struct msg *m, BerElement *ber ));
/*
* delete.c
*/
-int do_delete( Sockbuf *clientsb, struct msg *m, BerElement *ber );
+int do_delete LDAP_P(( Sockbuf *clientsb, struct msg *m, BerElement *ber ));
/*
* error.c
*/
-void print_error( struct DSError *e );
-int x500err2ldaperr( struct DSError *e, char **matched );
+void print_error LDAP_P(( struct DSError *e ));
+int x500err2ldaperr LDAP_P(( struct DSError *e, char **matched ));
/*
* kerberos.c
*/
-int kerberosv4_ldap_auth( char *cred, long len );
+int kerberosv4_ldap_auth LDAP_P(( char *cred, long len ));
/*
* main.c
*/
-void log_and_exit( int exitcode );
+void log_and_exit LDAP_P(( int exitcode ));
/*
* message.c
*/
-struct msg *add_msg( int msgid, int msgtype, BerElement *ber,
- struct conn *dsaconn, int udp, struct sockaddr *clientaddr );
-struct msg *get_msg( int uniqid );
-int del_msg( struct msg *m );
-void send_msg( struct conn *conn, Sockbuf *clientsb, int err, char *str );
-struct msg * get_cldap_msg( int msgid, int msgtype, struct sockaddr *fromaddr );
+struct msg *add_msg LDAP_P(( int msgid, int msgtype, BerElement *ber,
+ struct conn *dsaconn, int udp, struct sockaddr *clientaddr ));
+struct msg *get_msg LDAP_P(( int uniqid ));
+int del_msg LDAP_P(( struct msg *m ));
+void send_msg LDAP_P(( struct conn *conn, Sockbuf *clientsb, int err, char *str ));
+struct msg * get_cldap_msg LDAP_P(( int msgid, int msgtype, struct sockaddr *fromaddr ));
/*
* modify.c
*/
-int do_modify( Sockbuf *clientsb, struct msg *m, BerElement *ber );
-Attr_Sequence get_as( Sockbuf *clientsb, unsigned long op, struct msg *m,
- char *type, struct berval **bvals );
-void modlist_free( LDAPMod *mods );
+int do_modify LDAP_P(( Sockbuf *clientsb, struct msg *m, BerElement *ber ));
+Attr_Sequence get_as LDAP_P(( Sockbuf *clientsb, unsigned long op, struct msg *m,
+ char *type, struct berval **bvals ));
+void modlist_free LDAP_P(( LDAPMod *mods ));
/*
* modrdn.c
*/
-int do_modrdn( Sockbuf *clientsb, struct msg *m, BerElement *ber );
+int do_modrdn LDAP_P(( Sockbuf *clientsb, struct msg *m, BerElement *ber ));
/*
* request.c
*/
-void client_request( Sockbuf *clientsb, struct conn *dsaconn, int udp );
-int do_request( Sockbuf *clientsb, struct msg *m, BerElement *ber,
- int *bound );
-int initiate_dap_operation( int op, struct msg *m, void *arg );
+void client_request LDAP_P(( Sockbuf *clientsb, struct conn *dsaconn, int udp ));
+int do_request LDAP_P(( Sockbuf *clientsb, struct msg *m, BerElement *ber,
+ int *bound ));
+int initiate_dap_operation LDAP_P(( int op, struct msg *m, void *arg ));
/*
* result.c
*/
-void dsa_response( struct conn *dsaconn, Sockbuf *clientsb );
-int send_ldap_msgresult( Sockbuf *sb, unsigned long tag, struct msg *m,
- int err, char *matched, char *text );
-int send_ldap_result( Sockbuf *sb, unsigned long tag, int msgid, int err,
- char *matched, char *text );
+void dsa_response LDAP_P(( struct conn *dsaconn, Sockbuf *clientsb ));
+int send_ldap_msgresult LDAP_P(( Sockbuf *sb, unsigned long tag, struct msg *m,
+ int err, char *matched, char *text ));
+int send_ldap_result LDAP_P(( Sockbuf *sb, unsigned long tag, int msgid, int err,
+ char *matched, char *text ));
/*
* search.c
*/
-int do_search( Sockbuf *clientsb, struct msg *m, BerElement *ber );
+int do_search LDAP_P(( Sockbuf *clientsb, struct msg *m, BerElement *ber ));
/*
* syntax.c
*/
-void get_syntaxes();
-int dn_print_real( PS ps, DN dn, int format);
-void ldap_dn_print( PS ps, DN dn, DN base, int format);
-int encode_dn( BerElement *ber, DN dn, DN base);
-int encode_attrs( BerElement *ber, Attr_Sequence as );
-AttributeValue bv_octet2AttrV( struct berval *bv );
-AttributeValue bv_asn2AttrV( struct berval *bv );
-AttributeValue ldap_strdn2AttrV( char *dnstr );
-DN ldap_str2dn( char *str );
-RDN ldap_str2rdn( char *rdnstr );
-AttributeValue ldap_str_at2AttrV( char *str, AttributeType type );
-AttributeValue ldap_str2AttrV( char *value, short syntax );
+void get_syntaxes LDAP_P(());
+int dn_print_real LDAP_P(( PS ps, DN dn, int format));
+void ldap_dn_print LDAP_P(( PS ps, DN dn, DN base, int format));
+int encode_dn LDAP_P(( BerElement *ber, DN dn, DN base));
+int encode_attrs LDAP_P(( BerElement *ber, Attr_Sequence as ));
+AttributeValue bv_octet2AttrV LDAP_P(( struct berval *bv ));
+AttributeValue bv_asn2AttrV LDAP_P(( struct berval *bv ));
+AttributeValue ldap_strdn2AttrV LDAP_P(( char *dnstr ));
+DN ldap_str2dn LDAP_P(( char *str ));
+RDN ldap_str2rdn LDAP_P(( char *rdnstr ));
+AttributeValue ldap_str_at2AttrV LDAP_P(( char *str, AttributeType type ));
+AttributeValue ldap_str2AttrV LDAP_P(( char *value, short syntax ));
/*
* util.c
*/
-void bprint( char *data, int len );
-void charlist_free( char **cl );
-int get_ava( BerElement *ber, AVA *tava );
-int chase_referral( Sockbuf *clientsb, struct msg *m, struct DSError *err,
- char **matched );
+void bprint LDAP_P(( char *data, int len ));
+void charlist_free LDAP_P(( char **cl ));
+int get_ava LDAP_P(( BerElement *ber, AVA *tava ));
+int chase_referral LDAP_P(( Sockbuf *clientsb, struct msg *m, struct DSError *err,
+ char **matched ));
#endif /* _proto_ldapd */
* is provided ``as is'' without express or implied warranty.
*/
+#include "portable.h"
+
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <sys/wait.h>
-#include <signal.h>
+
+#include <ac/signal.h>
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/syslog.h>
+#include <ac/time.h>
+#include <ac/wait.h>
+
#include <quipu/commonarg.h>
#include <quipu/ds_error.h>
#include <quipu/dap2.h>
#include <quipu/dua.h>
-#ifdef __hpux
-#include <syslog.h>
-#else
-#include <sys/syslog.h>
-#endif
+
#include "lber.h"
#include "ldap.h"
#include "common.h"
static int bound;
extern char *bound_dn, *bound_pw;
struct PSAPaddr *psap_cpy();
-#ifdef COMPAT
+#ifdef LDAP_COMPAT
extern int ldap_compat;
#endif
log_and_exit( 1 );
}
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
if ( udp && dosyslog ) {
syslog( LOG_INFO, "UDP request from unknown (%s)",
inet_ntoa( ((struct sockaddr_in *)
trace_ber( tag, len, ber.ber_buf, stderr, 1, 1 );
#endif
-#ifdef COMPAT
+#ifdef LDAP_COMPAT
/*
* This tag should be a normal SEQUENCE tag. In release 2.0 this
* tag is 0x10. In the new stuff this is 0x30. To distinguish
return;
}
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
if ( udp ) {
char *logdn = NULL;
free( logdn );
}
}
-#endif /* CLDAP */
+#endif /* LDAP_CONNECTIONLESS */
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( ldap_compat == 30 )
tag = ber_skip_tag( &ber, &len );
else
#endif
tag = ber_peek_tag( &ber, &len );
if ( !udp && bound == 0 && tag != LDAP_REQ_BIND
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
&& tag != OLD_LDAP_REQ_BIND
#endif
) {
return;
}
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
if (udp && tag != LDAP_REQ_SEARCH && tag != LDAP_REQ_ABANDON ) {
send_ldap_result( clientsb, tag, msgid, LDAP_OPERATIONS_ERROR,
NULL, "Only search is supported over UDP/CLDAP" );
copyofber = ber_dup( &ber );
m = add_msg( msgid, tag, copyofber, dsaconn, udp,
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
(struct sockaddr *)clientsb->sb_fromaddr );
#else
NULL );
Debug( LDAP_DEBUG_TRACE, "do_request\n", 0, 0, 0 );
switch ( m->m_msgtype ) {
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_REQ_BIND:
#endif
case LDAP_REQ_BIND:
resp_required = do_bind( clientsb, m, ber, bound );
break;
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_REQ_UNBIND:
#endif
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
case LDAP_REQ_UNBIND_30:
#endif
case LDAP_REQ_UNBIND:
log_and_exit( 0 );
break;
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_REQ_ADD:
#endif
case LDAP_REQ_ADD:
resp_required = do_add( clientsb, m, ber );
break;
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_REQ_DELETE:
#endif
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
case LDAP_REQ_DELETE_30:
#endif
case LDAP_REQ_DELETE:
resp_required = do_delete( clientsb, m, ber );
break;
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_REQ_MODRDN:
#endif
case LDAP_REQ_MODRDN:
resp_required = do_modrdn( clientsb, m, ber );
break;
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_REQ_MODIFY:
#endif
case LDAP_REQ_MODIFY:
resp_required = do_modify( clientsb, m, ber );
break;
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_REQ_COMPARE:
#endif
case LDAP_REQ_COMPARE:
resp_required = do_compare( clientsb, m, ber );
break;
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_REQ_SEARCH:
#endif
case LDAP_REQ_SEARCH:
resp_required = do_search( clientsb, m, ber );
break;
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_REQ_ABANDON:
#endif
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
case LDAP_REQ_ABANDON_30:
#endif
case LDAP_REQ_ABANDON:
* is provided ``as is'' without express or implied warranty.
*/
+#include "portable.h"
+
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/syslog.h>
+
#include <quipu/dsap.h>
#include <quipu/dap2.h>
#include <quipu/dua.h>
-#ifdef __hpux
-#include <syslog.h>
-#else
-#include <sys/syslog.h>
-#endif
+
#include "lber.h"
#include "ldap.h"
#include "common.h"
extern int dosyslog;
-#ifdef COMPAT
+#ifdef LDAP_COMPAT
extern int ldap_compat;
#endif
return;
}
if ( m->m_msgtype == LDAP_REQ_SEARCH
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
|| m->m_msgtype == OLD_LDAP_REQ_SEARCH
#endif
)
int bound, rc;
switch ( m->m_msgtype ) {
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_REQ_ADD:
case OLD_LDAP_REQ_MODIFY:
case OLD_LDAP_REQ_MODRDN:
case OLD_LDAP_REQ_COMPARE:
case OLD_LDAP_REQ_SEARCH:
#endif
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
case LDAP_REQ_DELETE_30:
#endif
case LDAP_REQ_ADD:
char *text
)
{
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
if ( m->m_cldap ) {
SAFEMEMCPY( (char *)sb->sb_useaddr, &m->m_clientaddr,
sizeof( struct sockaddr ));
{
BerElement *ber;
int rc;
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
int cldap;
#endif
extern int version;
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
cldap = ( sb->sb_naddr > 0 );
#endif
Debug( LDAP_DEBUG_TRACE, "send_ldap_result\n", 0, 0, 0 );
if ( tag == LBER_DEFAULT )
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
tag = ldap_compat == 20 ? OLD_LBER_SEQUENCE : LBER_SEQUENCE;
#else
tag = LBER_SEQUENCE;
}
if ( version != 1 ) {
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
if ( ldap_compat == 20 ) {
rc = ber_printf( ber, "t{it{tess}}", OLD_LBER_SEQUENCE,
msgid, tag, LBER_INTEGER, err,
matched ? matched : "", text );
} else
#endif
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( ldap_compat == 30 ) {
rc = ber_printf( ber, "{it{{ess}}}", msgid, tag, err,
matched ? matched : "", text );
} else
#endif
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
if ( cldap ) {
rc = ber_printf( ber, "{is{t{ess}}}", msgid, "", tag,
err, matched ? matched : "", text );
* is provided ``as is'' without express or implied warranty.
*/
+#include "portable.h"
+
#include <stdio.h>
-#include <string.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+
#include <quipu/commonarg.h>
#include <quipu/attrvalue.h>
#include <quipu/ds_error.h>
#include <quipu/ds_search.h>
#include <quipu/dap2.h>
#include <quipu/dua.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
#include "lber.h"
#include "ldap.h"
#include "common.h"
static get_filter_list();
static get_substring_filter();
-#ifdef COMPAT
+#ifdef LDAP_COMPAT
extern int version;
extern int ldap_compat;
#define SEARCHRESTAG (ldap_compat == 20 ? OLD_LDAP_RES_SEARCH_RESULT : LDAP_RES_SEARCH_RESULT)
rc = initiate_dap_operation( OP_SEARCH, m, &sa );
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
if ( m->m_cldap )
m->m_searchbase = sa.sra_baseobject;
else
-#endif /* CLDAP */
+#endif /* LDAP_CONNECTIONLESS */
dn_free( sa.sra_baseobject );
filter_free( sa.sra_filter );
err = 0;
switch (tag = ber_peek_tag( ber, &len )) {
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_FILTER_EQUALITY:
#endif
case LDAP_FILTER_EQUALITY:
Debug( LDAP_DEBUG_ARGS, "EQUALITY\n", 0, 0, 0 );
f->flt_type = FILTER_ITEM;
f->FUITEM.fi_type = FILTERITEM_EQUALITY;
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( ldap_compat == 30 )
(void) ber_skip_tag( ber, &len );
#endif
}
break;
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_FILTER_SUBSTRINGS:
#endif
case LDAP_FILTER_SUBSTRINGS:
err = get_substring_filter( ber, f );
break;
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_FILTER_GE:
#endif
case LDAP_FILTER_GE:
Debug( LDAP_DEBUG_ARGS, "GE\n", 0, 0, 0 );
f->flt_type = FILTER_ITEM;
f->FUITEM.fi_type = FILTERITEM_GREATEROREQUAL;
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( ldap_compat == 30 )
(void) ber_skip_tag( ber, &len );
#endif
}
break;
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_FILTER_LE:
#endif
case LDAP_FILTER_LE:
Debug( LDAP_DEBUG_ARGS, "LE\n", 0, 0, 0 );
f->flt_type = FILTER_ITEM;
f->FUITEM.fi_type = FILTERITEM_LESSOREQUAL;
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( ldap_compat == 30 )
(void) ber_skip_tag( ber, &len );
#endif
}
break;
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_FILTER_PRESENT:
#endif
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
case LDAP_FILTER_PRESENT_30:
#endif
case LDAP_FILTER_PRESENT:
f->flt_type = FILTER_ITEM;
f->FUITEM.fi_type = FILTERITEM_PRESENT;
len = sizeof(typestr);
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( ldap_compat == 30 )
(void) ber_skip_tag( ber, &len );
#endif
return( LDAP_UNDEFINED_TYPE );
break;
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_FILTER_APPROX:
#endif
case LDAP_FILTER_APPROX:
Debug( LDAP_DEBUG_ARGS, "APPROX\n", 0, 0, 0 );
f->flt_type = FILTER_ITEM;
f->FUITEM.fi_type = FILTERITEM_APPROX;
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( ldap_compat == 30 )
(void) ber_skip_tag( ber, &len );
#endif
}
break;
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_FILTER_AND:
#endif
case LDAP_FILTER_AND:
err = get_filter_list( ber, f );
break;
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_FILTER_OR:
#endif
case LDAP_FILTER_OR:
err = get_filter_list( ber, f );
break;
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_FILTER_NOT:
#endif
case LDAP_FILTER_NOT:
Debug( LDAP_DEBUG_TRACE, "get_filter_list\n", 0, 0, 0 );
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( ldap_compat == 30 )
(void) ber_skip_tag( ber, &len );
#endif
Debug( LDAP_DEBUG_TRACE, "get_substring_filter\n", 0, 0, 0 );
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( ldap_compat == 30 )
(void) ber_skip_tag( ber, &len );
#endif
tag = ber_next_element( ber, &len, last ) ) {
AV_Sequence avs, any_end;
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( ldap_compat == 30 ) {
if ( ber_scanf( ber, "{a}", &valstr ) == LBER_ERROR ) {
return( LDAP_PROTOCOL_ERROR );
return( LDAP_OPERATIONS_ERROR );
switch ( tag ) {
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_SUBSTRING_INITIAL:
#endif
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
case LDAP_SUBSTRING_INITIAL_30:
#endif
case LDAP_SUBSTRING_INITIAL:
f->FUITEM.UNSUB.fi_sub_initial = avs;
break;
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_SUBSTRING_ANY:
#endif
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
case LDAP_SUBSTRING_ANY_30:
#endif
case LDAP_SUBSTRING_ANY:
any_end = avs;
break;
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
case OLD_LDAP_SUBSTRING_FINAL:
#endif
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
case LDAP_SUBSTRING_FINAL_30:
#endif
case LDAP_SUBSTRING_FINAL:
correlate_search_results( sr );
}
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
if ( m->m_cldap ) {
if ((ber = der_alloc()) == NULLBER ) {
send_ldap_msgresult( sb, SEARCHRESTAG, m,
for ( e = sr->CSR_entries; e != NULLENTRYINFO; e = e->ent_next ) {
Debug( LDAP_DEBUG_ARGS, "\tentry:\n", 0, 0, 0 );
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
if ( !m->m_cldap )
-#endif /* CLDAP */
+#endif /* LDAP_CONNECTIONLESS */
if ( (ber = der_alloc()) == NULLBER ) {
send_ldap_msgresult( sb, SEARCHRESTAG, m,
return;
}
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
if ( version == 1 ) {
if ( ber_printf( ber, "t{it{", OLD_LBER_SEQUENCE,
m->m_msgid, OLD_LDAP_RES_SEARCH_ENTRY ) == -1 ) {
}
} else
#endif
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( ldap_compat == 30 ) {
if ( ber_printf( ber, "{it{{", m->m_msgid,
LDAP_RES_SEARCH_ENTRY ) == -1 ) {
}
} else
#endif
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
if ( m->m_cldap )
rc = ber_printf( ber, "t{", LDAP_RES_SEARCH_ENTRY );
else
-#endif /* CLDAP */
+#endif /* LDAP_CONNECTIONLESS */
rc = ber_printf( ber, "{it{", m->m_msgid,
LDAP_RES_SEARCH_ENTRY );
return;
}
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
if ( m->m_cldap )
rc = encode_dn( ber, e->ent_dn, m->m_searchbase );
-#endif /* CLDAP */
+#endif /* LDAP_CONNECTIONLESS */
else
rc = encode_dn( ber, e->ent_dn, NULLDN );
return;
}
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
if ( version == 1 ) {
if ( ber_printf( ber, "}}" ) == -1 ) {
send_ldap_msgresult( sb, SEARCHRESTAG, m,
}
} else
#endif
-#ifdef COMPAT30
+#ifdef LDAP_COMPAT30
if ( ldap_compat == 30 ) {
if ( ber_printf( ber, "}}}" ) == -1 ) {
send_ldap_msgresult( sb, SEARCHRESTAG, m,
}
} else
#endif
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
if ( m->m_cldap )
rc = ber_printf( ber, "}" );
else
-#endif /* CLDAP */
+#endif /* LDAP_CONNECTIONLESS */
rc = ber_printf( ber, "}}" );
if ( rc == -1 ) {
ber->ber_buf, stderr, 0, 0 );
#endif
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
if ( !m->m_cldap )
#endif
(void) ber_flush( sb, ber, 1 );
Debug( LDAP_DEBUG_ARGS, "\tresult:\n", 0, 0, 0 );
-#ifdef CLDAP
+#ifdef LDAP_CONNECTIONLESS
if ( m->m_cldap ) {
if ( ber_printf( ber, "t{ess}}}", SEARCHRESTAG, rc, "", "" )
== -1 ) {
+#include "portable.h"
+
#ifndef NOSETPROCTITLE
/*
* Copyright (c) 1990,1991 Regents of the University of Michigan.
* is provided ``as is'' without express or implied warranty.
*/
+#include "portable.h"
+
#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
+
+#include <ac/ctype.h>
+#include <ac/socket.h>
+#include <ac/string.h>
+
#include <quipu/commonarg.h>
#include <quipu/attrvalue.h>
#include <quipu/ds_error.h>
#include <quipu/ds_search.h>
#include <quipu/dap2.h>
#include <quipu/dua.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
#include "lber.h"
#include "ldap.h"
#include "common.h"
encode_attrs( BerElement *ber, Attr_Sequence as )
{
PS ps;
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
extern int ldap_compat;
#endif
if ( str_setup( ps, NULLCP, 0, 0 ) == NOTOK )
return( -1 );
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
if ( ber_printf( ber, "t{", ldap_compat == 20 ? OLD_LBER_SEQUENCE :
LBER_SEQUENCE ) == -1 ) {
#else
AttrT_print( ps, as->attr_type, EDBOUT );
*ps->ps_ptr = '\0';
-#ifdef COMPAT20
+#ifdef LDAP_COMPAT20
if ( ber_printf( ber, "t{st[", ldap_compat == 20 ?
OLD_LBER_SEQUENCE : LBER_SEQUENCE, ps->ps_base,
ldap_compat == 20 ? OLD_LBER_SET : LBER_SET ) == -1 ) {
* is provided ``as is'' without express or implied warranty.
*/
+#include "portable.h"
+
#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/errno.h>
+
+#include <ac/ctype.h>
+#include <ac/errno.h>
+#include <ac/socket.h>
+#include <ac/string.h>
+
#include <sys/ioctl.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
#include <quipu/commonarg.h>
#include <quipu/ds_error.h>
+
#include "lber.h"
#include "ldap.h"
#include "common.h"