mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-18 18:18:06 -05:00
Merge in all devel changes since 2.0-alpha2.
Move OPENLDAP_REL_ENG_2_MP forward.
This commit is contained in:
parent
b9f541f521
commit
183a03cc2b
505 changed files with 24148 additions and 4862 deletions
30
Makefile.in
Normal file
30
Makefile.in
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# $OpenLDAP$
|
||||
# Master Makefile for OpenLDAP
|
||||
##
|
||||
## Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
## All rights reserved.
|
||||
##
|
||||
## Redistribution and use in source and binary forms are permitted only
|
||||
## as authorized by the OpenLDAP Public License. A copy of this
|
||||
## license is available at http://www.OpenLDAP.org/license.html or
|
||||
## in file LICENSE in the top-level directory of the distribution.
|
||||
##
|
||||
|
||||
SUBDIRS= include libraries clients servers tests doc
|
||||
CLEANDIRS= contrib
|
||||
INSTALLDIRS=
|
||||
|
||||
makefiles: FORCE
|
||||
./config.status
|
||||
|
||||
# force a make all before make install
|
||||
# only done at the top-level
|
||||
install-common: all FORCE
|
||||
|
||||
clean-local: FORCE
|
||||
$(RM) config.log
|
||||
|
||||
veryclean-local: FORCE
|
||||
$(RM) config.cache config.status libtool stamp-h stamp-h.in
|
||||
|
||||
distclean: veryclean FORCE
|
||||
89
acconfig.h
Normal file
89
acconfig.h
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
|
||||
#ifndef _LDAP_PORTABLE_H
|
||||
#define _LDAP_PORTABLE_H
|
||||
|
||||
/* end of preamble */
|
||||
@TOP@
|
||||
|
||||
/* define this if needed to get reentrant functions */
|
||||
#ifndef REENTRANT
|
||||
#undef REENTRANT
|
||||
#endif
|
||||
#ifndef _REENTRANT
|
||||
#undef _REENTRANT
|
||||
#endif
|
||||
|
||||
/* define this if needed to get threadsafe functions */
|
||||
#ifndef THREADSAFE
|
||||
#undef THREADSAFE
|
||||
#endif
|
||||
#ifndef _THREADSAFE
|
||||
#undef _THREADSAFE
|
||||
#endif
|
||||
#ifndef THREAD_SAFE
|
||||
#undef THREAD_SAFE
|
||||
#endif
|
||||
#ifndef _THREAD_SAFE
|
||||
#undef _THREAD_SAFE
|
||||
#endif
|
||||
|
||||
#ifndef _SGI_MP_SOURCE
|
||||
#undef _SGI_MP_SOURCE
|
||||
#endif
|
||||
|
||||
/* define this if TIOCGWINSZ is defined in sys/ioctl.h */
|
||||
#undef GWINSZ_IN_SYS_IOCTL
|
||||
|
||||
/* These are defined in ldap_features.h */
|
||||
/*
|
||||
LDAP_API_FEATURE_X_OPENLDAP_REENTRANT
|
||||
LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE
|
||||
LDAP_API_FEATURE_X_OPENLDAP_V2_DNS
|
||||
LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS
|
||||
*/
|
||||
|
||||
/* These are defined in lber_types.h */
|
||||
/*
|
||||
LBER_INT_T
|
||||
LBER_LEN_T
|
||||
LBER_SOCKET_T
|
||||
LBER_TAG_T
|
||||
*/
|
||||
|
||||
|
||||
/* Leave that blank line there!! Autoheader needs it. */
|
||||
|
||||
@BOTTOM@
|
||||
/* begin of postamble */
|
||||
|
||||
#ifndef __NEED_PROTOTYPES
|
||||
/* force LDAP_P to always include prototypes */
|
||||
#define __NEED_PROTOTYPES 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDDEF_H
|
||||
# include <stddef.h>
|
||||
#endif
|
||||
|
||||
#if defined(LDAP_DEVEL) && !defined(LDAP_TEST)
|
||||
#define LDAP_TEST
|
||||
#endif
|
||||
#if defined(LDAP_TEST) && !defined(LDAP_DEBUG)
|
||||
#define LDAP_DEBUG
|
||||
#endif
|
||||
|
||||
#include "ldap_cdefs.h"
|
||||
#include "ldap_features.h"
|
||||
|
||||
#include "ac/assert.h"
|
||||
|
||||
#endif /* _LDAP_PORTABLE_H */
|
||||
8
acinclude.m4
Normal file
8
acinclude.m4
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
dnl $OpenLDAP$
|
||||
dnl
|
||||
dnl Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
|
||||
dnl COPYING RESTRICTIONS APPLY, See COPYRIGHT file
|
||||
dnl
|
||||
dnl OpenLDAP Autoconf Macros
|
||||
dnl
|
||||
builtin(include, build/openldap.m4)dnl
|
||||
695
aclocal.m4
vendored
Normal file
695
aclocal.m4
vendored
Normal file
|
|
@ -0,0 +1,695 @@
|
|||
dnl aclocal.m4 generated automatically by aclocal 1.4a
|
||||
|
||||
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
dnl PARTICULAR PURPOSE.
|
||||
|
||||
dnl $OpenLDAP$
|
||||
dnl
|
||||
dnl Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
|
||||
dnl COPYING RESTRICTIONS APPLY, See COPYRIGHT file
|
||||
dnl
|
||||
dnl OpenLDAP Autoconf Macros
|
||||
dnl
|
||||
builtin(include, build/openldap.m4)dnl
|
||||
|
||||
# Do all the work for Automake. This macro actually does too much --
|
||||
# some checks are only needed if your package does certain things.
|
||||
# But this isn't really a big deal.
|
||||
|
||||
# serial 1
|
||||
|
||||
dnl Usage:
|
||||
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
||||
|
||||
AC_DEFUN(AM_INIT_AUTOMAKE,
|
||||
[AC_REQUIRE([AC_PROG_INSTALL])
|
||||
dnl We require 2.13 because we rely on SHELL being computed by configure.
|
||||
AC_PREREQ([2.13])
|
||||
PACKAGE=[$1]
|
||||
AC_SUBST(PACKAGE)
|
||||
VERSION=[$2]
|
||||
AC_SUBST(VERSION)
|
||||
dnl test to see if srcdir already configured
|
||||
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
|
||||
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||
fi
|
||||
ifelse([$3],,
|
||||
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
|
||||
AC_REQUIRE([AM_SANITY_CHECK])
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])
|
||||
dnl FIXME This is truly gross.
|
||||
missing_dir=`cd $ac_aux_dir && pwd`
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
|
||||
dnl Set install_sh for make dist
|
||||
install_sh="$missing_dir/install-sh"
|
||||
test -f "$install_sh" || install_sh="$missing_dir/install.sh"
|
||||
AC_SUBST(install_sh)
|
||||
dnl We check for tar when the user configures the end package.
|
||||
dnl This is sad, since we only need this for "dist". However,
|
||||
dnl there's no other good way to do it. We prefer GNU tar if
|
||||
dnl we can find it. If we can't find a tar, it doesn't really matter.
|
||||
AC_CHECK_PROGS(AMTAR, gnutar gtar tar)
|
||||
dnl We need awk for the "check" target. The system "awk" is bad on
|
||||
dnl some platforms.
|
||||
AC_REQUIRE([AC_PROG_AWK])
|
||||
AMTARFLAGS=
|
||||
if test -n "$AMTAR"; then
|
||||
if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
|
||||
dnl We have GNU tar.
|
||||
AMTARFLAGS=o
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(AMTARFLAGS)
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])])
|
||||
|
||||
#
|
||||
# Check to make sure that the build environment is sane.
|
||||
#
|
||||
|
||||
AC_DEFUN(AM_SANITY_CHECK,
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftestfile
|
||||
# Do `set' in a subshell so we don't clobber the current shell's
|
||||
# arguments. Must try -L first in case configure is actually a
|
||||
# symlink; some systems play weird games with the mod time of symlinks
|
||||
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||
# directory).
|
||||
if (
|
||||
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
|
||||
if test "[$]*" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftestfile`
|
||||
fi
|
||||
if test "[$]*" != "X $srcdir/configure conftestfile" \
|
||||
&& test "[$]*" != "X conftestfile $srcdir/configure"; then
|
||||
|
||||
# If neither matched, then we have a broken ls. This can happen
|
||||
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||
# broken ls alias from the environment. This has actually
|
||||
# happened. Such a system could not be considered "sane".
|
||||
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
||||
alias in your environment])
|
||||
fi
|
||||
|
||||
test "[$]2" = conftestfile
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
rm -f conftest*
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
||||
dnl The program must properly implement --version.
|
||||
AC_DEFUN(AM_MISSING_PROG,
|
||||
[AC_MSG_CHECKING(for working $2)
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
# Redirect stdin to placate older versions of autoconf. Sigh.
|
||||
if ($2 --version) < /dev/null > /dev/null 2>&1; then
|
||||
$1=$2
|
||||
AC_MSG_RESULT(found)
|
||||
else
|
||||
$1="$3/missing $2"
|
||||
AC_MSG_RESULT(missing)
|
||||
fi
|
||||
AC_SUBST($1)])
|
||||
|
||||
|
||||
# serial 40 AC_PROG_LIBTOOL
|
||||
AC_DEFUN(AC_PROG_LIBTOOL,
|
||||
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
|
||||
|
||||
# Save cache, so that ltconfig can load it
|
||||
AC_CACHE_SAVE
|
||||
|
||||
# Actually configure libtool. ac_aux_dir is where install-sh is found.
|
||||
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
|
||||
LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
|
||||
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
|
||||
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
|
||||
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|
||||
|| AC_MSG_ERROR([libtool configure failed])
|
||||
|
||||
# Reload cache, that may have been modified by ltconfig
|
||||
AC_CACHE_LOAD
|
||||
|
||||
# This can be used to rebuild libtool when needed
|
||||
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
|
||||
|
||||
# Always use our own libtool.
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
||||
AC_SUBST(LIBTOOL)dnl
|
||||
|
||||
# Redirect the config.log output again, so that the ltconfig log is not
|
||||
# clobbered by the next message.
|
||||
exec 5>>./config.log
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_LIBTOOL_SETUP,
|
||||
[AC_PREREQ(2.13)dnl
|
||||
AC_REQUIRE([AC_ENABLE_SHARED])dnl
|
||||
AC_REQUIRE([AC_ENABLE_STATIC])dnl
|
||||
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_PROG_LD])dnl
|
||||
AC_REQUIRE([AC_PROG_NM])dnl
|
||||
AC_REQUIRE([AC_PROG_LN_S])dnl
|
||||
dnl
|
||||
|
||||
# Check for any special flags to pass to ltconfig.
|
||||
libtool_flags="--cache-file=$cache_file"
|
||||
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
|
||||
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
|
||||
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
|
||||
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
|
||||
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
|
||||
[libtool_flags="$libtool_flags --enable-dlopen"])
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||
[libtool_flags="$libtool_flags --enable-win32-dll"])
|
||||
AC_ARG_ENABLE(libtool-lock,
|
||||
[ --disable-libtool-lock avoid locking (might break parallel builds)])
|
||||
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
|
||||
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
|
||||
|
||||
# Some flags need to be propagated to the compiler or linker for good
|
||||
# libtool support.
|
||||
case "$host" in
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
case "`/usr/bin/file conftest.o`" in
|
||||
*32-bit*)
|
||||
LD="${LD-ld} -32"
|
||||
;;
|
||||
*N32*)
|
||||
LD="${LD-ld} -n32"
|
||||
;;
|
||||
*64-bit*)
|
||||
LD="${LD-ld} -64"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -rf conftest*
|
||||
;;
|
||||
|
||||
*-*-sco3.2v5*)
|
||||
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
|
||||
SAVE_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -belf"
|
||||
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
|
||||
[AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
|
||||
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
|
||||
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
|
||||
CFLAGS="$SAVE_CFLAGS"
|
||||
fi
|
||||
;;
|
||||
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||
[*-*-cygwin* | *-*-mingw*)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
;;
|
||||
])
|
||||
esac
|
||||
])
|
||||
|
||||
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
|
||||
AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
|
||||
|
||||
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
|
||||
AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
|
||||
|
||||
# AC_ENABLE_SHARED - implement the --enable-shared flag
|
||||
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_SHARED, [dnl
|
||||
define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(shared,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
|
||||
AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_SHARED(no)])
|
||||
|
||||
# AC_ENABLE_STATIC - implement the --enable-static flag
|
||||
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_STATIC, [dnl
|
||||
define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(static,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_DISABLE_STATIC - set the default static flag to --disable-static
|
||||
AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_STATIC(no)])
|
||||
|
||||
|
||||
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
|
||||
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
|
||||
define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(fast-install,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
|
||||
AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_FAST_INSTALL(no)])
|
||||
|
||||
# AC_PROG_LD - find the path to the GNU or non-GNU linker
|
||||
AC_DEFUN(AC_PROG_LD,
|
||||
[AC_ARG_WITH(gnu-ld,
|
||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
ac_prog=ld
|
||||
if test "$ac_cv_prog_gcc" = yes; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
AC_MSG_CHECKING([for ld used by GCC])
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5`
|
||||
case "$ac_prog" in
|
||||
# Accept absolute paths.
|
||||
changequote(,)dnl
|
||||
[\\/]* | [A-Za-z]:[\\/]*)
|
||||
re_direlt='/[^/][^/]*/\.\./'
|
||||
changequote([,])dnl
|
||||
# Canonicalize the path of ld
|
||||
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||
done
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
"")
|
||||
# If it fails, then pretend we aren't using GCC.
|
||||
ac_prog=ld
|
||||
;;
|
||||
*)
|
||||
# If it is relative, then search for the first ld in PATH.
|
||||
with_gnu_ld=unknown
|
||||
;;
|
||||
esac
|
||||
elif test "$with_gnu_ld" = yes; then
|
||||
AC_MSG_CHECKING([for GNU ld])
|
||||
else
|
||||
AC_MSG_CHECKING([for non-GNU ld])
|
||||
fi
|
||||
AC_CACHE_VAL(ac_cv_path_LD,
|
||||
[if test -z "$LD"; then
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
||||
ac_cv_path_LD="$ac_dir/$ac_prog"
|
||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||
# but apparently some GNU ld's only accept -v.
|
||||
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
|
||||
test "$with_gnu_ld" != no && break
|
||||
else
|
||||
test "$with_gnu_ld" != yes && break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
else
|
||||
ac_cv_path_LD="$LD" # Let the user override the test with a path.
|
||||
fi])
|
||||
LD="$ac_cv_path_LD"
|
||||
if test -n "$LD"; then
|
||||
AC_MSG_RESULT($LD)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_SUBST(LD)
|
||||
AC_PROG_LD_GNU
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_PROG_LD_GNU,
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
|
||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
|
||||
ac_cv_prog_gnu_ld=yes
|
||||
else
|
||||
ac_cv_prog_gnu_ld=no
|
||||
fi])
|
||||
])
|
||||
|
||||
# AC_PROG_NM - find the path to a BSD-compatible name lister
|
||||
AC_DEFUN(AC_PROG_NM,
|
||||
[AC_MSG_CHECKING([for BSD-compatible nm])
|
||||
AC_CACHE_VAL(ac_cv_path_NM,
|
||||
[if test -n "$NM"; then
|
||||
# Let the user override the test.
|
||||
ac_cv_path_NM="$NM"
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
|
||||
# Check to see if the nm accepts a BSD-compat flag.
|
||||
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
|
||||
# nm: unknown option "B" ignored
|
||||
if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -B"
|
||||
break
|
||||
elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -p"
|
||||
break
|
||||
else
|
||||
ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
|
||||
continue # so that we can try to find one that supports BSD flags
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
|
||||
fi])
|
||||
NM="$ac_cv_path_NM"
|
||||
AC_MSG_RESULT([$NM])
|
||||
AC_SUBST(NM)
|
||||
])
|
||||
|
||||
# AC_CHECK_LIBM - check for math library
|
||||
AC_DEFUN(AC_CHECK_LIBM,
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
LIBM=
|
||||
case "$host" in
|
||||
*-*-beos* | *-*-cygwin*)
|
||||
# These system don't have libm
|
||||
;;
|
||||
*-ncr-sysv4.3*)
|
||||
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
|
||||
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_LIB(m, main, LIBM="-lm")
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl convenience library, adds --enable-ltdl-convenience to
|
||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||
# flat, and, if you're not using automake, define top_builddir as
|
||||
# appropriate in the Makefiles.
|
||||
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
case "$enable_ltdl_convenience" in
|
||||
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
|
||||
"") enable_ltdl_convenience=yes
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
|
||||
esac
|
||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
|
||||
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
|
||||
])
|
||||
|
||||
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl installable library, and adds --enable-ltdl-install to
|
||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||
# flat, and, if you're not using automake, define top_builddir as
|
||||
# appropriate in the Makefiles.
|
||||
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
|
||||
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_CHECK_LIB(ltdl, main,
|
||||
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
|
||||
[if test x"$enable_ltdl_install" = xno; then
|
||||
AC_MSG_WARN([libltdl not installed, but installation disabled])
|
||||
else
|
||||
enable_ltdl_install=yes
|
||||
fi
|
||||
])
|
||||
if test x"$enable_ltdl_install" = x"yes"; then
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install"
|
||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
|
||||
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
|
||||
else
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
|
||||
LIBLTDL="-lltdl"
|
||||
INCLTDL=
|
||||
fi
|
||||
])
|
||||
|
||||
dnl old names
|
||||
AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
|
||||
AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
|
||||
AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
|
||||
|
||||
dnl This is just to silence aclocal about the macro not being used
|
||||
ifelse([AC_DISABLE_FAST_INSTALL])dnl
|
||||
|
||||
|
||||
# serial 1
|
||||
|
||||
# @defmac AC_PROG_CC_STDC
|
||||
# @maindex PROG_CC_STDC
|
||||
# @ovindex CC
|
||||
# If the C compiler in not in ANSI C mode by default, try to add an option
|
||||
# to output variable @code{CC} to make it so. This macro tries various
|
||||
# options that select ANSI C on some system or another. It considers the
|
||||
# compiler to be in ANSI C mode if it handles function prototypes correctly.
|
||||
#
|
||||
# If you use this macro, you should check after calling it whether the C
|
||||
# compiler has been set to accept ANSI C; if not, the shell variable
|
||||
# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
|
||||
# code in ANSI C, you can make an un-ANSIfied copy of it by using the
|
||||
# program @code{ansi2knr}, which comes with Ghostscript.
|
||||
# @end defmac
|
||||
|
||||
AC_DEFUN(AM_PROG_CC_STDC,
|
||||
[AC_REQUIRE([AC_PROG_CC])
|
||||
AC_BEFORE([$0], [AC_C_INLINE])
|
||||
AC_BEFORE([$0], [AC_C_CONST])
|
||||
dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
|
||||
dnl a magic option to avoid problems with ANSI preprocessor commands
|
||||
dnl like #elif.
|
||||
dnl FIXME: can't do this because then AC_AIX won't work due to a
|
||||
dnl circular dependency.
|
||||
dnl AC_BEFORE([$0], [AC_PROG_CPP])
|
||||
AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
|
||||
AC_CACHE_VAL(am_cv_prog_cc_stdc,
|
||||
[am_cv_prog_cc_stdc=no
|
||||
ac_save_CC="$CC"
|
||||
# Don't try gcc -ansi; that turns off useful extensions and
|
||||
# breaks some systems' header files.
|
||||
# AIX -qlanglvl=ansi
|
||||
# Ultrix and OSF/1 -std1
|
||||
# HP-UX 10.20 and later -Ae
|
||||
# HP-UX older versions -Aa -D_HPUX_SOURCE
|
||||
# SVR4 -Xc -D__EXTENSIONS__
|
||||
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
|
||||
do
|
||||
CC="$ac_save_CC $ac_arg"
|
||||
AC_TRY_COMPILE(
|
||||
[#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
|
||||
struct buf { int x; };
|
||||
FILE * (*rcsopen) (struct buf *, struct stat *, int);
|
||||
static char *e (p, i)
|
||||
char **p;
|
||||
int i;
|
||||
{
|
||||
return p[i];
|
||||
}
|
||||
static char *f (char * (*g) (char **, int), char **p, ...)
|
||||
{
|
||||
char *s;
|
||||
va_list v;
|
||||
va_start (v,p);
|
||||
s = g (p, va_arg (v,int));
|
||||
va_end (v);
|
||||
return s;
|
||||
}
|
||||
int test (int i, double x);
|
||||
struct s1 {int (*f) (int a);};
|
||||
struct s2 {int (*f) (double a);};
|
||||
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
|
||||
int argc;
|
||||
char **argv;
|
||||
], [
|
||||
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
|
||||
],
|
||||
[am_cv_prog_cc_stdc="$ac_arg"; break])
|
||||
done
|
||||
CC="$ac_save_CC"
|
||||
])
|
||||
if test -z "$am_cv_prog_cc_stdc"; then
|
||||
AC_MSG_RESULT([none needed])
|
||||
else
|
||||
AC_MSG_RESULT($am_cv_prog_cc_stdc)
|
||||
fi
|
||||
case "x$am_cv_prog_cc_stdc" in
|
||||
x|xno) ;;
|
||||
*) CC="$CC $am_cv_prog_cc_stdc" ;;
|
||||
esac
|
||||
])
|
||||
|
||||
dnl From Jim Meyering.
|
||||
|
||||
# serial 1
|
||||
|
||||
AC_DEFUN(AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL,
|
||||
[AC_REQUIRE([AM_SYS_POSIX_TERMIOS])
|
||||
AC_CACHE_CHECK([whether use of TIOCGWINSZ requires sys/ioctl.h],
|
||||
am_cv_sys_tiocgwinsz_needs_sys_ioctl_h,
|
||||
[am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
|
||||
|
||||
gwinsz_in_termios_h=no
|
||||
if test $am_cv_sys_posix_termios = yes; then
|
||||
AC_EGREP_CPP([yes],
|
||||
[#include <sys/types.h>
|
||||
# include <termios.h>
|
||||
# ifdef TIOCGWINSZ
|
||||
yes
|
||||
# endif
|
||||
], gwinsz_in_termios_h=yes)
|
||||
fi
|
||||
|
||||
if test $gwinsz_in_termios_h = no; then
|
||||
AC_EGREP_CPP([yes],
|
||||
[#include <sys/types.h>
|
||||
# include <sys/ioctl.h>
|
||||
# ifdef TIOCGWINSZ
|
||||
yes
|
||||
# endif
|
||||
], am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes)
|
||||
fi
|
||||
])
|
||||
if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
|
||||
AC_DEFINE(GWINSZ_IN_SYS_IOCTL,1,
|
||||
[Define if TIOCGWINSZ requires sys/ioctl.h])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl From Jim Meyering.
|
||||
|
||||
# serial 1
|
||||
|
||||
AC_DEFUN(AM_SYS_POSIX_TERMIOS,
|
||||
[AC_CACHE_CHECK([POSIX termios], am_cv_sys_posix_termios,
|
||||
[AC_TRY_LINK([#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <termios.h>],
|
||||
[/* SunOS 4.0.3 has termios.h but not the library calls. */
|
||||
tcgetattr(0, 0);],
|
||||
am_cv_sys_posix_termios=yes,
|
||||
am_cv_sys_posix_termios=no)])
|
||||
])
|
||||
|
||||
# From Ulrich Drepper.
|
||||
|
||||
# serial 1
|
||||
|
||||
AC_DEFUN(AM_TYPE_PTRDIFF_T,
|
||||
[AC_CACHE_CHECK([for ptrdiff_t], am_cv_type_ptrdiff_t,
|
||||
[AC_TRY_COMPILE([#include <stddef.h>], [ptrdiff_t p],
|
||||
am_cv_type_ptrdiff_t=yes, am_cv_type_ptrdiff_t=no)])
|
||||
if test $am_cv_type_ptrdiff_t = yes; then
|
||||
AC_DEFINE(HAVE_PTRDIFF_T,1,[Define if system has ptrdiff_t type])
|
||||
fi
|
||||
])
|
||||
|
||||
29
build/db.2.x.README
Normal file
29
build/db.2.x.README
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
Berkeley DB version 2.x and OpenLDAP running threads
|
||||
====================================================
|
||||
|
||||
Special care has to be taken when building Berkeley DB 2.x
|
||||
for use with OpenLDAP as an slapd backend. If OpenLDAP is used
|
||||
with threads, so must Berkeley DB. If OpenLDAP is built without
|
||||
threads, so must Berkeley DB. In general, you should use
|
||||
the latest Sleepycat version.
|
||||
|
||||
The configuration tool of Sleepycat's Berkeley DB will automatically
|
||||
set appropriate options on IRIX, OSF/1, and SUN Solaris platforms
|
||||
(version 2.3.16), as well as FreeBSD (version 2.7.5). The options
|
||||
must be manually defined on other plaforms, e.g. on LINUX.
|
||||
|
||||
On PC-LINUX (kernel version 2.0.35, linux kernel threads as imple-
|
||||
mented by libpthreads.so.1.60.4) with gcc as the standard compiler
|
||||
the environment variable CPPFLAGS must define -D_REENTRANT, while
|
||||
building the Berkeley DB package.
|
||||
|
||||
DO NOT USE THE -ansi CFLAG, SINCE THEN THE DB PACKAGE'S CONFIGURE
|
||||
CANNOT FIND THE X86/GCC SPINLOCKS, WHICH ARE NEEDED FOR THREAD-
|
||||
SUPPORT WITH THE BERKELEY DB.
|
||||
|
||||
Please check carefully if your platform is not mentioned above.
|
||||
|
||||
The OpenLDAP configure tool will most probably find the correct
|
||||
configuration itself. No special action has to be taken
|
||||
while building the OpenLDAP package.
|
||||
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
# $OpenLDAP$
|
||||
## Copyright 1998,1999 The OpenLDAP Foundation
|
||||
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
|
||||
## of this package for details.
|
||||
|
|
|
|||
10
build/info.mk
Normal file
10
build/info.mk
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# $OpenLDAP$
|
||||
## Copyright 1998,1999 The OpenLDAP Foundation
|
||||
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
|
||||
## of this package for details.
|
||||
##---------------------------------------------------------------------------
|
||||
##
|
||||
## Makefile Template for Non-Source Directories
|
||||
##
|
||||
|
||||
Makefile: $(top_srcdir)/build/info.mk
|
||||
255
build/install-sh
Executable file
255
build/install-sh
Executable file
|
|
@ -0,0 +1,255 @@
|
|||
#! /bin/sh
|
||||
# $OpenLDAP$
|
||||
## Copyright 1998,1999 The OpenLDAP Foundation
|
||||
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
|
||||
## of this package for details.
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
#
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
else
|
||||
instcmd=$mkdirprog
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
else
|
||||
true
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
||||
25
build/lib-shared.mk
Normal file
25
build/lib-shared.mk
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# $OpenLDAP$
|
||||
## Copyright 1998,1999 The OpenLDAP Foundation
|
||||
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
|
||||
## of this package for details.
|
||||
##---------------------------------------------------------------------------
|
||||
##
|
||||
## Makefile Template for Shared Libraries
|
||||
##
|
||||
|
||||
COMPILE = $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c
|
||||
MKDEPFLAG = -l
|
||||
|
||||
.SUFFIXES: .c .o .lo
|
||||
|
||||
.c.lo:
|
||||
$(COMPILE) $<
|
||||
|
||||
$(LIBRARY): version.lo
|
||||
$(LTLIBLINK) -rpath $(libdir) -o $@ $(OBJS) version.lo
|
||||
$(RM) ../$@; \
|
||||
(d=`$(PWD)` ; $(LN_S) `$(BASENAME) $$d`/$@ ../$@)
|
||||
$(RM) ../`$(BASENAME) $@ .la`.a; \
|
||||
(d=`$(PWD)`; t=`$(BASENAME) $@ .la`.a; $(LN_S) `$(BASENAME) $$d`/.libs/$$t ../$$t)
|
||||
|
||||
Makefile: $(top_srcdir)/build/lib-shared.mk
|
||||
16
build/lib-static.mk
Normal file
16
build/lib-static.mk
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# $OpenLDAP$
|
||||
## Copyright 1998,1999 The OpenLDAP Foundation
|
||||
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
|
||||
## of this package for details.
|
||||
##---------------------------------------------------------------------------
|
||||
##
|
||||
## Makefile Template for Static Libraries
|
||||
##
|
||||
|
||||
$(LIBRARY): version.o
|
||||
$(AR) ru $@ $(OBJS) version.o
|
||||
@$(RANLIB) $@; \
|
||||
$(RM) ../$@; \
|
||||
(d=`$(PWD)` ; $(LN_S) `$(BASENAME) $$d`/$@ ../$@)
|
||||
|
||||
Makefile: $(top_srcdir)/build/lib-static.mk
|
||||
35
build/lib.mk
Normal file
35
build/lib.mk
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
# $OpenLDAP$
|
||||
## Copyright 1998,1999 The OpenLDAP Foundation
|
||||
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
|
||||
## of this package for details.
|
||||
##---------------------------------------------------------------------------
|
||||
##
|
||||
## Makefile Template for Libraries
|
||||
##
|
||||
|
||||
all-common: $(LIBRARY) $(PROGRAMS)
|
||||
|
||||
version.c: $(OBJS)
|
||||
$(RM) $@
|
||||
$(MKVERSION) $(LIBRARY) > $@
|
||||
|
||||
install-common: FORCE
|
||||
|
||||
lint: lint-local FORCE
|
||||
$(LINT) $(DEFS) $(DEFINES) $(SRCS)
|
||||
|
||||
lint5: lint5-local FORCE
|
||||
$(5LINT) $(DEFS) $(DEFINES) $(SRCS)
|
||||
|
||||
clean-common: FORCE
|
||||
$(RM) $(LIBRARY) ../$(LIBRARY) $(XLIBRARY) \
|
||||
$(PROGRAMS) $(XPROGRAMS) $(XSRCS) $(XXSRCS) \
|
||||
*.o *.lo a.out core version.c .libs/*
|
||||
|
||||
depend-common: FORCE
|
||||
$(MKDEP) $(DEFS) $(DEFINES) $(SRCS) $(XXSRCS)
|
||||
|
||||
lint-local: FORCE
|
||||
lint5-local: FORCE
|
||||
|
||||
Makefile: $(top_srcdir)/build/lib.mk
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
# $OpenLDAP$
|
||||
## Copyright 1998,1999 The OpenLDAP Foundation
|
||||
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
|
||||
## of this package for details.
|
||||
|
|
|
|||
128
build/mkdep
128
build/mkdep
|
|
@ -1,5 +1,10 @@
|
|||
#!/bin/sh -
|
||||
#! /bin/sh -
|
||||
# $OpenLDAP$
|
||||
## Copyright 1998,1999 The OpenLDAP Foundation
|
||||
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
|
||||
## of this package for details.
|
||||
#
|
||||
# Portions
|
||||
# Copyright (c) 1987 Regents of the University of California.
|
||||
# All rights reserved.
|
||||
#
|
||||
|
|
@ -25,29 +30,52 @@ set -e # exit immediately if any errors occur
|
|||
|
||||
MAKE=Makefile # default makefile name is "Makefile"
|
||||
NOSLASH="no" # by default, / dependencies are included
|
||||
CC=cc # default compiler is cc
|
||||
SRCDIR=""
|
||||
SED=cat
|
||||
|
||||
: ${CC=cc} # use cc by default
|
||||
|
||||
# We generally set these via the command line options
|
||||
: ${MKDEP_CC=$CC} # select default compiler to generate dependencies
|
||||
: ${MKDEP_CFLAGS="-M"} # cc -M usually produces dependencies
|
||||
|
||||
while :
|
||||
do case "$1" in
|
||||
# the -s flag removes dependencies to files that begin with /
|
||||
-s)
|
||||
NOSLASH=yes;
|
||||
shift ;;
|
||||
|
||||
# -f allows you to select a makefile name
|
||||
-f)
|
||||
MAKE=$2
|
||||
shift; shift ;;
|
||||
|
||||
# -c allows you to select a compiler to use (default is cc)
|
||||
# -d allows you to select a VPATH directory
|
||||
-d)
|
||||
SRCDIR=$2
|
||||
shift; shift ;;
|
||||
|
||||
# -c allows you to override the compiler used to generate dependencies
|
||||
-c)
|
||||
CC=$2
|
||||
MKDEP_CC=$2
|
||||
shift; shift ;;
|
||||
|
||||
# -m allows you to override the compiler flags used to generate
|
||||
# dependencies.
|
||||
-m)
|
||||
MKDEP_CFLAGS=$2
|
||||
shift; shift ;;
|
||||
|
||||
# the -p flag produces "program: program.c" style dependencies
|
||||
# so .o's don't get produced
|
||||
-p)
|
||||
SED='s;\.o;;'
|
||||
SED='sed -e s;\.o;;'
|
||||
shift ;;
|
||||
|
||||
# the -s flag removes dependencies to files that begin with /
|
||||
-s)
|
||||
NOSLASH=yes;
|
||||
# the -l flag produces libtool compatible dependencies
|
||||
-l)
|
||||
SED='sed -e s;\.o:;.lo:;'
|
||||
shift ;;
|
||||
|
||||
# -*) shift ;;
|
||||
|
|
@ -57,19 +85,19 @@ while :
|
|||
esac
|
||||
done
|
||||
|
||||
if [ $# = 0 ] ; then
|
||||
echo 'usage: mkdep [-p] [-f makefile] [flags] file ...'
|
||||
if test $# = 0 ; then
|
||||
echo 'usage: mkdep [-p] [-s] [-c cc] [-m flags] [-f makefile] [-d srcdir] [cppflags] file ...'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -w $MAKE ]; then
|
||||
if test ! -w $MAKE ; then
|
||||
echo "mkdep: no writeable file \"$MAKE\""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TMP=/tmp/mkdep$$
|
||||
|
||||
trap 'rm -f $TMP ; exit 1' 1 2 3 13 15
|
||||
trap 'rm -f $TMP.sed $TMP ; exit 1' 1 2 3 13 15
|
||||
|
||||
cp $MAKE ${MAKE}.bak
|
||||
|
||||
|
|
@ -89,38 +117,60 @@ _EOF_
|
|||
# egrep '^#include[ ]*".*"' /dev/null $* |
|
||||
# sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' -e 's/\.c/.o/' |
|
||||
|
||||
$CC -M $* |
|
||||
sed "
|
||||
s; \./; ;g
|
||||
$SED" |
|
||||
if test "x$SRCDIR" = "x" ; then
|
||||
files=$*
|
||||
else
|
||||
files=
|
||||
for i in $* ; do
|
||||
if test -f $i ; then
|
||||
files="$files $i"
|
||||
elif test -f $SRCDIR/$i ; then
|
||||
files="$files $SRCDIR/$i"
|
||||
else
|
||||
files="$files $i"
|
||||
fi
|
||||
done
|
||||
|
||||
MKDEP_CFLAGS="$MKDEP_CFLAGS -I$SRCDIR"
|
||||
fi
|
||||
|
||||
cat << _EOF_ >> $TMP
|
||||
|
||||
#
|
||||
# files: $*
|
||||
# command: $MKDEP_CC $MKDEP_CFLAGS $files
|
||||
#
|
||||
|
||||
_EOF_
|
||||
|
||||
$MKDEP_CC $MKDEP_CFLAGS $files | \
|
||||
sed -e 's; \./; ;g' | \
|
||||
$SED > $TMP.sed
|
||||
# do not pipe to awk. SGI awk wants a filename as argument.
|
||||
# (or '-', but I do not know if all other awks support that.)
|
||||
awk '
|
||||
$1 ~ /:/ {
|
||||
$1 ~ /:$/ {
|
||||
filenm=$1
|
||||
dep=$2
|
||||
dep=substr($0, length(filenm)+1)
|
||||
}
|
||||
$1 !~ /:/ {
|
||||
dep=$1
|
||||
$1 !~ /:$/ {
|
||||
dep=$0
|
||||
}
|
||||
/.*/ {
|
||||
if ( noslash = "yes" && dep ~ /^\// ) next
|
||||
if (filenm != prev) {
|
||||
if (rec != "")
|
||||
print rec;
|
||||
rec = filenm " " dep;
|
||||
prev = filenm;
|
||||
if ( length(filenm) < 2 ) next
|
||||
if ( filenm ~ /:.*:$/ ) next
|
||||
split(dep, depends, " ")
|
||||
for(d in depends) {
|
||||
dfile = depends[d]
|
||||
if ( length(dfile) < 2 ) continue
|
||||
if ( dfile ~ /:/ ) continue
|
||||
if (( noslash == "yes") && (dfile ~ /^\// )) continue
|
||||
rec = filenm " " dfile
|
||||
print rec
|
||||
}
|
||||
else {
|
||||
if (length(rec dep) > 78) {
|
||||
print rec;
|
||||
rec = filenm " " dep;
|
||||
}
|
||||
else
|
||||
rec = rec " " dep
|
||||
}
|
||||
}
|
||||
END {
|
||||
print rec
|
||||
}' noslash="$NOSLASH" >> $TMP
|
||||
}
|
||||
' noslash="$NOSLASH" $TMP.sed >> $TMP
|
||||
|
||||
|
||||
cat << _EOF_ >> $TMP
|
||||
|
||||
|
|
@ -129,5 +179,5 @@ _EOF_
|
|||
|
||||
# copy to preserve permissions
|
||||
cp $TMP $MAKE
|
||||
rm -f ${MAKE}.bak $TMP
|
||||
rm -f ${MAKE}.bak $TMP.sed $TMP
|
||||
exit 0
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#! /bin/sh
|
||||
# $OpenLDAP$
|
||||
## Copyright 1998,1999 The OpenLDAP Foundation
|
||||
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
|
||||
## of this package for details.
|
||||
|
|
|
|||
58
build/mkversion
Executable file
58
build/mkversion
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
#! /bin/sh
|
||||
# $OpenLDAP$
|
||||
## Copyright 1998,1999 The OpenLDAP Foundation
|
||||
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
|
||||
## of this package for details.
|
||||
#
|
||||
# Create a version.c file
|
||||
#
|
||||
PACKAGE=OpenLDAP
|
||||
VERSION=unknown
|
||||
SYMBOL=__Version
|
||||
static=static
|
||||
const=const
|
||||
while :
|
||||
do case "$1" in
|
||||
-p)
|
||||
PACKAGE=$2
|
||||
shift; shift ;;
|
||||
-v)
|
||||
VERSION=$2
|
||||
shift; shift ;;
|
||||
|
||||
-c)
|
||||
const=
|
||||
shift ;;
|
||||
-n)
|
||||
SYMBOL=$2
|
||||
shift; shift ;;
|
||||
-s)
|
||||
static=
|
||||
shift ;;
|
||||
|
||||
# -*) shift ;;
|
||||
*)
|
||||
break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if test $# != 1 ; then
|
||||
echo 'usage: mkversion [-c] [-s] [-p package] [-v version] application'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
APPLICATION=$1
|
||||
WHEN=`date`
|
||||
WHOWHERE="$USER@`uname -n`:`pwd`"
|
||||
|
||||
cat << __EOF__
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation
|
||||
* COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
|
||||
* of this package for details.
|
||||
*/
|
||||
|
||||
$static $const char $SYMBOL[] =
|
||||
"@(#) \$$PACKAGE: $APPLICATION $VERSION ($WHEN) \$\n\t$WHOWHERE\n";
|
||||
|
||||
__EOF__
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
# $OpenLDAP$
|
||||
## Copyright 1998,1999 The OpenLDAP Foundation
|
||||
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
|
||||
## of this package for details.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
dnl $OpenLDAP$
|
||||
dnl
|
||||
dnl Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
|
||||
dnl COPYING RESTRICTIONS APPLY, See COPYRIGHT file
|
||||
dnl
|
||||
|
|
@ -605,6 +607,27 @@ fi
|
|||
])
|
||||
dnl
|
||||
dnl ====================================================================
|
||||
dnl Check GNU Pth pthread Header
|
||||
dnl
|
||||
dnl defines ol_cv_header linux_threads to 'yes' or 'no'
|
||||
dnl 'no' implies pthreads.h is not LinuxThreads or pthreads.h
|
||||
dnl doesn't exists. Existance of pthread.h should separately
|
||||
dnl checked.
|
||||
dnl
|
||||
AC_DEFUN([OL_HEADER_GNU_PTH_PTHREAD_H], [
|
||||
AC_CACHE_CHECK([for GNU Pth pthread.h],
|
||||
[ol_cv_header_gnu_pth_pthread_h],
|
||||
[AC_EGREP_CPP(__gnu_pth__,
|
||||
[#include <pthread.h>
|
||||
#ifdef _POSIX_THREAD_IS_GNU_PTH
|
||||
__gnu_pth__
|
||||
#endif
|
||||
],
|
||||
[ol_cv_header_gnu_pth_pthread_h=yes],
|
||||
[ol_cv_header_gnu_pth_pthread_h=no])
|
||||
])
|
||||
])dnl
|
||||
dnl ====================================================================
|
||||
dnl Check LinuxThreads Header
|
||||
dnl
|
||||
dnl defines ol_cv_header linux_threads to 'yes' or 'no'
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# $OpenLDAP$
|
||||
## Copyright 1998,1999 The OpenLDAP Foundation
|
||||
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
|
||||
## of this package for details.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# $OpenLDAP$
|
||||
## Copyright 1998,1999 The OpenLDAP Foundation
|
||||
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
|
||||
## of this package for details.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# $OpenLDAP$
|
||||
## Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
## All rights reserved.
|
||||
##
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
2.0-Engineering
|
||||
2.0-alpha3
|
||||
|
|
|
|||
7
clients/Makefile.in
Normal file
7
clients/Makefile.in
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# $OpenLDAP$
|
||||
## Copyright 1998 The OpenLDAP Foundation, All Rights Reserved.
|
||||
## COPYING RESTRICTIONS APPLY, See COPYRIGHT file
|
||||
##
|
||||
## Clients Makefile.in for OpenLDAP
|
||||
|
||||
SUBDIRS= tools ud finger gopher mail500 fax500 rcpt500
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
# $OpenLDAP$
|
||||
|
||||
PROGRAMS= rp500 fax500 xrpcomp.tmp
|
||||
|
||||
SRCS= main.c faxtotpc.c rp500.c
|
||||
|
|
|
|||
11
clients/fax500/fax500.h
Normal file
11
clients/fax500/fax500.h
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/* $OpenLDAP$ */
|
||||
#ifndef FAX500_H
|
||||
#define FAX500_H 1
|
||||
|
||||
/* in faxtotpc.c */
|
||||
void strip_nonnum ( char *str );
|
||||
char *remove_parens( char *ibuf, char *obuf );
|
||||
char *munge_phone ( char *ibuf, char *obuf );
|
||||
char *faxtotpc ( char *phone, char *userinfo );
|
||||
|
||||
#endif
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright (c) 1993 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
|
|
@ -13,29 +14,28 @@
|
|||
* Routines for parsing the facsimileTelephoneNumber field out of
|
||||
* an X.500 entry and converting it to a "tpc.int" domain name.
|
||||
*
|
||||
* char *faxtotpc(str)
|
||||
* char *str;
|
||||
* char *faxtotpc( char *str, char *userinfo)
|
||||
*
|
||||
* faxtotpc() returns a pointer to a string allocated with malloc(3).
|
||||
*/
|
||||
|
||||
#include "portable.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef ultrix
|
||||
extern char *strdup();
|
||||
#endif
|
||||
#include <ac/ctype.h>
|
||||
#include <ac/string.h>
|
||||
#include <ac/unistd.h>
|
||||
|
||||
#include "fax500.h"
|
||||
|
||||
#define TPCDOMAIN "tpc.int"
|
||||
|
||||
/*
|
||||
* Remove everything from 'str' which is not a digit
|
||||
*/
|
||||
void strip_nonnum(str)
|
||||
char *str;
|
||||
void
|
||||
strip_nonnum( char *str )
|
||||
{
|
||||
char *p, *q;
|
||||
p = q = str;
|
||||
|
|
@ -61,9 +61,8 @@ char *str;
|
|||
* Remove anything of the form (blah) where
|
||||
* "blah" contains a non-numeric character.
|
||||
*/
|
||||
char *remove_parens(ibuf, obuf)
|
||||
char *ibuf;
|
||||
char *obuf;
|
||||
char *
|
||||
remove_parens( char *ibuf, char *obuf )
|
||||
{
|
||||
char *p = ibuf;
|
||||
char *q = obuf;
|
||||
|
|
@ -132,9 +131,8 @@ char *obuf;
|
|||
* 6 93
|
||||
* 8 99
|
||||
*/
|
||||
char *munge_phone(ibuf, obuf)
|
||||
char *ibuf;
|
||||
char *obuf;
|
||||
char *
|
||||
munge_phone( char *ibuf, char *obuf )
|
||||
{
|
||||
#define UMAREACODE "1313"
|
||||
|
||||
|
|
@ -176,17 +174,11 @@ char *obuf;
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Convert string to "tpc.int" domain name.
|
||||
*/
|
||||
char *faxtotpc(phone, userinfo)
|
||||
char *phone;
|
||||
char *userinfo;
|
||||
char *
|
||||
faxtotpc( char *phone, char *userinfo )
|
||||
{
|
||||
char *p;
|
||||
char *q;
|
||||
|
|
@ -244,5 +236,4 @@ char *userinfo;
|
|||
strcat(obuf, TPCDOMAIN); /* tack on domain name */
|
||||
p = strdup(obuf);
|
||||
return(p);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright (c) 1990 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
|
|
@ -121,7 +122,7 @@ static void add_to(char ***list, int *nlist, char **new);
|
|||
static int isgroup(LDAPMessage *e);
|
||||
static void add_error(Error **err, int *nerr, int code, char *addr, LDAPMessage *msg);
|
||||
static void add_group(char *dn, Group **list, int *nlist);
|
||||
static void unbind_and_exit(int rc);
|
||||
static void unbind_and_exit(int rc) LDAP_GCCATTR((noreturn));
|
||||
static int group_loop(char *dn);
|
||||
static void send_group(Group *group, int ngroup);
|
||||
static int has_attributes(LDAPMessage *e, char *attr1, char *attr2);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright (c) 1990 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# $OpenLDAP$
|
||||
|
||||
SRCS= main.c
|
||||
XSRCS= version.c
|
||||
OBJS= main.o
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright (c) 1990,1994 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# $OpenLDAP$
|
||||
##
|
||||
## Makefile for gopher clients
|
||||
##
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright (c) 1990 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
|
|
@ -62,10 +63,10 @@ char *templatefile = TEMPLATEFILE;
|
|||
char myhost[MAXHOSTNAMELEN];
|
||||
int myport;
|
||||
|
||||
static void usage ( char *name );
|
||||
static void usage ( char *name ) LDAP_GCCATTR((noreturn));
|
||||
static int set_socket (int port);
|
||||
static RETSIGTYPE wait4child(int sig);
|
||||
static void do_queries (int s);
|
||||
static void do_queries (int s) LDAP_GCCATTR((noreturn));
|
||||
static void do_error (FILE *fp, char *s);
|
||||
static void do_search (LDAP *ld, FILE *fp, char *buf);
|
||||
static void do_read (LDAP *ld, FILE *fp, char *dn);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright (c) 1990 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
|
|
@ -63,10 +64,10 @@ char *templatefile = TEMPLATEFILE;
|
|||
char *friendlyfile = FRIENDLYFILE;
|
||||
int rdncount = GO500GW_RDNCOUNT;
|
||||
|
||||
static void usage ( char *name );
|
||||
static void usage ( char *name ) LDAP_GCCATTR((noreturn));
|
||||
static int set_socket (int port);
|
||||
static RETSIGTYPE wait4child(int sig);
|
||||
static void do_queries (int s);
|
||||
static void do_queries (int s) LDAP_GCCATTR((noreturn));
|
||||
static char *pick_oc ( char **oclist );
|
||||
static int isnonleaf ( LDAP *ld, char **oclist, char *dn );
|
||||
static void do_menu (LDAP *ld, FILE *fp, char *dn);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# $OpenLDAP$
|
||||
|
||||
PROGRAMS= mail500
|
||||
|
||||
SRCS= main.c
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright (c) 1990 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
|
|
@ -178,7 +179,7 @@ static void add_to( char ***list, int *nlist, char **new );
|
|||
static void add_single_to( char ***list, char *new );
|
||||
static int isgroup( LDAPMessage *e );
|
||||
static void add_error( Error **err, int *nerr, int code, char *addr, LDAPMessage *msg );
|
||||
static void unbind_and_exit( int rc );
|
||||
static void unbind_and_exit( int rc ) LDAP_GCCATTR((noreturn));
|
||||
static void send_group( Group *group, int ngroup );
|
||||
|
||||
static int connect_to_x500( void );
|
||||
|
|
@ -1829,7 +1830,3 @@ unbind_and_exit( int rc )
|
|||
|
||||
exit( rc );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# $OpenLDAP$
|
||||
|
||||
PROGRAMS= rcpt500
|
||||
SRCS= main.c cmds.c help.c query.c
|
||||
XSRCS= version.c
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* cmds.c: command table for rcpt500 (X.500 email query responder)
|
||||
*
|
||||
|
|
@ -6,7 +7,9 @@
|
|||
* All Rights Reserved
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "portable.h"
|
||||
|
||||
#include <ac/stdlib.h>
|
||||
#include "rcpt500.h"
|
||||
|
||||
struct command cmds[] = {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* help.c: for rcpt500 (X.500 email query responder)
|
||||
*
|
||||
|
|
@ -6,22 +7,24 @@
|
|||
* All Rights Reserved
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <syslog.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "portable.h"
|
||||
#include "ldapconfig.h"
|
||||
#include "rcpt500.h"
|
||||
|
||||
extern int dosyslog;
|
||||
#include <stdio.h>
|
||||
|
||||
#include <ac/syslog.h>
|
||||
#include <ac/string.h>
|
||||
#include <ac/unistd.h>
|
||||
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#include "ldap_defaults.h"
|
||||
#include "rcpt500.h"
|
||||
|
||||
|
||||
int
|
||||
help_cmd( msgp, reply )
|
||||
struct msginfo *msgp;
|
||||
char *reply;
|
||||
help_cmd(struct msginfo *msgp, char *reply)
|
||||
{
|
||||
int fd, len;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* main.c: for rcpt500 (X.500 email query responder)
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* query.c: for rcpt500 (X.500 email query responder)
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* rcpt500.h: includes for rcpt500 (X.500 email query responder)
|
||||
*
|
||||
|
|
@ -6,6 +7,10 @@
|
|||
* All Rights Reserved
|
||||
*/
|
||||
|
||||
#include <ldap_cdefs.h>
|
||||
|
||||
LDAP_BEGIN_DECL
|
||||
|
||||
struct msginfo {
|
||||
char *msg_subject;
|
||||
char *msg_replyto; /* actually could be from From: line */
|
||||
|
|
@ -16,8 +21,9 @@ struct msginfo {
|
|||
};
|
||||
|
||||
struct command {
|
||||
char *cmd_text; /* text for command, e.g. "HELP" */
|
||||
int (*cmd_handler)(); /* pointer to handler function */
|
||||
char *cmd_text; /* text for command, e.g. "HELP" */
|
||||
/* pointer to handler function */
|
||||
int (*cmd_handler) LDAP_P((struct msginfo *msgp, char *reply));
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -27,10 +33,28 @@ struct command {
|
|||
/*
|
||||
* functions
|
||||
*/
|
||||
int help_cmd();
|
||||
int query_cmd();
|
||||
int help_cmd LDAP_P((struct msginfo *msgp, char *reply));
|
||||
int query_cmd LDAP_P((struct msginfo *msgp, char *reply));
|
||||
|
||||
/*
|
||||
* externs
|
||||
*/
|
||||
|
||||
/* cmds.c */
|
||||
extern struct command cmds[];
|
||||
/* main.c */
|
||||
extern int dosyslog;
|
||||
#ifdef LDAP_CONNECTIONLESS
|
||||
extern int do_cldap;
|
||||
#endif
|
||||
extern int derefaliases;
|
||||
extern int sizelimit;
|
||||
extern int rdncount;
|
||||
extern int ldapport;
|
||||
extern char *ldaphost;
|
||||
extern char *searchbase;
|
||||
extern char *dapuser;
|
||||
extern char *filterfile;
|
||||
extern char *templatefile;
|
||||
|
||||
LDAP_END_DECL
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# $OpenLDAP$
|
||||
##
|
||||
## Makefile for LDAP tools
|
||||
##
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
/* ldapdelete.c - simple program to delete an entry using LDAP */
|
||||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
|
||||
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
||||
|
|
@ -20,7 +21,6 @@
|
|||
|
||||
static char *binddn = NULL;
|
||||
static char *passwd = NULL;
|
||||
static char *base = NULL;
|
||||
static char *ldaphost = NULL;
|
||||
static int ldapport = 0;
|
||||
static int not, verbose, contoper;
|
||||
|
|
@ -158,6 +158,9 @@ main( int argc, char **argv )
|
|||
ldap_set_option( ld, LDAP_OPT_DEREF, &deref );
|
||||
}
|
||||
|
||||
/* don't chase referrals */
|
||||
ldap_set_option( ld, LDAP_OPT_REFERRALS, LDAP_OPT_OFF );
|
||||
|
||||
if (want_bindpw)
|
||||
passwd = getpass("Enter LDAP Password: ");
|
||||
|
||||
|
|
@ -194,12 +197,12 @@ main( int argc, char **argv )
|
|||
}
|
||||
}
|
||||
|
||||
rc = 0;
|
||||
if ( fp == NULL ) {
|
||||
for ( ; optind < argc; ++optind ) {
|
||||
rc = dodelete( ld, argv[ optind ] );
|
||||
}
|
||||
} else {
|
||||
rc = 0;
|
||||
while ((rc == 0 || contoper) && fgets(buf, sizeof(buf), fp) != NULL) {
|
||||
buf[ strlen( buf ) - 1 ] = '\0'; /* remove trailing newline */
|
||||
if ( *buf != '\0' ) {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
|
||||
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
||||
|
|
@ -60,7 +61,7 @@ static LDAP *ld;
|
|||
#define T_NEWSUPSTR "newsuperior"
|
||||
|
||||
|
||||
static void usage LDAP_P(( const char *prog ));
|
||||
static void usage LDAP_P(( const char *prog )) LDAP_GCCATTR((noreturn));
|
||||
static int process_ldapmod_rec LDAP_P(( char *rbuf ));
|
||||
static int process_ldif_rec LDAP_P(( char *rbuf, int count ));
|
||||
static void addmodifyop LDAP_P(( LDAPMod ***pmodsp, int modop, char *attr,
|
||||
|
|
@ -251,6 +252,8 @@ main( int argc, char **argv )
|
|||
int deref = LDAP_DEREF_NEVER;
|
||||
ldap_set_option( ld, LDAP_OPT_DEREF, &deref);
|
||||
}
|
||||
/* don't chase referrals */
|
||||
ldap_set_option( ld, LDAP_OPT_REFERRALS, LDAP_OPT_OFF );
|
||||
|
||||
if (want_bindpw)
|
||||
passwd = getpass("Enter LDAP Password: ");
|
||||
|
|
@ -460,6 +463,7 @@ process_ldif_rec( char *rbuf, int count )
|
|||
goto end_line;
|
||||
} else if ( strcasecmp( type, T_MODOPREPLACESTR ) == 0 ) {
|
||||
modop = LDAP_MOD_REPLACE;
|
||||
addmodifyop( &pmods, modop, value, NULL, 0 );
|
||||
goto end_line;
|
||||
} else if ( strcasecmp( type, T_MODOPDELETESTR ) == 0 ) {
|
||||
modop = LDAP_MOD_DELETE;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
|
||||
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
||||
|
|
@ -32,7 +33,6 @@
|
|||
|
||||
static char *binddn = NULL;
|
||||
static char *passwd = NULL;
|
||||
static char *base = NULL;
|
||||
static char *ldaphost = NULL;
|
||||
static int ldapport = 0;
|
||||
static int not, verbose, contoper;
|
||||
|
|
@ -210,6 +210,9 @@ main(int argc, char **argv)
|
|||
int deref = LDAP_DEREF_NEVER;
|
||||
ldap_set_option( ld, LDAP_OPT_DEREF, &deref);
|
||||
}
|
||||
/* don't chase referrals */
|
||||
ldap_set_option( ld, LDAP_OPT_REFERRALS, LDAP_OPT_OFF );
|
||||
|
||||
|
||||
if (want_bindpw)
|
||||
passwd = getpass("Enter LDAP Password: ");
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
|
||||
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
||||
|
|
@ -68,7 +69,7 @@ Salt;
|
|||
|
||||
typedef struct hash_t
|
||||
{
|
||||
char *name;
|
||||
const char *name;
|
||||
unsigned int namesz;
|
||||
char *(*func) (const char *, Salt *);
|
||||
unsigned char takes_salt;
|
||||
|
|
@ -89,7 +90,7 @@ static int auto_gen_pw = 0;
|
|||
* pw_encode() essentially base64 encodes a password and its salt
|
||||
*/
|
||||
|
||||
char *
|
||||
static char *
|
||||
pw_encode (unsigned char *passwd, Salt * salt, unsigned int len)
|
||||
{
|
||||
int salted = salt && salt->salt && salt->len;
|
||||
|
|
@ -123,7 +124,7 @@ pw_encode (unsigned char *passwd, Salt * salt, unsigned int len)
|
|||
* if you'd like to write a better salt generator, please, be my guest.
|
||||
*/
|
||||
|
||||
void
|
||||
static void
|
||||
make_salt (Salt * salt, unsigned int len)
|
||||
{
|
||||
|
||||
|
|
@ -141,7 +142,7 @@ make_salt (Salt * salt, unsigned int len)
|
|||
* password generator
|
||||
*/
|
||||
|
||||
char *
|
||||
static char *
|
||||
gen_pass (unsigned int len)
|
||||
{
|
||||
static const unsigned char autogen[] =
|
||||
|
|
@ -160,7 +161,7 @@ gen_pass (unsigned int len)
|
|||
}
|
||||
|
||||
#ifdef SLAPD_CLEARTEXT
|
||||
char *
|
||||
static char *
|
||||
hash_none (const char *pw_in, Salt * salt)
|
||||
{
|
||||
return (strdup (pw_in));
|
||||
|
|
@ -168,7 +169,7 @@ hash_none (const char *pw_in, Salt * salt)
|
|||
#endif
|
||||
|
||||
#ifdef SLAPD_CRYPT
|
||||
char *
|
||||
static char *
|
||||
hash_crypt (const char *pw_in, Salt * salt)
|
||||
{
|
||||
static const unsigned char crypt64[] =
|
||||
|
|
@ -198,7 +199,7 @@ hash_crypt (const char *pw_in, Salt * salt)
|
|||
}
|
||||
#endif
|
||||
|
||||
char *
|
||||
static char *
|
||||
hash_md5 (const char *pw_in, Salt * salt)
|
||||
{
|
||||
lutil_MD5_CTX MD5context;
|
||||
|
|
@ -214,7 +215,7 @@ hash_md5 (const char *pw_in, Salt * salt)
|
|||
return (pw_encode (MD5digest, salt, sizeof (MD5digest)));
|
||||
}
|
||||
|
||||
char *
|
||||
static char *
|
||||
hash_sha1 (const char *pw_in, Salt * salt)
|
||||
{
|
||||
lutil_SHA1_CTX SHA1context;
|
||||
|
|
@ -230,7 +231,7 @@ hash_sha1 (const char *pw_in, Salt * salt)
|
|||
return (pw_encode (SHA1digest, salt, sizeof (SHA1digest)));
|
||||
}
|
||||
|
||||
static Hash hashes[] =
|
||||
static const Hash hashes[] =
|
||||
{
|
||||
#ifdef SLAPD_CLEARTEXT
|
||||
{"none", 4, hash_none, 0, HASHTYPE_NONE, HASHTYPE_NONE, 0},
|
||||
|
|
@ -245,7 +246,7 @@ static Hash hashes[] =
|
|||
{NULL, 0, NULL, 0, HASHTYPE_NONE, HASHTYPE_NONE, 0}
|
||||
};
|
||||
|
||||
int
|
||||
static int
|
||||
modify_dn (LDAP * ld, char *targetdn, char *pwattr, char *oldpw,
|
||||
char *newpw, HashTypes htype, Salt * salt)
|
||||
{
|
||||
|
|
@ -325,8 +326,8 @@ modify_dn (LDAP * ld, char *targetdn, char *pwattr, char *oldpw,
|
|||
return (ret);
|
||||
}
|
||||
|
||||
void
|
||||
usage (char *s)
|
||||
static void
|
||||
usage(const char *s)
|
||||
{
|
||||
fprintf (stderr, "Usage: %s [options] [filter]\n", s);
|
||||
fprintf (stderr, " -a attrib\tpassword attribute (default: " LDAP_PASSWD_ATTRIB ")\n");
|
||||
|
|
@ -623,6 +624,8 @@ main (int argc, char *argv[])
|
|||
int deref = LDAP_DEREF_NEVER;
|
||||
ldap_set_option( ld, LDAP_OPT_DEREF, &deref);
|
||||
}
|
||||
/* don't chase referrals */
|
||||
ldap_set_option( ld, LDAP_OPT_REFERRALS, LDAP_OPT_OFF );
|
||||
|
||||
if (version != -1 &&
|
||||
ldap_set_option( ld, LDAP_OPT_PROTOCOL_VERSION, &version ) != LDAP_OPT_SUCCESS )
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
|
||||
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
||||
|
|
@ -21,7 +22,7 @@
|
|||
#define DEFSEP "="
|
||||
|
||||
static void
|
||||
usage( char *s )
|
||||
usage( const char *s )
|
||||
{
|
||||
fprintf( stderr,
|
||||
"usage: %s [options] filter [attributes...]\nwhere:\n"
|
||||
|
|
@ -561,7 +562,8 @@ static int dosearch(
|
|||
}
|
||||
|
||||
|
||||
void print_entry(
|
||||
static void
|
||||
print_entry(
|
||||
LDAP *ld,
|
||||
LDAPMessage *entry,
|
||||
int attrsonly)
|
||||
|
|
@ -679,7 +681,7 @@ void print_entry(
|
|||
}
|
||||
|
||||
|
||||
int
|
||||
static int
|
||||
write_ldif( int type, char *name, char *value, ber_len_t vallen )
|
||||
{
|
||||
char *ldif;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# $OpenLDAP$
|
||||
|
||||
SRCS= main.c find.c mod.c print.c auth.c util.c help.c \
|
||||
string_to_key.c group.c edit.c globals.c
|
||||
XSRCS= version.c
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright (c) 1991, 1992 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
|
|
@ -294,17 +295,6 @@ auth( char *who, int implicit )
|
|||
#define FIVEMINS ( 5 * 60 )
|
||||
#define TGT "krbtgt"
|
||||
|
||||
static void
|
||||
str2upper( char *s )
|
||||
{
|
||||
char *p;
|
||||
|
||||
for ( p = s; *p != '\0'; ++p ) {
|
||||
*p = TOUPPER( (unsigned char) *p );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
valid_tgt( char **names )
|
||||
{
|
||||
|
|
@ -324,7 +314,7 @@ valid_tgt( char **names )
|
|||
/*
|
||||
* realm must be uppercase for krb_ routines
|
||||
*/
|
||||
str2upper( realm );
|
||||
ldap_pvt_str2upper( realm );
|
||||
#endif /* HAVE_AFS_KERBEROS */
|
||||
|
||||
/*
|
||||
|
|
@ -395,7 +385,7 @@ kinit( char *kname )
|
|||
/*
|
||||
* realm must be uppercase for krb_ routines
|
||||
*/
|
||||
str2upper( realm );
|
||||
ldap_pvt_str2upper( realm );
|
||||
#endif /* HAVE_AFS_KERBEROS */
|
||||
|
||||
rc = krb_get_in_tkt( name, inst, realm, TGT, realm,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright (c) 1994 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright (c) 1991, 1992, 1993
|
||||
* Regents of the University of Michigan. All rights reserved.
|
||||
|
|
@ -10,31 +11,30 @@
|
|||
* is provided ``as is'' without express or implied warranty.
|
||||
*/
|
||||
|
||||
#include "portable.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#ifndef __STDC__
|
||||
#include <memory.h>
|
||||
#endif
|
||||
|
||||
#include <ac/stdlib.h>
|
||||
|
||||
#include <ac/ctype.h>
|
||||
#include <ac/string.h>
|
||||
#include <ac/time.h>
|
||||
|
||||
#include <lber.h>
|
||||
#include <ldap.h>
|
||||
|
||||
#include "ud.h"
|
||||
|
||||
extern char *search_base; /* search base */
|
||||
extern int verbose; /* verbose mode flag */
|
||||
extern LDAP *ld; /* our ldap descriptor */
|
||||
|
||||
static int num_picked = 0; /* used when user picks entry at More prompt */
|
||||
|
||||
#ifdef DEBUG
|
||||
extern int debug; /* debug flag */
|
||||
#endif
|
||||
|
||||
vrfy(dn)
|
||||
char *dn;
|
||||
int
|
||||
vrfy( char *dn )
|
||||
{
|
||||
LDAPMessage *results;
|
||||
static char *attrs[2] = { "objectClass", NULL };
|
||||
int ld_errno = 0;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (debug & D_TRACE)
|
||||
|
|
@ -43,9 +43,12 @@ char *dn;
|
|||
/* verify that this DN exists in the directory */
|
||||
(void) ldap_search_s(ld, dn, LDAP_SCOPE_BASE, "objectClass=*", attrs, TRUE, &results);
|
||||
(void) ldap_msgfree(results);
|
||||
if ((ld->ld_errno == LDAP_NO_SUCH_OBJECT) || (ld->ld_errno == LDAP_INVALID_DN_SYNTAX))
|
||||
|
||||
ldap_get_option(ld, LDAP_OPT_ERROR_NUMBER, &ld_errno);
|
||||
|
||||
if ((ld_errno == LDAP_NO_SUCH_OBJECT) || (ld_errno == LDAP_INVALID_DN_SYNTAX))
|
||||
return(0);
|
||||
else if (ld->ld_errno == LDAP_SUCCESS)
|
||||
else if (ld_errno == LDAP_SUCCESS)
|
||||
return(1);
|
||||
else {
|
||||
ldap_perror(ld, "ldap_search");
|
||||
|
|
@ -54,11 +57,8 @@ char *dn;
|
|||
}
|
||||
|
||||
|
||||
static LDAPMessage * disambiguate( result, matches, read_attrs, who )
|
||||
LDAPMessage *result;
|
||||
int matches;
|
||||
char **read_attrs;
|
||||
char *who;
|
||||
static LDAPMessage *
|
||||
disambiguate( LDAPMessage *result, int matches, char **read_attrs, char *who )
|
||||
{
|
||||
int choice; /* entry that user chooses */
|
||||
int i;
|
||||
|
|
@ -66,18 +66,21 @@ char *who;
|
|||
char response[SMALL_BUF_SIZE]; /* results from user */
|
||||
char *name = NULL; /* DN to lookup */
|
||||
LDAPMessage *mp;
|
||||
extern void Free();
|
||||
int ld_errno = 0;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (debug & D_TRACE)
|
||||
printf("->disambiguate(%x, %d, %x, %s)\n", result, matches,
|
||||
read_attrs, who);
|
||||
#endif
|
||||
|
||||
ldap_get_option(ld, LDAP_OPT_ERROR_NUMBER, &ld_errno);
|
||||
|
||||
/*
|
||||
* If we are here, it means that we got back multiple answers.
|
||||
*/
|
||||
if ((ld->ld_errno == LDAP_TIMELIMIT_EXCEEDED)
|
||||
|| (ld->ld_errno == LDAP_SIZELIMIT_EXCEEDED)) {
|
||||
if ((ld_errno == LDAP_TIMELIMIT_EXCEEDED)
|
||||
|| (ld_errno == LDAP_SIZELIMIT_EXCEEDED)) {
|
||||
if (verbose) {
|
||||
printf(" Your query was too general and a limit was exceeded. The results listed\n");
|
||||
printf(" are not complete. You may want to try again with a more refined query.\n\n");
|
||||
|
|
@ -150,9 +153,8 @@ char *who;
|
|||
}
|
||||
}
|
||||
|
||||
LDAPMessage * find(who, quiet)
|
||||
char *who;
|
||||
int quiet;
|
||||
LDAPMessage *
|
||||
find( char *who, int quiet )
|
||||
{
|
||||
register int i, j, k; /* general ints */
|
||||
int matches; /* from ldap_count_entries() */
|
||||
|
|
@ -166,9 +168,6 @@ int quiet;
|
|||
char response[SMALL_BUF_SIZE];
|
||||
char *cp, *dn, **rdns;
|
||||
LDAPFiltInfo *fi;
|
||||
extern LDAPFiltDesc *lfdp; /* LDAP filter descriptor */
|
||||
extern struct attribute attrlist[]; /* complete list of attrs */
|
||||
extern void Free();
|
||||
|
||||
#ifdef DEBUG
|
||||
if (debug & D_TRACE)
|
||||
|
|
@ -203,39 +202,45 @@ int quiet;
|
|||
* here. If we don't find it, treat it as NOT a UFN.
|
||||
*/
|
||||
if (strchr(who, ',') != NULL) {
|
||||
int savederef;
|
||||
int savederef, deref;
|
||||
#ifdef DEBUG
|
||||
if (debug & D_FIND)
|
||||
printf("\"%s\" appears to be a UFN\n", who);
|
||||
#endif
|
||||
savederef = ld->ld_deref;
|
||||
ld->ld_deref = LDAP_DEREF_FINDING;
|
||||
ldap_get_option(ld, LDAP_OPT_DEREF, &savederef);
|
||||
deref = LDAP_DEREF_FINDING;
|
||||
ldap_set_option(ld, LDAP_OPT_DEREF, &deref);
|
||||
|
||||
if ((rc = ldap_ufn_search_s(ld, who, search_attrs, FALSE, &res)) !=
|
||||
LDAP_SUCCESS && rc != LDAP_SIZELIMIT_EXCEEDED &&
|
||||
rc != LDAP_TIMELIMIT_EXCEEDED) {
|
||||
ldap_perror(ld, "ldap_ufn_search_s");
|
||||
ld->ld_deref = savederef;
|
||||
ldap_set_option(ld, LDAP_OPT_DEREF, &savederef);
|
||||
return(NULL);
|
||||
}
|
||||
if ((matches = ldap_count_entries(ld, res)) < 0) {
|
||||
ldap_perror(ld, "ldap_count_entries");
|
||||
ld->ld_deref = savederef;
|
||||
ldap_set_option(ld, LDAP_OPT_DEREF, &savederef);
|
||||
return(NULL);
|
||||
} else if (matches == 1) {
|
||||
if (ldap_search_s(ld, ldap_get_dn(ld, ldap_first_entry(ld, res)), LDAP_SCOPE_BASE, "objectClass=*", read_attrs, FALSE, &res) != LDAP_SUCCESS) {
|
||||
if (ld->ld_errno == LDAP_UNAVAILABLE)
|
||||
printf(" Could not contact the X.500 server to find \"%s\".\n", who);
|
||||
dn = ldap_get_dn(ld, ldap_first_entry(ld, res));
|
||||
rc = ldap_search_s(ld, dn, LDAP_SCOPE_BASE, "objectClass=*", read_attrs, FALSE, &res);
|
||||
ldap_memfree(dn);
|
||||
if (rc != LDAP_SUCCESS) {
|
||||
int ld_errno = 0;
|
||||
ldap_get_option(ld, LDAP_OPT_ERROR_NUMBER, &ld_errno);
|
||||
if (ld_errno == LDAP_UNAVAILABLE)
|
||||
printf(" Could not contact the LDAP server to find \"%s\".\n", who);
|
||||
else
|
||||
ldap_perror(ld, "ldap_search_s");
|
||||
return(NULL);
|
||||
}
|
||||
ld->ld_deref = savederef;
|
||||
ldap_set_option(ld, LDAP_OPT_DEREF, &savederef);
|
||||
return(res);
|
||||
} else if (matches > 1 ) {
|
||||
return( disambiguate( ld, res, matches, read_attrs,
|
||||
who ) );
|
||||
return disambiguate( res, matches, read_attrs, who );
|
||||
}
|
||||
ld->ld_deref = savederef;
|
||||
ldap_set_option(ld, LDAP_OPT_DEREF, &savederef);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -287,7 +292,10 @@ int quiet;
|
|||
fflush(stdout);
|
||||
fetch_buffer(response, sizeof(response), stdin);
|
||||
if ((response[0] == 'n') || (response[0] == 'N'))
|
||||
{
|
||||
ldap_memfree(dn);
|
||||
return(NULL);
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG
|
||||
if (debug & D_FIND) {
|
||||
|
|
@ -306,9 +314,9 @@ int quiet;
|
|||
if (ldap_search_s(ld, dn, LDAP_SCOPE_BASE, "objectClass=*", read_attrs, FALSE, &res) != LDAP_SUCCESS) {
|
||||
ldap_perror(ld, "ldap_search_s");
|
||||
ldap_msgfree(res);
|
||||
return(NULL);
|
||||
res = NULL;
|
||||
}
|
||||
Free(dn);
|
||||
ldap_memfree(dn);
|
||||
return(res);
|
||||
}
|
||||
else if (matches > 0) {
|
||||
|
|
@ -322,8 +330,8 @@ int quiet;
|
|||
return(NULL);
|
||||
}
|
||||
|
||||
pick_one(i)
|
||||
int i;
|
||||
int
|
||||
pick_one( int i )
|
||||
{
|
||||
int n;
|
||||
char user_pick[SMALL_BUF_SIZE];
|
||||
|
|
@ -348,13 +356,10 @@ int i;
|
|||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
print_list(list, names, matches)
|
||||
LDAPMessage *list;
|
||||
char *names[];
|
||||
int *matches;
|
||||
void
|
||||
print_list( LDAPMessage *list, char **names, int *matches )
|
||||
{
|
||||
char **rdns, **cpp;
|
||||
extern int lpp;
|
||||
char resp[SMALL_BUF_SIZE];
|
||||
register LDAPMessage *ep;
|
||||
register int i = 1;
|
||||
|
|
@ -398,9 +403,8 @@ again:
|
|||
return;
|
||||
}
|
||||
|
||||
find_all_subscribers(sub, group)
|
||||
char *sub[];
|
||||
char *group;
|
||||
int
|
||||
find_all_subscribers( char **sub, char *group )
|
||||
{
|
||||
int count;
|
||||
LDAPMessage *result;
|
||||
|
|
@ -416,7 +420,9 @@ char *group;
|
|||
|
||||
sprintf(filter, "%s=%s", "memberOfGroup", group);
|
||||
if (ldap_search_s(ld, search_base, LDAP_SCOPE_SUBTREE, filter, attributes, FALSE, &result) != LDAP_SUCCESS) {
|
||||
if (ld->ld_errno == LDAP_NO_SUCH_ATTRIBUTE)
|
||||
int ld_errno = 0;
|
||||
ldap_get_option(ld, LDAP_OPT_ERROR_NUMBER, &ld_errno);
|
||||
if (ld_errno == LDAP_NO_SUCH_ATTRIBUTE)
|
||||
return(0);
|
||||
ldap_perror(ld, "ldap_search_s");
|
||||
return(0);
|
||||
|
|
@ -443,9 +449,8 @@ char *group;
|
|||
return(count);
|
||||
}
|
||||
|
||||
char * fetch_boolean_value(who, attr)
|
||||
char *who;
|
||||
struct attribute attr;
|
||||
char *
|
||||
fetch_boolean_value( char *who, struct attribute attr )
|
||||
{
|
||||
LDAPMessage *result; /* from the search below */
|
||||
register LDAPMessage *ep; /* entry pointer */
|
||||
|
|
@ -458,7 +463,9 @@ struct attribute attr;
|
|||
#endif
|
||||
attributes[0] = attr.quipu_name;
|
||||
if (ldap_search_s(ld, who, LDAP_SCOPE_BASE, "objectClass=*", attributes, FALSE, &result) != LDAP_SUCCESS) {
|
||||
if (ld->ld_errno == LDAP_NO_SUCH_ATTRIBUTE)
|
||||
int ld_errno = 0;
|
||||
ldap_get_option(ld, LDAP_OPT_ERROR_NUMBER, &ld_errno);
|
||||
if (ld_errno == LDAP_NO_SUCH_ATTRIBUTE)
|
||||
return("FALSE");
|
||||
ldap_perror(ld, "ldap_search_s");
|
||||
ldap_msgfree(result);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright (c) 1992, 1993, 1994 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
|
|
@ -10,15 +11,13 @@
|
|||
* is provided ``as is'' without express or implied warranty.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "ud.h"
|
||||
#include "portable.h"
|
||||
|
||||
extern void set_boolean(),
|
||||
change_field(),
|
||||
#ifdef UOFM
|
||||
set_updates(),
|
||||
#endif
|
||||
mod_addrDN();
|
||||
#include <stdio.h>
|
||||
#include <ac/time.h> /* portable.h+ldap.h needs time_t */
|
||||
#include <lber.h>
|
||||
#include <ldap.h>
|
||||
#include "ud.h"
|
||||
|
||||
struct attribute attrlist[] = {
|
||||
|
||||
|
|
@ -28,8 +27,8 @@ struct attribute attrlist[] = {
|
|||
* Field 3 = function used to modify this field (if any)
|
||||
* Field 4 = Flags specifying how this field is displayed
|
||||
*/
|
||||
{ "memberOfGroup", "Subscriptions", NULL, ATTR_FLAG_PERSON | ATTR_FLAG_READ | ATTR_FLAG_IS_A_DN },
|
||||
{ "acl", "Access Control", NULL, ATTR_FLAG_PERSON | ATTR_FLAG_GROUP | ATTR_FLAG_READ },
|
||||
{ "memberOfGroup", "Subscriptions", 0, ATTR_FLAG_PERSON | ATTR_FLAG_READ | ATTR_FLAG_IS_A_DN },
|
||||
{ "acl", "Access Control", 0, ATTR_FLAG_PERSON | ATTR_FLAG_GROUP | ATTR_FLAG_READ },
|
||||
{ "cn", "Aliases", change_field, ATTR_FLAG_PERSON | ATTR_FLAG_GROUP | ATTR_FLAG_READ | ATTR_FLAG_SEARCH | ATTR_FLAG_GROUP_MOD },
|
||||
{ "title", "Title", change_field, ATTR_FLAG_PERSON | ATTR_FLAG_READ | ATTR_FLAG_SEARCH | ATTR_FLAG_PERSON_MOD },
|
||||
{ "postalAddress", "Business address", change_field, ATTR_FLAG_PERSON | ATTR_FLAG_GROUP | ATTR_FLAG_READ | ATTR_FLAG_PERSON_MOD | ATTR_FLAG_GROUP_MOD | ATTR_FLAG_IS_MULTILINE },
|
||||
|
|
@ -38,18 +37,18 @@ struct attribute attrlist[] = {
|
|||
{ "member", "Members", mod_addrDN, ATTR_FLAG_GROUP | ATTR_FLAG_READ | ATTR_FLAG_IS_A_DN | ATTR_FLAG_GROUP_MOD },
|
||||
{ "homePhone", "Home phone", change_field, ATTR_FLAG_PERSON | ATTR_FLAG_READ | ATTR_FLAG_PERSON_MOD },
|
||||
{ "homePostalAddress", "Home address", change_field, ATTR_FLAG_PERSON | ATTR_FLAG_READ | ATTR_FLAG_PERSON_MOD | ATTR_FLAG_IS_MULTILINE },
|
||||
{ "objectClass", "Object class", NULL, ATTR_FLAG_PERSON | ATTR_FLAG_GROUP | ATTR_FLAG_READ | ATTR_FLAG_SEARCH },
|
||||
{ "objectClass", "Object class", 0, ATTR_FLAG_PERSON | ATTR_FLAG_GROUP | ATTR_FLAG_READ | ATTR_FLAG_SEARCH },
|
||||
#ifdef UOFM
|
||||
{ "multiLineDescription", "Description", change_field, ATTR_FLAG_PERSON | ATTR_FLAG_GROUP | ATTR_FLAG_READ | ATTR_FLAG_PERSON_MOD | ATTR_FLAG_GROUP_MOD | ATTR_FLAG_IS_MULTILINE },
|
||||
#endif
|
||||
#ifdef KERBEROS
|
||||
{ "krbName", "Kerberos name", NULL, ATTR_FLAG_PERSON | ATTR_FLAG_READ },
|
||||
#ifdef HAVE_KERBEROS
|
||||
{ "krbName", "Kerberos name", 0, ATTR_FLAG_PERSON | ATTR_FLAG_READ },
|
||||
#endif
|
||||
{ "description", "Brief description", NULL, ATTR_FLAG_PERSON | ATTR_FLAG_GROUP | ATTR_FLAG_READ },
|
||||
{ "description", "Brief description", 0, ATTR_FLAG_PERSON | ATTR_FLAG_GROUP | ATTR_FLAG_READ },
|
||||
{ "facsimileTelephoneNumber", "Fax number", change_field, ATTR_FLAG_PERSON | ATTR_FLAG_GROUP | ATTR_FLAG_READ | ATTR_FLAG_PERSON_MOD | ATTR_FLAG_GROUP_MOD },
|
||||
{ "pager", "Pager number", change_field, ATTR_FLAG_PERSON | ATTR_FLAG_READ | ATTR_FLAG_PERSON_MOD },
|
||||
{ "uid", "Uniqname", NULL, ATTR_FLAG_PERSON | ATTR_FLAG_GROUP | ATTR_FLAG_READ },
|
||||
{ "userPassword", "Password", NULL, ATTR_FLAG_PERSON | ATTR_FLAG_GROUP | ATTR_FLAG_READ },
|
||||
{ "uid", "Uniqname", 0, ATTR_FLAG_PERSON | ATTR_FLAG_GROUP | ATTR_FLAG_READ },
|
||||
{ "userPassword", "Password", 0, ATTR_FLAG_PERSON | ATTR_FLAG_GROUP | ATTR_FLAG_READ },
|
||||
#ifdef UOFM
|
||||
{ "noBatchUpdates", "No batch updates", set_updates, ATTR_FLAG_PERSON | ATTR_FLAG_READ | ATTR_FLAG_PERSON_MOD },
|
||||
#endif
|
||||
|
|
@ -65,7 +64,7 @@ struct attribute attrlist[] = {
|
|||
{ "onVacation", "On Vacation", set_boolean, ATTR_FLAG_PERSON | ATTR_FLAG_READ | ATTR_FLAG_PERSON_MOD | ATTR_FLAG_IS_A_BOOL },
|
||||
{ "vacationMessage", "Vacation Message", change_field, ATTR_FLAG_PERSON | ATTR_FLAG_READ | ATTR_FLAG_PERSON_MOD | ATTR_FLAG_IS_MULTILINE },
|
||||
{ "drink", "Favorite Beverage", change_field, ATTR_FLAG_PERSON | ATTR_FLAG_READ | ATTR_FLAG_PERSON_MOD },
|
||||
{ "lastModifiedBy", "Last modified by", NULL, ATTR_FLAG_GROUP | ATTR_FLAG_PERSON | ATTR_FLAG_IS_A_DN | ATTR_FLAG_READ },
|
||||
{ "lastModifiedTime", "Last modified at", NULL, ATTR_FLAG_GROUP | ATTR_FLAG_PERSON | ATTR_FLAG_READ | ATTR_FLAG_IS_A_DATE },
|
||||
{ NULL, NULL, NULL, ATTR_FLAG_NONE }
|
||||
{ "lastModifiedBy", "Last modified by", 0, ATTR_FLAG_GROUP | ATTR_FLAG_PERSON | ATTR_FLAG_IS_A_DN | ATTR_FLAG_READ },
|
||||
{ "lastModifiedTime", "Last modified at", 0, ATTR_FLAG_GROUP | ATTR_FLAG_PERSON | ATTR_FLAG_READ | ATTR_FLAG_IS_A_DATE },
|
||||
{ NULL, NULL, 0, ATTR_FLAG_NONE }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright (c) 1993, 1994 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright (c) 1992, 1993 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
|
||||
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright (c) 1991,1993 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
* Regents of the University of Michigan. All rights reserved.
|
||||
|
|
@ -10,27 +11,23 @@
|
|||
* is provided ``as is'' without express or implied warranty.
|
||||
*/
|
||||
|
||||
#include "portable.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#ifndef __STDC__
|
||||
#include <memory.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
|
||||
#include <ac/ctype.h>
|
||||
#include <ac/string.h>
|
||||
#include <ac/time.h>
|
||||
|
||||
#include <lber.h>
|
||||
#include <ldap.h>
|
||||
|
||||
#include "ud.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
extern int debug;
|
||||
#endif
|
||||
|
||||
struct entry Entry;
|
||||
extern LDAP *ld;
|
||||
|
||||
extern void * Malloc();
|
||||
extern void Free();
|
||||
extern char * my_ldap_dn2ufn();
|
||||
static char *time2text(char *ldtimestr, int dateonly);
|
||||
static long gtime(struct tm *tm);
|
||||
|
||||
/*
|
||||
* When displaying entries, display only these attributes, and in this
|
||||
|
|
@ -80,15 +77,14 @@ static char *group_attr_print_order[] = {
|
|||
NULL
|
||||
};
|
||||
|
||||
parse_answer(s)
|
||||
LDAPMessage *s;
|
||||
|
||||
void
|
||||
parse_answer( LDAPMessage *s )
|
||||
{
|
||||
int idx;
|
||||
char **rdns;
|
||||
BerElement *cookie;
|
||||
register LDAPMessage *ep;
|
||||
register char *ap;
|
||||
void clear_entry();
|
||||
|
||||
#ifdef DEBUG
|
||||
if (debug & D_TRACE)
|
||||
|
|
@ -102,6 +98,7 @@ LDAPMessage *s;
|
|||
printf(" Done clearing entry\n");
|
||||
#endif
|
||||
for (ep = ldap_first_entry(ld, s); ep != NULL; ep = ldap_next_entry(ld, ep)) {
|
||||
BerElement *cookie = NULL;
|
||||
#ifdef DEBUG
|
||||
if (debug & D_PARSE)
|
||||
printf(" Determining DN and name\n");
|
||||
|
|
@ -130,6 +127,10 @@ LDAPMessage *s;
|
|||
}
|
||||
add_value(&(Entry.attrs[idx]), ep, ap);
|
||||
}
|
||||
|
||||
if( cookie != NULL ) {
|
||||
ber_free( cookie, 0 );
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG
|
||||
if (debug & D_PARSE)
|
||||
|
|
@ -137,10 +138,8 @@ LDAPMessage *s;
|
|||
#endif
|
||||
}
|
||||
|
||||
add_value(attr, ep, ap)
|
||||
struct attribute *attr;
|
||||
LDAPMessage *ep;
|
||||
char *ap;
|
||||
void
|
||||
add_value( struct attribute *attr, LDAPMessage *ep, char *ap )
|
||||
{
|
||||
register int i = 0;
|
||||
char **vp, **tp, **avp;
|
||||
|
|
@ -185,13 +184,12 @@ char *ap;
|
|||
ldap_value_free(vp);
|
||||
}
|
||||
|
||||
print_an_entry()
|
||||
void
|
||||
print_an_entry( void )
|
||||
{
|
||||
int n = 0, i, idx;
|
||||
char is_a_group, **order;
|
||||
char *sub_list[MAX_VALUES], buf[SMALL_BUF_SIZE];
|
||||
extern int col_size, isaurl(), isadn();
|
||||
static char *time2text();
|
||||
|
||||
#ifdef DEBUG
|
||||
if (debug & D_TRACE)
|
||||
|
|
@ -277,8 +275,8 @@ print_an_entry()
|
|||
#define OUT_LABEL_LEN 20
|
||||
|
||||
/* prints the values associated with an attribute */
|
||||
print_values(A)
|
||||
struct attribute A;
|
||||
void
|
||||
print_values( struct attribute A )
|
||||
{
|
||||
register int i, k;
|
||||
register char *cp, **vp;
|
||||
|
|
@ -348,7 +346,7 @@ struct attribute A;
|
|||
putchar('\n');
|
||||
for (k = lead; k > 0; k--)
|
||||
putchar(' ');
|
||||
while (isspace(*(cp + 1)))
|
||||
while (isspace((unsigned char) cp[1]))
|
||||
cp++;
|
||||
}
|
||||
else
|
||||
|
|
@ -370,13 +368,12 @@ struct attribute A;
|
|||
}
|
||||
|
||||
/* prints the DN's associated with an attribute */
|
||||
print_DN(A)
|
||||
struct attribute A;
|
||||
void
|
||||
print_DN( struct attribute A )
|
||||
{
|
||||
int i, lead;
|
||||
register char **vp;
|
||||
char out_buf[MED_BUF_SIZE], *padding = NULL;
|
||||
extern int col_size;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (debug & D_TRACE)
|
||||
|
|
@ -407,10 +404,10 @@ struct attribute A;
|
|||
return;
|
||||
}
|
||||
|
||||
void clear_entry()
|
||||
void
|
||||
clear_entry( void )
|
||||
{
|
||||
register int i;
|
||||
extern struct attribute attrlist[];
|
||||
|
||||
#ifdef DEBUG
|
||||
if (debug & D_TRACE)
|
||||
|
|
@ -419,7 +416,7 @@ void clear_entry()
|
|||
printf(" Clearing entry \"%s\"\n", Entry.name);
|
||||
#endif
|
||||
if (Entry.DN != NULL)
|
||||
Free(Entry.DN);
|
||||
ldap_memfree(Entry.DN);
|
||||
if (Entry.name != NULL)
|
||||
Free(Entry.name);
|
||||
Entry.may_join = FALSE;
|
||||
|
|
@ -456,11 +453,10 @@ void clear_entry()
|
|||
}
|
||||
}
|
||||
|
||||
attr_to_index(s)
|
||||
char *s;
|
||||
int
|
||||
attr_to_index( char *s )
|
||||
{
|
||||
register int i;
|
||||
extern struct attribute attrlist[];
|
||||
|
||||
for (i = 0; attrlist[i].quipu_name != NULL; i++)
|
||||
if (!strcasecmp(s, attrlist[i].quipu_name))
|
||||
|
|
@ -468,11 +464,10 @@ char *s;
|
|||
return(-1);
|
||||
}
|
||||
|
||||
void initialize_attribute_strings()
|
||||
void
|
||||
initialize_attribute_strings( void )
|
||||
{
|
||||
register int i;
|
||||
extern struct entry Entry;
|
||||
extern struct attribute attrlist[];
|
||||
|
||||
for (i = 0; attrlist[i].quipu_name != NULL; i++)
|
||||
Entry.attrs[i].quipu_name = attrlist[i].quipu_name;
|
||||
|
|
@ -481,8 +476,8 @@ void initialize_attribute_strings()
|
|||
}
|
||||
|
||||
/* prints the URL/label pairs associated with an attribute */
|
||||
print_URL(A)
|
||||
struct attribute A;
|
||||
void
|
||||
print_URL( struct attribute A )
|
||||
{
|
||||
int i, lead;
|
||||
register char **vp;
|
||||
|
|
@ -516,25 +511,20 @@ struct attribute A;
|
|||
return;
|
||||
}
|
||||
|
||||
print_one_URL(s, label_lead, tag, url_lead)
|
||||
char *s;
|
||||
int label_lead;
|
||||
char *tag;
|
||||
int url_lead;
|
||||
void
|
||||
print_one_URL( char *s, int label_lead, char *tag, int url_lead )
|
||||
{
|
||||
register int i;
|
||||
char c, *cp, *url;
|
||||
extern int col_size;
|
||||
extern void Free();
|
||||
|
||||
for (cp = s; !isspace(*cp) && (*cp != '\0'); cp++)
|
||||
for (cp = s; !isspace((unsigned char)*cp) && (*cp != '\0'); cp++)
|
||||
;
|
||||
c = *cp;
|
||||
*cp = '\0';
|
||||
url = strdup(s);
|
||||
*cp = c;
|
||||
if (*cp != '\0') {
|
||||
for (cp++; isspace(*cp); cp++)
|
||||
for (cp++; isspace((unsigned char)*cp); cp++)
|
||||
;
|
||||
}
|
||||
else
|
||||
|
|
@ -547,7 +537,7 @@ int url_lead;
|
|||
}
|
||||
|
||||
|
||||
#define GET2BYTENUM( p ) (( *p - '0' ) * 10 + ( *(p+1) - '0' ))
|
||||
#define GET2BYTENUM( p ) (( *(p) - '0' ) * 10 + ( *((p)+1) - '0' ))
|
||||
|
||||
static char *
|
||||
time2text( char *ldtimestr, int dateonly )
|
||||
|
|
@ -555,21 +545,32 @@ time2text( char *ldtimestr, int dateonly )
|
|||
struct tm t;
|
||||
char *p, *timestr, zone, *fmterr = "badly formatted time";
|
||||
time_t gmttime;
|
||||
static long gtime();
|
||||
int ndigits;
|
||||
|
||||
memset( (char *)&t, 0, sizeof( struct tm ));
|
||||
if ( strlen( ldtimestr ) < 13 ) {
|
||||
return( fmterr );
|
||||
if (strlen( ldtimestr ) < 12 ) {
|
||||
return( fmterr );
|
||||
}
|
||||
|
||||
for ( ndigits=0; isdigit((unsigned char) ldtimestr[ndigits]); ndigits++) {
|
||||
; /* EMPTY */
|
||||
}
|
||||
|
||||
for ( p = ldtimestr; p - ldtimestr < 12; ++p ) {
|
||||
if ( !isdigit( *p )) {
|
||||
if ( ndigits != 12 && ndigits != 14) {
|
||||
return( fmterr );
|
||||
}
|
||||
}
|
||||
|
||||
memset( (char *)&t, 0, sizeof( struct tm ));
|
||||
|
||||
p = ldtimestr;
|
||||
|
||||
if( ndigits == 14) {
|
||||
/* came with a century */
|
||||
/* POSIX says tm_year should be year - 1900 */
|
||||
t.tm_year = 100 * GET2BYTENUM( p ) - 1900;
|
||||
p += 2;
|
||||
}
|
||||
t.tm_year = GET2BYTENUM( p ); p += 2;
|
||||
|
||||
t.tm_mon = GET2BYTENUM( p ) - 1; p += 2;
|
||||
t.tm_mday = GET2BYTENUM( p ); p += 2;
|
||||
t.tm_hour = GET2BYTENUM( p ); p += 2;
|
||||
|
|
@ -585,19 +586,16 @@ time2text( char *ldtimestr, int dateonly )
|
|||
|
||||
timestr[ strlen( timestr ) - 1 ] = zone; /* replace trailing newline */
|
||||
if ( dateonly ) {
|
||||
strcpy( timestr + 11, timestr + 20 );
|
||||
SAFEMEMCPY( timestr + 11, timestr + 20, strlen( timestr + 20 ) + 1 );
|
||||
}
|
||||
|
||||
Free ( ldtimestr );
|
||||
return( strdup( timestr ) );
|
||||
}
|
||||
|
||||
|
||||
/* gtime.c - inverse gmtime */
|
||||
|
||||
#if !defined( MACOS ) && !defined( _WIN32 ) && !defined( DOS )
|
||||
#include <sys/time.h>
|
||||
#endif /* !MACOS */
|
||||
#include <ac/time.h>
|
||||
|
||||
/* gtime(): the inverse of localtime().
|
||||
This routine was supplied by Mike Accetta at CMU many years ago.
|
||||
|
|
@ -610,11 +608,24 @@ int dmsize[] = {
|
|||
#define dysize(y) \
|
||||
(((y) % 4) ? 365 : (((y) % 100) ? 366 : (((y) % 400) ? 365 : 366)))
|
||||
|
||||
#define YEAR(y) ((y) >= 100 ? (y) : (y) + 1900)
|
||||
/*
|
||||
* Y2K YEAR
|
||||
*/
|
||||
/* per STDC & POSIX tm_year *should* be offset by 1900 */
|
||||
#define YEAR_POSIX(y) ((y) + 1900)
|
||||
|
||||
/*
|
||||
* year is < 1900, year is offset by 1900
|
||||
*/
|
||||
#define YEAR_CAREFUL(y) ((y) < 1900 ? (y) + 1900 : (y))
|
||||
|
||||
#define YEAR(y) YEAR_CAREFUL(y)
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
static long gtime ( struct tm *tm )
|
||||
static long
|
||||
gtime( struct tm *tm )
|
||||
{
|
||||
register int i,
|
||||
sec,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
#include "portable.h"
|
||||
|
||||
#if defined(HAVE_KERBEROS) && !defined(openbsd)
|
||||
|
|
|
|||
167
clients/ud/ud.h
167
clients/ud/ud.h
|
|
@ -1,3 +1,13 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1991, 1992, 1993
|
||||
* Regents of the University of Michigan. All rights reserved.
|
||||
|
|
@ -10,14 +20,7 @@
|
|||
* is provided ``as is'' without express or implied warranty.
|
||||
*/
|
||||
|
||||
#ifdef DOS
|
||||
#include "protoud.h"
|
||||
#define strncasecmp(a, b, n) strnicmp(a, b, n)
|
||||
#define strcasecmp(a, b) stricmp(a, b)
|
||||
#define MAX_VALUES 8
|
||||
#else
|
||||
#define MAX_VALUES 1000
|
||||
#endif /* end of DOS ifdef */
|
||||
|
||||
/*****************************************************************************
|
||||
**
|
||||
|
|
@ -35,7 +38,7 @@
|
|||
* parsing names.
|
||||
*/
|
||||
#define MAX_NAME_COMPS 8
|
||||
#define isnamesepartor(x) (isspace(x))
|
||||
#define isnamesepartor(x) (isspace((unsigned char) (x)))
|
||||
#define isignorechar(x) (((x) == '.') || ((x) == '_'))
|
||||
|
||||
/*
|
||||
|
|
@ -87,7 +90,7 @@
|
|||
/*
|
||||
* Authentication method we will be using.
|
||||
*/
|
||||
#ifdef KERBEROS
|
||||
#ifdef HAVE_KERBEROS
|
||||
#define UD_AUTH_METHOD LDAP_AUTH_KRBV4
|
||||
#else
|
||||
#define UD_AUTH_METHOD LDAP_AUTH_SIMPLE
|
||||
|
|
@ -136,6 +139,8 @@
|
|||
#define ATTR_FLAG_IS_A_BOOL 0x4000
|
||||
#define ATTR_FLAG_IS_MULTILINE 0x8000
|
||||
|
||||
LDAP_BEGIN_DECL
|
||||
|
||||
/*
|
||||
* These are the structures we use when parsing an answer we get from the LDAP
|
||||
* server.
|
||||
|
|
@ -143,7 +148,7 @@
|
|||
struct attribute {
|
||||
char *quipu_name;
|
||||
char *output_string;
|
||||
void (*mod_func)();
|
||||
void (*mod_func) LDAP_P(( char *who, int attr_idx ));
|
||||
unsigned short flags;
|
||||
int number_of_values;
|
||||
char **values;
|
||||
|
|
@ -156,3 +161,145 @@ struct entry {
|
|||
char *name;
|
||||
struct attribute attrs[MAX_ATTRS];
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Variables
|
||||
*/
|
||||
|
||||
/* in globals.c: */
|
||||
extern struct attribute attrlist[];/* complete list of attrs */
|
||||
/* in main.c: */
|
||||
extern char copyright[];
|
||||
extern char *default_bind_object;
|
||||
extern char *bound_dn;
|
||||
extern char *group_base;
|
||||
extern char *search_base; /* search base */
|
||||
extern int lpp;
|
||||
extern int verbose; /* verbose mode flag */
|
||||
extern int col_size;
|
||||
extern int bind_status;
|
||||
extern LDAP *ld; /* our ldap descriptor */
|
||||
extern LDAPFiltDesc *lfdp; /* LDAP filter descriptor */
|
||||
#ifdef DEBUG
|
||||
extern int debug; /* debug flag */
|
||||
#endif
|
||||
/* in print.c: */
|
||||
extern struct entry Entry;
|
||||
extern int dmsize[];
|
||||
/* in version.c: */
|
||||
extern char Version[];
|
||||
|
||||
|
||||
/*
|
||||
* Functions
|
||||
*/
|
||||
|
||||
/* in auth.c: */
|
||||
int auth LDAP_P(( char *who, int implicit ));
|
||||
#if defined(HAVE_KERBEROS) && defined(_AC_KRB_H)
|
||||
int krbgetpass LDAP_P(( char *u, char *in, char *re, char *pw, C_Block key ));
|
||||
void destroy_tickets LDAP_P(( void ));
|
||||
#endif
|
||||
|
||||
/* in edit.c: */
|
||||
void edit LDAP_P(( char *who ));
|
||||
|
||||
/* in find.c: */
|
||||
int vrfy LDAP_P(( char *dn ));
|
||||
LDAPMessage *find LDAP_P(( char *who, int quiet ));
|
||||
int pick_one LDAP_P(( int i ));
|
||||
void print_list LDAP_P(( LDAPMessage *list, char **names, int *matches ));
|
||||
int find_all_subscribers LDAP_P(( char **sub, char *group ));
|
||||
char *fetch_boolean_value LDAP_P(( char *who, struct attribute attr ));
|
||||
|
||||
/* in globals.c: */
|
||||
|
||||
/* in group.c: */
|
||||
void add_group LDAP_P(( char *name ));
|
||||
void remove_group LDAP_P(( char *name ));
|
||||
void x_group LDAP_P(( int action, char *name ));
|
||||
void bulk_load LDAP_P(( char *group ));
|
||||
void purge_group LDAP_P(( char *group ));
|
||||
void tidy_up LDAP_P(( void ));
|
||||
void mod_addrDN LDAP_P(( char *group, int offset ));
|
||||
int my_ldap_modify_s LDAP_P(( LDAP *ldap, char *group, LDAPMod **mods ));
|
||||
void list_groups LDAP_P(( char *who ));
|
||||
void list_memberships LDAP_P(( char *who ));
|
||||
|
||||
/* in help.c: */
|
||||
void print_help LDAP_P(( char *s ));
|
||||
|
||||
/* in main.c: */
|
||||
#ifdef DEBUG
|
||||
#endif
|
||||
|
||||
void do_commands LDAP_P(( void )) LDAP_GCCATTR((noreturn));
|
||||
void status LDAP_P(( void ));
|
||||
void change_base LDAP_P(( int type, char **base, char *s ));
|
||||
void initialize_client LDAP_P(( void ));
|
||||
RETSIGTYPE attn LDAP_P(( int sig ));
|
||||
#if !defined(NO_TERMCAP) && defined(TIOCGWINSZ)
|
||||
RETSIGTYPE chwinsz LDAP_P(( int sig ));
|
||||
#endif
|
||||
|
||||
/* in mod.c: */
|
||||
void modify LDAP_P(( char *who ));
|
||||
void change_field LDAP_P(( char *who, int attr_idx ));
|
||||
char *get_value LDAP_P(( char *id, char *prompt ));
|
||||
void set_boolean LDAP_P(( char *who, int attr_idx ));
|
||||
#ifdef UOFM
|
||||
void set_updates LDAP_P(( char *who, int dummy ));
|
||||
#endif
|
||||
void print_mod_list LDAP_P(( int group ));
|
||||
int perform_action LDAP_P(( char *choice, char *dn, int group ));
|
||||
void mod_perror LDAP_P(( LDAP *ld ));
|
||||
|
||||
/* in print.c: */
|
||||
void parse_answer LDAP_P(( LDAPMessage *s ));
|
||||
void add_value LDAP_P(( struct attribute *attr, LDAPMessage *ep, char *ap ));
|
||||
void print_an_entry LDAP_P(( void ));
|
||||
void print_values LDAP_P(( struct attribute A ));
|
||||
void print_DN LDAP_P(( struct attribute A ));
|
||||
void clear_entry LDAP_P(( void ));
|
||||
int attr_to_index LDAP_P(( char *s ));
|
||||
void initialize_attribute_strings LDAP_P(( void ));
|
||||
void print_URL LDAP_P(( struct attribute A ));
|
||||
void print_one_URL LDAP_P(( char *s, int l_lead, char *tag, int u_lead ));
|
||||
|
||||
/* in string_to_key.c: */
|
||||
#if defined(HAVE_KERBEROS) && !defined(openbsd) && defined(_AC_KRB_H)
|
||||
#if defined(HAVE_AFS_KERBEROS) || !defined(HAVE_KERBEROS_V)
|
||||
void des_string_to_key LDAP_P(( char *str, des_cblock *key ));
|
||||
#endif
|
||||
#if defined(HAVE_AFS_KERBEROS)
|
||||
void ka_StringToKey LDAP_P(( char *str, char *cell, des_cblock *key ));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* in util.c: */
|
||||
void printbase LDAP_P(( char *lead, char *s ));
|
||||
void fetch_buffer LDAP_P(( char *buffer, int length, FILE *where ));
|
||||
void fatal LDAP_P(( char *s )) LDAP_GCCATTR((noreturn));
|
||||
int isgroup LDAP_P(( void ));
|
||||
void format LDAP_P(( char *str, int width, int lead ));
|
||||
void format2 LDAP_P(( char *s, char *ft, char *t, int fi, int i, int w ));
|
||||
char *strip_ignore_chars LDAP_P(( char *cp ));
|
||||
char *code_to_str LDAP_P(( int i ));
|
||||
char *friendly_name LDAP_P(( char *s ));
|
||||
#ifdef UOFM
|
||||
int isauniqname LDAP_P(( char *s ));
|
||||
#endif
|
||||
int isadn LDAP_P(( char *s ));
|
||||
char *my_ldap_dn2ufn LDAP_P(( char *s ));
|
||||
int isaurl LDAP_P(( char *s ));
|
||||
int isadate LDAP_P(( char *s ));
|
||||
void *Malloc LDAP_P(( unsigned int size ));
|
||||
void Free LDAP_P(( void *ptr ));
|
||||
char *nextstr LDAP_P(( char *s ));
|
||||
void free_mod_struct LDAP_P(( LDAPMod *modp ));
|
||||
void StrFreeDup LDAP_P(( char **ptr, char *new_value ));
|
||||
int confirm_action LDAP_P(( char *msg ));
|
||||
|
||||
LDAP_END_DECL
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright (c) 1992, 1993 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
|
|
|
|||
88
configure.in
88
configure.in
|
|
@ -1,3 +1,4 @@
|
|||
dnl $OpenLDAP$
|
||||
dnl
|
||||
dnl Copyright 1998,1999 The OpenLDAP Foundation. All Rights Reserved.
|
||||
dnl
|
||||
|
|
@ -6,6 +7,18 @@ dnl as authorized by the OpenLDAP Public License. A copy of this
|
|||
dnl license is available at http://www.OpenLDAP.org/license.html or
|
||||
dnl in file LICENSE in the top-level directory of the distribution.
|
||||
dnl
|
||||
define([AC_INIT_BINSH],
|
||||
[[#! /bin/sh
|
||||
# $]OpenLDAP[$
|
||||
# from] translit([$OpenLDAP$], $")] [
|
||||
|
||||
# Copyright 1998,1999 The OpenLDAP Foundation. All Rights Reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms are permitted only
|
||||
# as authorized by the OpenLDAP Public License. A copy of this
|
||||
# license is available at http://www.OpenLDAP.org/license.html or
|
||||
# in file LICENSE in the top-level directory of the distribution.
|
||||
])dnl
|
||||
|
||||
dnl Disable config.cache!
|
||||
define([AC_CACHE_LOAD], )dnl
|
||||
|
|
@ -71,7 +84,7 @@ dnl ol_enable_syslog=no
|
|||
OL_ARG_ENABLE(syslog,[ --enable-syslog enable syslog support], auto)dnl
|
||||
OL_ARG_ENABLE(proctitle,[ --enable-proctitle enable proctitle support], yes)dnl
|
||||
OL_ARG_ENABLE(cache,[ --enable-cache enable caching], yes)dnl
|
||||
OL_ARG_ENABLE(dns,[ --enable-dns enable V2 DNS extension], no)dnl
|
||||
OL_ARG_ENABLE(dns,[ --enable-dns enable V2 DX Referrals extension], no)dnl
|
||||
OL_ARG_ENABLE(referrals,[ --enable-referrals enable V2 Referrals extension], yes)dnl
|
||||
OL_ARG_ENABLE(cldap,[ --enable-cldap enable connectionless ldap], no)dnl
|
||||
OL_ARG_ENABLE(x_compile,[ --enable-x-compile enable cross compiling],
|
||||
|
|
@ -80,17 +93,17 @@ OL_ARG_ENABLE(x_compile,[ --enable-x-compile enable cross compiling],
|
|||
dnl General "with" options
|
||||
OL_ARG_ENABLE(dmalloc,[ --enable-dmalloc enable debug malloc support], no)dnl
|
||||
|
||||
OL_ARG_WITH(cyrus_sasl,[ --with-cyrus-sasl with Cyrus SASL support],
|
||||
OL_ARG_WITH(cyrus_sasl,[ --with-cyrus-sasl with Cyrus SASL support],
|
||||
auto, [auto yes no] )
|
||||
OL_ARG_WITH(fetch,[ --with-fetch with fetch URL support],
|
||||
OL_ARG_WITH(fetch,[ --with-fetch with fetch URL support],
|
||||
auto, [auto yes no] )
|
||||
OL_ARG_WITH(kerberos,[ --with-kerberos with Kerberos support],
|
||||
auto, [auto k5 k4 afs yes no])
|
||||
OL_ARG_WITH(readline,[ --with-readline with readline support],
|
||||
OL_ARG_WITH(readline,[ --with-readline with readline support],
|
||||
auto, [auto yes no] )
|
||||
OL_ARG_WITH(threads,[ --with-threads use threads],
|
||||
auto, [auto posix mach lwp yes no manual] )
|
||||
OL_ARG_WITH(tls,[ --with-tls with TLS/SSL support],
|
||||
auto, [auto posix mach pth lwp yes no manual] )
|
||||
OL_ARG_WITH(tls,[ --with-tls with TLS/SSL support],
|
||||
auto, [auto ssleay openssl yes no] )
|
||||
OL_ARG_WITH(yielding_select,[ --with-yielding-select with implicitly yielding select],
|
||||
auto, [auto yes no manual] )
|
||||
|
|
@ -98,7 +111,7 @@ OL_ARG_WITH(yielding_select,[ --with-yielding-select with implicitly yielding s
|
|||
dnl Server options
|
||||
|
||||
dnl SLAPD OPTIONS
|
||||
AC_ARG_WITH(xxslapdoptions,[SLAPD Options:])
|
||||
AC_ARG_WITH(xxslapdoptions,[SLAPD (Standalone LDAP Daemon) Options:])
|
||||
OL_ARG_ENABLE(slapd,[ --enable-slapd enable building slapd], yes)dnl
|
||||
OL_ARG_ENABLE(cleartext,[ --enable-cleartext enable cleartext passwords], yes)dnl
|
||||
OL_ARG_ENABLE(crypt,[ --enable-crypt enable crypt(3) passwords], auto)dnl
|
||||
|
|
@ -107,6 +120,8 @@ OL_ARG_ENABLE(multimaster,[ --enable-multimaster enable multimaster replicati
|
|||
OL_ARG_ENABLE(phonetic,[ --enable-phonetic enable phonetic/soundex], no)dnl
|
||||
OL_ARG_ENABLE(quipu,[ --enable-quipu build quipu migration tools], no)dnl
|
||||
OL_ARG_ENABLE(rlookups,[ --enable-rlookups enable reverse lookups], auto)dnl
|
||||
OL_ARG_ENABLE(aci,[ --enable-aci enable per-object ACIs], no)dnl
|
||||
OL_ARG_ENABLE(discreteaci,[ --enable-discreteaci enable discrete rights in ACIs], no)dnl
|
||||
OL_ARG_ENABLE(wrappers,[ --enable-wrappers enable tcp wrapper support], no)dnl
|
||||
|
||||
dnl SLAPD Backend options
|
||||
|
|
@ -117,10 +132,10 @@ OL_ARG_ENABLE(ldap,[ --enable-ldap enable ldap backend], no)dnl
|
|||
OL_ARG_WITH(ldap_module,[ --with-ldap-module module type], static,
|
||||
[static dynamic])
|
||||
OL_ARG_ENABLE(ldbm,[ --enable-ldbm enable ldbm backend], yes)dnl
|
||||
OL_ARG_WITH(ldbm_module,[ --with-ldbm-module module type], static,
|
||||
[static dynamic])
|
||||
OL_ARG_WITH(ldbm_api,[ --with-ldbm-api use LDBM API], auto,
|
||||
[auto db2 db mdbm gdbm ndbm manual])
|
||||
OL_ARG_WITH(ldbm_module,[ --with-ldbm-module module type], static,
|
||||
[static dynamic])
|
||||
OL_ARG_WITH(ldbm_type,[ --with-ldbm-type use LDBM type], auto,
|
||||
[auto btree hash])
|
||||
|
||||
|
|
@ -138,7 +153,7 @@ OL_ARG_WITH(tcl_module,[ --with-tcl-module module type], static,
|
|||
[static dynamic])
|
||||
|
||||
dnl SLURPD OPTIONS
|
||||
AC_ARG_WITH(xxslurpdoptions,[SLURPD Options:])
|
||||
AC_ARG_WITH(xxslurpdoptions,[SLURPD (Replication Daemon) Options:])
|
||||
OL_ARG_ENABLE(slurpd,[ --enable-slurpd enable building slurpd], auto)dnl
|
||||
|
||||
AC_ARG_WITH(xxliboptions,[Library Generation & Linking Options])
|
||||
|
|
@ -199,6 +214,12 @@ if test $ol_enable_slapd = no ; then
|
|||
if test $ol_enable_rlookups = yes ; then
|
||||
AC_MSG_WARN([slapd disabled, ignoring --enable-rlookups argument])
|
||||
fi
|
||||
if test $ol_enable_aci = yes ; then
|
||||
AC_MSG_WARN([slapd disabled, ignoring --enable-aci argument])
|
||||
fi
|
||||
if test $ol_enable_discreteaci = yes ; then
|
||||
AC_MSG_WARN([slapd disabled, ignoring --enable-discreteaci argument])
|
||||
fi
|
||||
if test $ol_with_ldbm_api != auto ; then
|
||||
AC_MSG_WARN([slapd disabled, ignoring --with-ldbm-api argument])
|
||||
fi
|
||||
|
|
@ -244,6 +265,8 @@ if test $ol_enable_slapd = no ; then
|
|||
ol_enable_phonetic=no
|
||||
ol_enable_quipu=no
|
||||
ol_enable_rlookups=no
|
||||
ol_enable_aci=no
|
||||
ol_enable_discreteaci=no
|
||||
ol_enable_wrappers=no
|
||||
|
||||
ol_with_ldbm_api=no
|
||||
|
|
@ -387,7 +410,6 @@ dnl AC_PROG_INSTALL
|
|||
|
||||
AC_DEFINE(HAVE_MKVERSION, 1, [define this if you have mkversion])
|
||||
|
||||
|
||||
dnl
|
||||
dnl Determine which C translator to use
|
||||
dnl
|
||||
|
|
@ -583,7 +605,6 @@ AC_CHECK_HEADERS( \
|
|||
resolv.h \
|
||||
sgtty.h \
|
||||
shadow.h \
|
||||
stdarg.h \
|
||||
stddef.h \
|
||||
string.h \
|
||||
strings.h \
|
||||
|
|
@ -613,9 +634,7 @@ dnl -lsocket [ -lnsl_s | -lnsl ]
|
|||
dnl -linet
|
||||
|
||||
AC_CHECK_FUNC(socket, :, [
|
||||
dnl
|
||||
dnl hopefully we won't include too many libraries
|
||||
dnl
|
||||
AC_CHECK_LIB(socket, main)
|
||||
AC_CHECK_LIB(net, main)
|
||||
AC_CHECK_LIB(net, socket)
|
||||
|
|
@ -625,14 +644,19 @@ dnl
|
|||
AC_CHECK_LIB(gen, main)
|
||||
])
|
||||
|
||||
dnl require select
|
||||
AC_CHECK_FUNC(select, :, AC_MSG_ERROR([select() required.]))
|
||||
dnl AC_CHECK_FUNCS(socketpair)
|
||||
|
||||
dnl Select arg types
|
||||
dnl (if this detection becomes permenent, it and the select() detection
|
||||
dnl should be done before the yielding select test)
|
||||
AC_FUNC_SELECT_ARGTYPES
|
||||
|
||||
dnl check to see if system call automatically restart
|
||||
dnl AC_SYS_RESTARTABLE_SYSCALLS
|
||||
|
||||
dnl require POSIX regex
|
||||
AC_CHECK_HEADERS( regex.h )
|
||||
if test "$ac_cv_header_regex_h" != yes ; then
|
||||
AC_MSG_ERROR([POSIX regex.h required.])
|
||||
|
|
@ -644,7 +668,6 @@ if test "$ol_cv_c_posix_regex" = no ; then
|
|||
AC_MSG_ERROR([broken POSIX regex!])
|
||||
fi
|
||||
|
||||
|
||||
dnl HP-UX requires -lV3
|
||||
AC_CHECK_LIB(V3, sigset)
|
||||
|
||||
|
|
@ -849,7 +872,7 @@ ol_link_threads=no
|
|||
if test $ol_with_threads = auto -o $ol_with_threads = yes \
|
||||
-o $ol_with_threads = posix ; then
|
||||
|
||||
AC_CHECK_HEADERS(pthread.h sched.h)
|
||||
AC_CHECK_HEADERS(pthread.h)
|
||||
|
||||
if test $ac_cv_header_pthread_h = yes ; then
|
||||
OL_POSIX_THREAD_VERSION
|
||||
|
|
@ -868,6 +891,11 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
|
|||
ol_with_threads=found
|
||||
|
||||
OL_HEADER_LINUX_THREADS
|
||||
OL_HEADER_GNU_PTH_PTHREAD_H
|
||||
|
||||
if test $ol_cv_header_gnu_pth_pthread_h = no ; then
|
||||
AC_CHECK_HEADERS(sched.h)
|
||||
fi
|
||||
|
||||
dnl Now the hard part, how to link?
|
||||
dnl
|
||||
|
|
@ -1188,6 +1216,26 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
|
|||
fi
|
||||
fi
|
||||
|
||||
if test $ol_with_threads = auto -o $ol_with_threads = yes \
|
||||
-o $ol_with_threads = pth ; then
|
||||
|
||||
AC_CHECK_HEADERS(pth.h)
|
||||
|
||||
if test $ac_cv_header_pth_h = yes ; then
|
||||
AC_CHECK_LIB(pth, pth_version, [have_pth=yes], [have_pth=no])
|
||||
|
||||
if test $have_pth = yes ; then
|
||||
AC_DEFINE(HAVE_GNU_PTH,1,[if you have GNU Pth])
|
||||
LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
|
||||
ol_link_threads=pth
|
||||
|
||||
if test $ol_with_yielding_select = auto ; then
|
||||
ol_with_yielding_select=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $ol_with_threads = auto -o $ol_with_threads = yes \
|
||||
-o $ol_with_threads = lwp ; then
|
||||
|
||||
|
|
@ -1766,6 +1814,7 @@ AC_CHECK_FUNCS( \
|
|||
memcpy \
|
||||
memmove \
|
||||
mkstemp \
|
||||
pipe \
|
||||
read \
|
||||
recv \
|
||||
recvfrom \
|
||||
|
|
@ -1775,6 +1824,7 @@ AC_CHECK_FUNCS( \
|
|||
setsid \
|
||||
setuid \
|
||||
seteuid \
|
||||
sigaction \
|
||||
signal \
|
||||
sigset \
|
||||
snprintf \
|
||||
|
|
@ -1850,6 +1900,12 @@ fi
|
|||
if test "$ol_enable_rlookups" != no ; then
|
||||
AC_DEFINE(SLAPD_RLOOKUPS,1,[define to support reverse lookups])
|
||||
fi
|
||||
if test "$ol_enable_aci" != no ; then
|
||||
AC_DEFINE(SLAPD_ACI_ENABLED,1,[define to support per-object ACIs])
|
||||
fi
|
||||
if test "$ol_enable_discreteaci" != no ; then
|
||||
AC_DEFINE(SLAPD_ACI_DISCRETE_RIGHTS,1,[define to support discrete rights in ACIs])
|
||||
fi
|
||||
|
||||
if test "$ol_link_modules" != no ; then
|
||||
AC_DEFINE(SLAPD_MODULES,1,[define to support modules])
|
||||
|
|
|
|||
7
doc/Makefile.in
Normal file
7
doc/Makefile.in
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# $OpenLDAP$
|
||||
## Copyright 1998 The OpenLDAP Foundation, All Rights Reserved.
|
||||
## COPYING RESTRICTIONS APPLY, See COPYRIGHT file
|
||||
##
|
||||
## doc Makefile.in for OpenLDAP
|
||||
|
||||
SUBDIRS= man
|
||||
86
doc/man/man5/ldap.conf.5
Normal file
86
doc/man/man5/ldap.conf.5
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
.TH LDAP.CONF 5 "29 November 1998" "OpenLDAP LDVERSION"
|
||||
.UC 6
|
||||
.SH NAME
|
||||
ldap.conf \- ldap configuration file
|
||||
.SH SYNOPSIS
|
||||
ETCDIR/ldap.conf
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.I ldap.conf
|
||||
configuration file is used to set system-wide defaults to be applied when
|
||||
running
|
||||
.I ldap
|
||||
clients. If the environment variable \fBLDAPNOINIT\fP is defined, all
|
||||
defaulting is disabled.
|
||||
.LP
|
||||
Each user may specify an optional configuration file,
|
||||
.IR .ldaprc ,
|
||||
in his/her home directory which will be used to override the system-wide
|
||||
defaults file.
|
||||
.LP
|
||||
Additional configuration files can be specified using
|
||||
the \fBLDAPCONF\fP and \fBLDAPRC\fP environment variables.
|
||||
\fBLDAPCONF\fP may be set the path of a configuration file. This
|
||||
path can be absolute or relative to current working directory.
|
||||
The \fBLDAPRC\fP, if defined, should be a basename of a file
|
||||
in the current working directory or in the user's home directory.
|
||||
.LP
|
||||
Environmental variables may also be used to augment the file based defaults.
|
||||
The name of the option is the as listed but with a prefix of \fBLDAP\fP.
|
||||
For example, to define \fBBASE\fP via the environment, define the variable
|
||||
\fBLDAPBASE\fP to desired value.
|
||||
.SH OPTIONS
|
||||
The different configuration options are:
|
||||
.TP 1i
|
||||
\fBBASE <base>\fP
|
||||
Used to specify the default base dn to use when performing ldap operations.
|
||||
The base must be specified as a Distinguished Name in LDAP format.
|
||||
.TP 1i
|
||||
\fBHOST <name[:port] ...>\fP
|
||||
Used to specify the name(s) of an LDAP server(s) to which
|
||||
.I ldap
|
||||
library should connect to. Each server's name can be specified as a
|
||||
domain-style name or an IP address and optionally followed a ':' and
|
||||
the port number the ldap server is listening on. A space separated
|
||||
listed of host may be provided.
|
||||
.TP 1i
|
||||
\fBPORT <port>\fP
|
||||
Used to specify the port used with connecting to LDAP servers(s).
|
||||
The port may be specified as a number.
|
||||
.TP 1i
|
||||
\fBSIZELIMIT <integer>\fP
|
||||
Used to specify a size limit to use when performing searches. The
|
||||
number should be an non-negative integer. \fISIZELIMIT\fP of zero (0)
|
||||
specifies unlimited search size.
|
||||
.TP 1i
|
||||
\fBTIMELIMIT <integer>\fP
|
||||
Used to specify a time limit to use when performing searches. The
|
||||
number should be an non-negative integer. \fITIMELIMIT\fP of zero (0)
|
||||
specifies unlimited search time to be used.
|
||||
.TP 1i
|
||||
\fBDEREF <never|searching|finding|always>\fP
|
||||
Specify how aliases dereferencing is done. \fIDEREF\fP should
|
||||
be set to one of
|
||||
.B never,
|
||||
.B always,
|
||||
.B search,
|
||||
or
|
||||
.B find
|
||||
to specify that aliases are never dereferenced, always dereferenced,
|
||||
dereferenced when searching, or dereferenced only when locating the
|
||||
base object for the search. The default is to never dereference aliases.
|
||||
.SH FILES
|
||||
.I ETCDIR/ldap.conf
|
||||
.LP
|
||||
.I $HOME/.ldaprc
|
||||
.LP
|
||||
.I $CWD/.ldaprc
|
||||
.SH "SEE ALSO"
|
||||
ldap(3)
|
||||
.SH AUTHOR
|
||||
Kurt Zeilenga, The OpenLDAP Project
|
||||
.SH ACKNOWLEDGEMENTS
|
||||
.B OpenLDAP
|
||||
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
|
||||
.B OpenLDAP
|
||||
is derived from University of Michigan LDAP 3.3 Release.
|
||||
|
|
@ -1,16 +1,21 @@
|
|||
.TH SLAPD 8C "6 November 1995" "U-M LDAP LDVERSION"
|
||||
.TH SLAPD 8C "3 April 1999" "OpenLDAP LDVERSION"
|
||||
.SH NAME
|
||||
slapd \- Stand-alone LDAP Daemon
|
||||
.SH SYNOPSIS
|
||||
.B ETCDIR/slapd [\-d debug\-level]
|
||||
.B [\-f slapd\-config\-file] [\-p port\-number]
|
||||
.B [\-s syslog\-level] [\-i]
|
||||
.B LIBEXECDIR/slapd
|
||||
.B [\-f slapd\-config\-file]
|
||||
.B [\-h URLs]
|
||||
.B [\-d debug\-level]
|
||||
.B [\-p port\-number]
|
||||
.B [\-P tls\-port\-number]
|
||||
.B [\-s syslog\-level] [\-l syslog\-local\-user]
|
||||
.B [\-u user] [\-g group]
|
||||
.B
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
.B Slapd
|
||||
is the stand-alone LDAP daemon. It listens for LDAP connections on
|
||||
port 389, responding
|
||||
any number of ports (default 389), responding
|
||||
to the LDAP operations it receives over these connections.
|
||||
.B slapd
|
||||
is typically invoked at boot time, usually out of
|
||||
|
|
@ -18,10 +23,22 @@ is typically invoked at boot time, usually out of
|
|||
Upon startup,
|
||||
.B slapd
|
||||
normally forks and disassociates itself from the invoking tty.
|
||||
If configured in
|
||||
.BR ETCDIR/slapd.conf ,
|
||||
the
|
||||
.B slapd
|
||||
process will print its process ID ( see
|
||||
.BR getpid (2)
|
||||
) to a
|
||||
.B .pid
|
||||
file, as well as the command line options during invocation to an
|
||||
.B .args
|
||||
file ( see
|
||||
.BR slapd.conf (5)
|
||||
).
|
||||
If the
|
||||
.B \-d
|
||||
flag is given and debugging is set to some non-zero
|
||||
value,
|
||||
flag is given, even with a zero argument,
|
||||
.B slapd
|
||||
will not fork and disassociate from the invoking tty.
|
||||
.LP
|
||||
|
|
@ -41,7 +58,7 @@ See "The SLAPD and SLURPD Administrator's Guide" for more details on
|
|||
.BI \-d " debug\-level"
|
||||
Turn on debugging as defined by
|
||||
.I debug\-level.
|
||||
If this option is specified,
|
||||
If this option is specified, even with a zero argument,
|
||||
.B slapd
|
||||
will not fork or disassociate from the invoking terminal. Some general
|
||||
operation and status messages are printed for any value of \fIdebug\-level\fP.
|
||||
|
|
@ -55,21 +72,76 @@ at what level debugging statements should be logged to the
|
|||
.BR syslog (8)
|
||||
facility.
|
||||
.TP
|
||||
.BI \-l " syslog\-local\-user"
|
||||
Selects the local user of the
|
||||
.BR syslog (8)
|
||||
facility. Values can be
|
||||
.BR LOCAL0 ,
|
||||
.BR LOCAL1 ,
|
||||
and so on, up to
|
||||
.BR LOCAL7 .
|
||||
The default is
|
||||
.BR LOCAL4 .
|
||||
However, this option is only permitted on systems that support
|
||||
local users with the
|
||||
.BR syslog (8)
|
||||
facility.
|
||||
.TP
|
||||
.BI \-f " slapd\-config\-file"
|
||||
Specifies the slapd configuration file. The default is
|
||||
.BR ETCDIR/slapd.conf .
|
||||
.TP
|
||||
.BI \-h " URLlist"
|
||||
.B slapd
|
||||
will serve
|
||||
.B ldap:///
|
||||
(LDAP over TCP on all interfaces on default LDAP port). As such,
|
||||
it will bind to INADDR_ANY, port 389.
|
||||
The
|
||||
.B \-h
|
||||
option may be used to specify LDAP (and LDAPS) URLs to serve.
|
||||
For example, if slapd is given
|
||||
.B \-h " ldap://127.0.0.1:9009/ ldaps:///",
|
||||
It will bind 127.0.0.1:9009 for LDAP and INADDR_ANY:636 for LDAP over TLS.
|
||||
A space separated list of URLs is expected. The URLS should be of
|
||||
LDAP (ldap://) or, if supported, LDAP over TLS (ldaps://) type without
|
||||
a DN or other optional parameters. Hosts may be specified in either
|
||||
Internet '.' format (preferred) or by name. Ports, if specfied,
|
||||
must be numeric.
|
||||
.TP
|
||||
.BI \-p " port\-number"
|
||||
.B slapd
|
||||
will listen on the default LDAP port (389) unless this option is given
|
||||
to override the default.
|
||||
will use on the default port (389) for LDAP URLs unless this
|
||||
option is given to override the default.
|
||||
A numeric port number is expected.
|
||||
.TP
|
||||
.B \-i
|
||||
This option tells
|
||||
.BI \-P " tls\-port\-number"
|
||||
.B slapd
|
||||
that it is being run from
|
||||
.BR inetd(8) ,
|
||||
the Internet protocol daemon.
|
||||
will use on the default port (636) for LDAPS (LDAP over TLS) URLs
|
||||
unless this option is given to override the default. A numeric port
|
||||
number is expected.
|
||||
.TP
|
||||
.BI \-P " port\-number"
|
||||
Changes the port where
|
||||
.B slapd
|
||||
will expect LDAP over raw TLS connections. If this option is not given,
|
||||
the default port for this purpose (636) will be used. A numeric port
|
||||
number is expected.
|
||||
.TP
|
||||
.BI \-u " user"
|
||||
.B slapd
|
||||
will run slapd with the specified user name or id, and that user's
|
||||
supplementary group access list as set with initgroups(3). The group ID
|
||||
is also changed to this user's gid, unless the -g option is used to
|
||||
override.
|
||||
.TP
|
||||
.BI \-g " group"
|
||||
.B slapd
|
||||
will run with the specified group name or id.
|
||||
.LP
|
||||
Note that on some systems, running as a non-privileged user will prevent
|
||||
passwd back-ends from accessing the encrypted passwords. Note also that
|
||||
any shell back-ends will run as the specified non-privileged user.
|
||||
.SH EXAMPLES
|
||||
To start
|
||||
.I slapd
|
||||
|
|
@ -78,7 +150,7 @@ the LDAP databases defined in the default config file, just type:
|
|||
.LP
|
||||
.nf
|
||||
.ft tt
|
||||
ETCDIR/slapd
|
||||
LIBEXECDIR/slapd
|
||||
.ft
|
||||
.fi
|
||||
.LP
|
||||
|
|
@ -89,7 +161,7 @@ on voluminous debugging which will be printed on standard error, type:
|
|||
.LP
|
||||
.nf
|
||||
.ft tt
|
||||
ETCDIR/slapd -f /usr/local/slapd/slapd.conf -d 255
|
||||
LIBEXECDIR/slapd -f ETCDIR/slapd.conf -d 255
|
||||
.ft
|
||||
.fi
|
||||
.LP
|
||||
|
|
@ -102,3 +174,8 @@ on voluminous debugging which will be printed on standard error, type:
|
|||
.SH BUGS
|
||||
When using the LDBM database backend, the Modify RDN operation does not
|
||||
update the attribute values in the entry that are affected by the change.
|
||||
.SH ACKNOWLEDGEMENTS
|
||||
.B OpenLDAP
|
||||
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
|
||||
.B OpenLDAP
|
||||
is derived from University of Michigan LDAP 3.3 Release.
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
.TH SLURPD 8C "6 November 1995" "U-M LDAP LDVERSION"
|
||||
.TH SLURPD 8C "22 September 1998" "OpenLDAP LDVERSION"
|
||||
.SH NAME
|
||||
slurpd \- Standalone LDAP Update Replication Daemon
|
||||
.SH SYNOPSIS
|
||||
.B ETCDIR/slurpd [\-d debug\-level]
|
||||
.B LIBEXECDIR/slurpd [\-d debug\-level]
|
||||
.B [\-f slapd\-config\-file] [\-r slapd\-replog\-file]
|
||||
.B [\-t temp\-dir] [\-o] [\-k srvtab\-file]
|
||||
.B
|
||||
|
|
@ -62,7 +62,7 @@ for details on the standalone LDAP daemon.
|
|||
.BI \-d " debug\-level"
|
||||
Turn on debugging as defined by
|
||||
.I debug\-level.
|
||||
If this option is specified,
|
||||
If this option is specified, even with a zero argument,
|
||||
.B slurpd
|
||||
will not fork or disassociate from the invoking terminal. Some general
|
||||
operation and status messages are printed for any value of \fIdebug\-level\fP.
|
||||
|
|
@ -126,7 +126,7 @@ just type:
|
|||
.LP
|
||||
.nf
|
||||
.ft tt
|
||||
ETCDIR/slurpd
|
||||
LIBEXECDIR/slurpd
|
||||
.ft
|
||||
.fi
|
||||
.LP
|
||||
|
|
@ -139,7 +139,7 @@ on voluminous debugging which will be printed on standard error, type:
|
|||
.LP
|
||||
.nf
|
||||
.ft tt
|
||||
ETCDIR/slurpd -f /usr/local/etc/slapd.conf -d 255
|
||||
LIBEXECDIR/slurpd -f ETCDIR/slapd.conf -d 255
|
||||
.ft
|
||||
.fi
|
||||
.LP
|
||||
|
|
@ -149,3 +149,8 @@ on voluminous debugging which will be printed on standard error, type:
|
|||
.BR slapd (8)
|
||||
.LP
|
||||
"The SLAPD and SLURPD Administrator's Guide"
|
||||
.SH ACKNOWLEDGEMENTS
|
||||
.B OpenLDAP
|
||||
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
|
||||
.B OpenLDAP
|
||||
is derived from University of Michigan LDAP 3.3 Release.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# $OpenLDAP$
|
||||
## Copyright 1998 The OpenLDAP Foundation, All Rights Reserved.
|
||||
## COPYING RESTRICTIONS APPLY, See COPYRIGHT file
|
||||
##
|
||||
|
|
|
|||
36
include/ac/alloca.h
Normal file
36
include/ac/alloca.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/* Generic alloca.h */
|
||||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
|
||||
#ifndef _AC_ALLOCA_H
|
||||
#define _AC_ALLOCA_H
|
||||
|
||||
#error "alloca() not supported, use malloc()"
|
||||
|
||||
/* AIX requires this to be the first thing in the file. */
|
||||
#ifdef __GNUC__
|
||||
# define alloca __builtin_alloca
|
||||
#else
|
||||
# if HAVE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
# else
|
||||
# ifdef _AIX
|
||||
#pragma alloca
|
||||
# else
|
||||
# ifndef alloca /* predefined by HP cc +Olibcalls */
|
||||
extern char *(alloca)();
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _AC_ALLOCA_H */
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
/* Generic assert.h */
|
||||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
|
|
|
|||
66
include/ac/bytes.h
Normal file
66
include/ac/bytes.h
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
/* Generic bytes.h */
|
||||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
|
||||
#ifndef _AC_BYTES_H
|
||||
#define _AC_BYTES_H
|
||||
|
||||
/* cross compilers should define both AC_INT{2,4}_TYPE in CPPFLAGS */
|
||||
|
||||
#if !defined( AC_INT4_TYPE ) || !defined( AC_INT2_TYPE )
|
||||
/* use autoconf defines to provide sized typedefs */
|
||||
# if SIZEOF_LONG == 4
|
||||
# define AC_INT4_TYPE long
|
||||
# elif SIZEOF_INT == 4
|
||||
# define AC_INT4_TYPE int
|
||||
# else
|
||||
# error "AC_INT4_TYPE?"
|
||||
# endif
|
||||
|
||||
# if SIZEOF_SHORT == 2
|
||||
# define AC_INT2_TYPE short
|
||||
# elif SIZEOF_INT == 2
|
||||
# define AC_INT2_TYPE int
|
||||
# else
|
||||
# error "AC_INT2_TYPE?"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
typedef AC_INT4_TYPE ac_int4;
|
||||
typedef signed AC_INT4_TYPE ac_sint4;
|
||||
typedef unsigned AC_INT4_TYPE ac_uint4;
|
||||
|
||||
typedef AC_INT2_TYPE ac_int2;
|
||||
typedef signed AC_INT2_TYPE ac_sint2;
|
||||
typedef unsigned AC_INT2_TYPE ac_uint2;
|
||||
|
||||
#ifndef BYTE_ORDER
|
||||
/* cross compilers should define BYTE_ORDER in CPPFLAGS */
|
||||
|
||||
/*
|
||||
* Definitions for byte order, according to byte significance from low
|
||||
* address to high.
|
||||
*/
|
||||
#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax */
|
||||
#define BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */
|
||||
#define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */
|
||||
|
||||
/* assume autoconf's AC_C_BIGENDIAN has been ran */
|
||||
/* if it hasn't, we assume (maybe falsely) the order is LITTLE ENDIAN */
|
||||
# ifdef WORDS_BIGENDIAN
|
||||
# define BYTE_ORDER BIG_ENDIAN
|
||||
# else
|
||||
# define BYTE_ORDER LITTLE_ENDIAN
|
||||
# endif
|
||||
|
||||
#endif /* BYTE_ORDER */
|
||||
|
||||
#endif /* _AC_BYTES_H */
|
||||
29
include/ac/ctype.h
Normal file
29
include/ac/ctype.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/* Generic ctype.h */
|
||||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
|
||||
#ifndef _AC_CTYPE_H
|
||||
#define _AC_CTYPE_H
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#undef TOUPPER
|
||||
#undef TOLOWER
|
||||
|
||||
#ifdef C_UPPER_LOWER
|
||||
# define TOUPPER(c) (islower(c) ? toupper(c) : (c))
|
||||
# define TOLOWER(c) (isupper(c) ? tolower(c) : (c))
|
||||
#else
|
||||
# define TOUPPER(c) toupper(c)
|
||||
# define TOLOWER(c) tolower(c)
|
||||
#endif
|
||||
|
||||
#endif /* _AC_CTYPE_H */
|
||||
33
include/ac/dirent.h
Normal file
33
include/ac/dirent.h
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
/* Generic dirent.h */
|
||||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
|
||||
#ifndef _AC_DIRENT_H
|
||||
#define _AC_DIRENT_H
|
||||
|
||||
#if HAVE_DIRENT_H
|
||||
# include <dirent.h>
|
||||
# define NAMLEN(dirent) strlen((dirent)->d_name)
|
||||
#else
|
||||
# define dirent direct
|
||||
# define NAMLEN(dirent) (dirent)->d_namlen
|
||||
# if HAVE_SYS_NDIR_H
|
||||
# include <sys/ndir.h>
|
||||
# endif
|
||||
# if HAVE_SYS_DIR_H
|
||||
# include <sys/dir.h>
|
||||
# endif
|
||||
# if HAVE_NDIR_H
|
||||
# include <ndir.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* _AC_DIRENT_H */
|
||||
41
include/ac/errno.h
Normal file
41
include/ac/errno.h
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/* Generic errno.h */
|
||||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
|
||||
#ifndef _AC_ERRNO_H
|
||||
#define _AC_ERRNO_H
|
||||
|
||||
#if defined( HAVE_ERRNO_H )
|
||||
# include <errno.h>
|
||||
#elif defined( HAVE_SYS_ERRNO_H )
|
||||
# include <sys/errno.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SYS_ERRLIST
|
||||
/* no sys_errlist */
|
||||
# define sys_nerr 0
|
||||
# define sys_errlist ((char **)0)
|
||||
#elif DECL_SYS_ERRLIST
|
||||
/* have sys_errlist but need declaration */
|
||||
extern int sys_nerr;
|
||||
extern char *sys_errlist[];
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRERROR
|
||||
#define STRERROR(err) strerror(err)
|
||||
#else
|
||||
#define STRERROR(err) \
|
||||
((err) > -1 && (err) < sys_nerr ? sys_errlist[(err)] : "unknown")
|
||||
#endif
|
||||
|
||||
extern char* strerror_r();
|
||||
|
||||
#endif /* _AC_ERRNO_H */
|
||||
31
include/ac/krb.h
Normal file
31
include/ac/krb.h
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/* Generic krb.h */
|
||||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
|
||||
#ifndef _AC_KRB_H
|
||||
#define _AC_KRB_H
|
||||
|
||||
#if defined( HAVE_KERBEROS )
|
||||
|
||||
#if defined( HAVE_KERBEROSIV_KRB_H )
|
||||
#include <kerberosIV/krb.h>
|
||||
#elif defined( HAVE_KRB_H )
|
||||
#include <krb.h>
|
||||
#endif
|
||||
|
||||
#if defined( HAVE_KERBEROSIV_DES_H )
|
||||
#include <kerberosIV/des.h>
|
||||
#elif defined( HAVE_DES_H )
|
||||
#include <des.h>
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_KERBEROS */
|
||||
#endif /* _AC_KRB_H */
|
||||
36
include/ac/regex.h
Normal file
36
include/ac/regex.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/* Generic Regex */
|
||||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
#ifndef _AC_REGEX_H_
|
||||
#define _AC_REGEX_H_
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_REGEX_H
|
||||
/* NO POSIX REGEX!!
|
||||
you'll need to install a POSIX compatible REGEX library.
|
||||
Either Henry Spencer's or GNU regex will do.
|
||||
|
||||
For NT: http://people.delphi.com/gjc/hs_regex.html
|
||||
*/
|
||||
#error "No POSIX REGEX available."
|
||||
|
||||
#elif HAVE_GNUREGEX_H
|
||||
/* system has GNU gnuregex.h */
|
||||
# include <gnuregex.h>
|
||||
#else
|
||||
/* have regex.h, assume it's POSIX compliant */
|
||||
# include <regex.h>
|
||||
#endif /* regex.h */
|
||||
|
||||
#endif /* _AC_REGEX_H_ */
|
||||
29
include/ac/setproctitle.h
Normal file
29
include/ac/setproctitle.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/* Generic setproctitle.h */
|
||||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
|
||||
#ifndef _AC_SETPROCTITLE_H
|
||||
#define _AC_SETPROCTITLE_H
|
||||
|
||||
#ifdef LDAP_PROCTITLE
|
||||
|
||||
#if defined( HAVE_LIBUTIL_H )
|
||||
# include <libutil.h>
|
||||
#else
|
||||
/* use lutil version */
|
||||
LDAP_F(void) (setproctitle) LDAP_P((const char *fmt, ...)) \
|
||||
LDAP_GCCATTR((format(printf, 1, 2)));
|
||||
LDAP_F(int) Argc;
|
||||
LDAP_F(char) **Argv;
|
||||
#endif
|
||||
|
||||
#endif /* LDAP_PROCTITLE */
|
||||
#endif /* _AC_SETPROCTITLE_H */
|
||||
65
include/ac/signal.h
Normal file
65
include/ac/signal.h
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/* Generic signal.h */
|
||||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
|
||||
#ifndef _AC_SIGNAL_H
|
||||
#define _AC_SIGNAL_H
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#undef SIGNAL
|
||||
#ifdef HAVE_SIGSET
|
||||
#define SIGNAL sigset
|
||||
#else
|
||||
#define SIGNAL signal
|
||||
#endif
|
||||
|
||||
#if !defined( LDAP_SIGUSR1 ) || !defined( LDAP_SIGUSR2 )
|
||||
#undef LDAP_SIGUSR1
|
||||
#undef LDAP_SIGUSR2
|
||||
|
||||
# ifndef HAVE_LINUX_THREADS
|
||||
# define LDAP_SIGUSR1 SIGUSR1
|
||||
# define LDAP_SIGUSR2 SIGUSR2
|
||||
|
||||
# else
|
||||
/*
|
||||
LinuxThreads implemented unfortunately uses the only
|
||||
two signals reserved for user applications. This forces
|
||||
OpenLDAP to use, hopefullly unused, signals reserved
|
||||
for other uses.
|
||||
*/
|
||||
|
||||
# if defined( SIGSTKFLT )
|
||||
# define LDAP_SIGUSR1 SIGSTKFLT
|
||||
# elif defined ( SIGSYS )
|
||||
# define LDAP_SIGUSR1 SIGSYS
|
||||
# endif
|
||||
|
||||
# if defined( SIGUNUSED )
|
||||
# define LDAP_SIGUSR2 SIGUNUSED
|
||||
# elif defined ( SIGINFO )
|
||||
# define LDAP_SIGUSR2 SIGINFO
|
||||
# elif defined ( SIGEMT )
|
||||
# define LDAP_SIGUSR2 SIGEMT
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef LDAP_SIGCHLD
|
||||
#ifdef SIGCHLD
|
||||
#define LDAP_SIGCHLD SIGCHLD
|
||||
#elif SIGCLD
|
||||
#define LDAP_SIGCHLD SIGCLD
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* _AC_SIGNAL_H */
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
/*
|
||||
* Generic socket.h
|
||||
*/
|
||||
/* Generic socket.h */
|
||||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
|
|
@ -67,8 +66,15 @@
|
|||
#define MAXHOSTNAMELEN 64
|
||||
#endif
|
||||
|
||||
#undef sock_errno
|
||||
#undef sock_errstr
|
||||
#define sock_errno() errno
|
||||
#define sock_errstr(e) STRERROR(e)
|
||||
|
||||
#ifdef HAVE_WINSOCK
|
||||
# define tcp_close( s ) closesocket( s );
|
||||
# define tcp_close( s ) closesocket( s )
|
||||
# define tcp_read( s, buf, len ) recv( s, buf, len, 0 )
|
||||
# define tcp_write( s, buf, len ) send( s, buf, len, 0 )
|
||||
# define ioctl( s, c, a ) ioctlsocket( (s), (c), (a) )
|
||||
# define ioctl_t u_long
|
||||
# define AC_SOCKET_INVALID ((unsigned int) ~0)
|
||||
|
|
@ -77,15 +83,28 @@
|
|||
#define EINPROGRESS WSAEINPROGRESS
|
||||
#define ETIMEDOUT WSAETIMEDOUT
|
||||
|
||||
#undef sock_errno
|
||||
#undef sock_errstr
|
||||
#define sock_errno() WSAGetLastError()
|
||||
#define sock_errstr(e) WSAGetErrorString(e)
|
||||
|
||||
extern char* WSAGetErrorString LDAP_P((int));
|
||||
|
||||
#elif MACOS
|
||||
# define tcp_close( s ) tcpclose( s )
|
||||
# define tcp_read( s, buf, len ) tcpread( s, buf, len )
|
||||
# define tcp_write( s, buf, len ) tcpwrite( s, buf, len )
|
||||
|
||||
#elif DOS
|
||||
# ifdef PCNFS
|
||||
# define tcp_close( s ) close( s )
|
||||
# define tcp_read( s, buf, len ) recv( s, buf, len, 0 )
|
||||
# define tcp_write( s, buf, len ) send( s, buf, len, 0 )
|
||||
# endif /* PCNFS */
|
||||
# ifdef NCSA
|
||||
# define tcp_close( s ) do { netclose( s ); netshut() } while(0)
|
||||
# define tcp_read( s, buf, len ) nread( s, buf, len )
|
||||
# define tcp_write( s, buf, len ) netwrite( s, buf, len )
|
||||
# endif /* NCSA */
|
||||
|
||||
#elif HAVE_CLOSESOCKET
|
||||
|
|
@ -93,6 +112,17 @@
|
|||
|
||||
#else
|
||||
# define tcp_close( s ) close( s )
|
||||
# define tcp_read( s, buf, len) read( s, buf, len )
|
||||
# define tcp_write( s, buf, len) write( s, buf, len )
|
||||
|
||||
#ifdef HAVE_PIPE
|
||||
/*
|
||||
* Only use pipe() on systems where file and socket descriptors
|
||||
* are interchangable
|
||||
*/
|
||||
#define USE_PIPE HAVE_PIPE
|
||||
#endif
|
||||
|
||||
#endif /* MACOS */
|
||||
|
||||
#ifndef ioctl_t
|
||||
|
|
@ -102,6 +132,9 @@
|
|||
#ifndef AC_SOCKET_INVALID
|
||||
# define AC_SOCKET_INVALID (-1)
|
||||
#endif
|
||||
#ifndef AC_SOCKET_ERROR
|
||||
# define AC_SOCKET_ERROR (-1)
|
||||
#endif
|
||||
|
||||
#if !defined( HAVE_INET_ATON ) && !defined( inet_aton )
|
||||
#define inet_aton ldap_pvt_inet_aton
|
||||
|
|
|
|||
24
include/ac/stdarg.h
Normal file
24
include/ac/stdarg.h
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/* Generic stdarg.h */
|
||||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
|
||||
#ifndef _AC_STDARG_H
|
||||
#define _AC_STDARG_H 1
|
||||
|
||||
/* require STDC variable argument support */
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifndef HAVE_STDARG
|
||||
# define HAVE_STDARG 1
|
||||
#endif
|
||||
|
||||
#endif /* _AC_STDARG_H */
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
/* Generic stdlib.h */
|
||||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
|
|
|
|||
79
include/ac/string.h
Normal file
79
include/ac/string.h
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
/* Generic string.h */
|
||||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
|
||||
#ifndef _AC_STRING_H
|
||||
#define _AC_STRING_H
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
# include <string.h>
|
||||
|
||||
#else
|
||||
# ifdef HAVE_STRING_H
|
||||
# include <string.h>
|
||||
# elif HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
# endif
|
||||
|
||||
# ifdef HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
# endif
|
||||
|
||||
# ifndef HAVE_STRRCHR
|
||||
# undef strchr
|
||||
# define strchr index
|
||||
# undef strrchr
|
||||
# define strrchr rindex
|
||||
# endif
|
||||
|
||||
# ifndef HAVE_MEMCPY
|
||||
# undef memcpy
|
||||
# define memcpy(d, s, n) ((void) bcopy ((s), (d), (n)))
|
||||
# undef memmove
|
||||
# define memmove(d, s, n) ((void) bcopy ((s), (d), (n)))
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* use ldap_pvt_strtok instead of strtok or strtok_r! */
|
||||
LDAP_F(char *) ldap_pvt_strtok LDAP_P((
|
||||
char *str, const char *delim, char **pos ));
|
||||
|
||||
LDAP_F(char *) ldap_pvt_strdup LDAP_P((
|
||||
const char * s ));
|
||||
|
||||
#ifndef HAVE_STRDUP
|
||||
/* strdup() is missing, declare our own version */
|
||||
# undef strdup
|
||||
# define strdup(s) ldap_pvt_strdup(s)
|
||||
#else
|
||||
/* some systems fail to declare strdup */
|
||||
extern char *(strdup)();
|
||||
#endif
|
||||
|
||||
/*
|
||||
* some systems fail to declare strcasecmp() and strncasecmp()
|
||||
* we need them declared so we can obtain pointers to them
|
||||
*/
|
||||
extern int (strcasecmp)();
|
||||
extern int (strncasecmp)();
|
||||
|
||||
#ifndef SAFEMEMCPY
|
||||
# if defined( HAVE_MEMMOVE )
|
||||
# define SAFEMEMCPY( d, s, n ) memmove((d), (s), (n))
|
||||
# elif defined( HAVE_BCOPY )
|
||||
# define SAFEMEMCPY( d, s, n ) bcopy((s), (d), (n))
|
||||
# else
|
||||
/* nothing left but memcpy() */
|
||||
# define SAFEMEMCPY( d, s, n ) memcpy((d), (s), (n))
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* _AC_STRING_H */
|
||||
21
include/ac/sysexits.h
Normal file
21
include/ac/sysexits.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* Generic sysexits */
|
||||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
#ifndef _AC_SYSEXITS_H_
|
||||
#define _AC_SYSEXITS_H_
|
||||
|
||||
#ifdef HAVE_SYSEXITS_H
|
||||
# include <sysexits.h>
|
||||
#else
|
||||
# include <sysexits-compat.h>
|
||||
#endif
|
||||
|
||||
#endif /* _AC_SYSEXITS_H_ */
|
||||
33
include/ac/syslog.h
Normal file
33
include/ac/syslog.h
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
/* Generic syslog.h */
|
||||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
#ifndef _AC_SYSLOG_H_
|
||||
#define _AC_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 )
|
||||
#elif defined( LOG_NDELAY )
|
||||
# define OPENLOG_OPTIONS ( LOG_PID | LOG_NDELAY )
|
||||
#elif defined( LOG_NOWAIT )
|
||||
# define OPENLOG_OPTIONS ( LOG_PID | LOG_NOWAIT )
|
||||
#elif defined( LOG_PID )
|
||||
# define OPENLOG_OPTIONS ( LOG_PID )
|
||||
#else
|
||||
# define OPENLOG_OPTIONS ( 0 )
|
||||
#endif
|
||||
|
||||
#endif /* _AC_SYSLOG_H_ */
|
||||
46
include/ac/termios.h
Normal file
46
include/ac/termios.h
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
/* Generic termios.h */
|
||||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
|
||||
#ifndef _AC_TERMIOS_H
|
||||
#define _AC_TERMIOS_H
|
||||
|
||||
#ifdef HAVE_POSIX_TERMIOS
|
||||
#include <termios.h>
|
||||
|
||||
#ifdef GCWINSZ_IN_SYS_IOCTL
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#define TERMIO_TYPE struct termios
|
||||
#define TERMFLAG_TYPE tcflag_t
|
||||
#define GETATTR( fd, tiop ) tcgetattr((fd), (tiop))
|
||||
#define SETATTR( fd, tiop ) tcsetattr((fd), TCSANOW /* 0 */, (tiop))
|
||||
#define GETFLAGS( tio ) ((tio).c_lflag)
|
||||
#define SETFLAGS( tio, flags ) ((tio).c_lflag = (flags))
|
||||
|
||||
#elif defined( HAVE_SGTTY_H )
|
||||
#include <sgtty.h>
|
||||
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#define TERMIO_TYPE struct sgttyb
|
||||
#define TERMFLAG_TYPE int
|
||||
#define GETATTR( fd, tiop ) ioctl((fd), TIOCGETP, (caddr_t)(tiop))
|
||||
#define SETATTR( fd, tiop ) ioctl((fd), TIOCSETP, (caddr_t)(tiop))
|
||||
#define GETFLAGS( tio ) ((tio).sg_flags)
|
||||
#define SETFLAGS( tio, flags ) ((tio).sg_flags = (flags))
|
||||
|
||||
#endif /* HAVE_SGTTY_H */
|
||||
|
||||
#endif /* _AC_TERMIOS_H */
|
||||
28
include/ac/time.h
Normal file
28
include/ac/time.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/* Generic time.h */
|
||||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
|
||||
#ifndef _AC_TIME_H
|
||||
#define _AC_TIME_H
|
||||
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#elif HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# ifdef HAVE_SYS_TIMEB_H
|
||||
# include <sys/timeb.h>
|
||||
# endif
|
||||
#else
|
||||
# include <time.h>
|
||||
#endif
|
||||
|
||||
#endif /* _AC_TIME_H */
|
||||
65
include/ac/unistd.h
Normal file
65
include/ac/unistd.h
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/* Generic unistd.h */
|
||||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
|
||||
#ifndef _AC_UNISTD_H
|
||||
#define _AC_UNISTD_H
|
||||
|
||||
#if HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
/* crypt() may be defined in a separate include file */
|
||||
#if HAVE_CRYPT_H
|
||||
# include <crypt.h>
|
||||
#else
|
||||
extern char *(crypt)();
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETPASS
|
||||
LDAP_F(char*)(getpass) LDAP_P((const char *getpass));
|
||||
#else
|
||||
LDAP_F(char*)(getpass)();
|
||||
#endif
|
||||
|
||||
/* getopt() defines may be in separate include file */
|
||||
#if HAVE_GETOPT_H
|
||||
# include <getopt.h>
|
||||
|
||||
#elif !defined(HAVE_GETOPT)
|
||||
/* no getopt, assume we need getopt-compat.h */
|
||||
# include <getopt-compat.h>
|
||||
|
||||
#else
|
||||
/* assume we need to declare these externs */
|
||||
extern char *optarg;
|
||||
extern int optind, opterr, optopt;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_TEMPNAM
|
||||
LDAP_F(char *)(tempnam) LDAP_P((
|
||||
const char *tmpdir,
|
||||
const char *prefix));
|
||||
#endif
|
||||
#ifndef HAVE_MKTEMP
|
||||
LDAP_F(char *)(mktemp) LDAP_P((char *));
|
||||
#endif
|
||||
|
||||
/* use lutil file locking */
|
||||
#define ldap_lockf(x) lutil_lockf(x)
|
||||
#define ldap_unlockf(x) lutil_unlockf(x)
|
||||
#include <lutil_lockf.h>
|
||||
|
||||
#endif /* _AC_UNISTD_H */
|
||||
52
include/ac/wait.h
Normal file
52
include/ac/wait.h
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
/* Generic wait.h */
|
||||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
|
||||
#ifndef _AC_WAIT_H
|
||||
#define _AC_WAIT_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#if HAVE_SYS_WAIT_H
|
||||
# include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
#define LDAP_HI(s) (((s) >> 8) & 0377)
|
||||
#define LDAP_LO(s) ((s) & 0377)
|
||||
|
||||
/* These should work on non-POSIX UNIX platforms,
|
||||
all bets on off on non-POSIX non-UNIX platforms... */
|
||||
#ifndef WIFEXITED
|
||||
# define WIFEXITED(s) (LDAP_LO(s) == 0)
|
||||
#endif
|
||||
#ifndef WEXITSTATUS
|
||||
# define WEXITSTATUS(s) LDAP_HI(s)
|
||||
#endif
|
||||
#ifndef WIFSIGNALED
|
||||
# define WIFSIGNALED(s) (LDAP_LO(s) > 0 && LDAP_HI(s) == 0)
|
||||
#endif
|
||||
#ifndef WTERMSIG
|
||||
# define WTERMSIG(s) (LDAP_LO(s) & 0177)
|
||||
#endif
|
||||
#ifndef WIFSTOPPED
|
||||
# define WIFSTOPPED(s) (LDAP_LO(s) == 0177 && LDAP_HI(s) != 0)
|
||||
#endif
|
||||
#ifndef WSTOPSIG
|
||||
# define WSTOPSIG(s) LDAP_HI(s)
|
||||
#endif
|
||||
|
||||
#ifdef WCONTINUED
|
||||
# define WAIT_FLAGS ( WNOHANG | WUNTRACED | WCONTINUED )
|
||||
#else
|
||||
# define WAIT_FLAGS ( WNOHANG | WUNTRACED )
|
||||
#endif
|
||||
|
||||
#endif /* _AC_WAIT_H */
|
||||
|
|
@ -1,5 +1,14 @@
|
|||
/* avl.h - avl tree definitions */
|
||||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
/* Portions
|
||||
* Copyright (c) 1993 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
*
|
||||
|
|
@ -10,47 +19,90 @@
|
|||
* software without specific prior written permission. This software
|
||||
* is provided ``as is'' without express or implied warranty.
|
||||
*/
|
||||
/* avl.h - avl tree definitions */
|
||||
|
||||
|
||||
#ifndef _AVL
|
||||
#define _AVL
|
||||
|
||||
#include <ldap_cdefs.h>
|
||||
|
||||
/*
|
||||
* this structure represents a generic avl tree node.
|
||||
*/
|
||||
|
||||
typedef struct avlnode {
|
||||
caddr_t avl_data;
|
||||
char avl_bf;
|
||||
LDAP_BEGIN_DECL
|
||||
|
||||
typedef struct avlnode Avlnode;
|
||||
|
||||
#ifdef AVL_INTERNAL
|
||||
struct avlnode {
|
||||
void* avl_data;
|
||||
signed int avl_bf;
|
||||
struct avlnode *avl_left;
|
||||
struct avlnode *avl_right;
|
||||
} Avlnode;
|
||||
};
|
||||
|
||||
#define NULLAVL ((Avlnode *) NULL)
|
||||
|
||||
/* balance factor values */
|
||||
#define LH -1
|
||||
#define LH (-1)
|
||||
#define EH 0
|
||||
#define RH 1
|
||||
|
||||
/* avl routines */
|
||||
#define avl_getone(x) (x == 0 ? 0 : (x)->avl_data)
|
||||
#define avl_onenode(x) (x == 0 || ((x)->avl_left == 0 && (x)->avl_right == 0))
|
||||
extern int avl_insert();
|
||||
extern caddr_t avl_delete();
|
||||
extern caddr_t avl_find();
|
||||
extern caddr_t avl_getfirst();
|
||||
extern caddr_t avl_getnext();
|
||||
extern int avl_dup_error();
|
||||
extern int avl_apply();
|
||||
#define avl_getone(x) ((x) == 0 ? 0 : (x)->avl_data)
|
||||
#define avl_onenode(x) ((x) == 0 || ((x)->avl_left == 0 && (x)->avl_right == 0))
|
||||
|
||||
#endif /* AVL_INTERNALS */
|
||||
|
||||
typedef int (*AVL_APPLY) LDAP_P((void *, void*));
|
||||
typedef int (*AVL_CMP) LDAP_P((const void*, const void*));
|
||||
typedef int (*AVL_DUP) LDAP_P((void*, void*));
|
||||
typedef void (*AVL_FREE) LDAP_P((void*));
|
||||
|
||||
LDAP_F( int )
|
||||
avl_free LDAP_P(( Avlnode *root, AVL_FREE dfree ));
|
||||
|
||||
LDAP_F( int )
|
||||
avl_insert LDAP_P((Avlnode **, void*, AVL_CMP, AVL_DUP));
|
||||
|
||||
LDAP_F( void* )
|
||||
avl_delete LDAP_P((Avlnode **, void*, AVL_CMP));
|
||||
|
||||
LDAP_F( void* )
|
||||
avl_find LDAP_P((Avlnode *, const void*, AVL_CMP));
|
||||
|
||||
LDAP_F( void* )
|
||||
avl_find_lin LDAP_P((Avlnode *, const void*, AVL_CMP));
|
||||
|
||||
#ifdef AVL_NONREENTRANT
|
||||
LDAP_F( void* )
|
||||
avl_getfirst LDAP_P((Avlnode *));
|
||||
|
||||
LDAP_F( void* )
|
||||
avl_getnext LDAP_P((void));
|
||||
#endif
|
||||
|
||||
LDAP_F( int )
|
||||
avl_dup_error LDAP_P((void*, void*));
|
||||
|
||||
LDAP_F( int )
|
||||
avl_dup_ok LDAP_P((void*, void*));
|
||||
|
||||
LDAP_F( int )
|
||||
avl_apply LDAP_P((Avlnode *, AVL_APPLY, void*, int, int));
|
||||
|
||||
LDAP_F( int )
|
||||
avl_prefixapply LDAP_P((Avlnode *, void*, AVL_CMP, void*, AVL_CMP, void*, int));
|
||||
|
||||
/* apply traversal types */
|
||||
#define AVL_PREORDER 1
|
||||
#define AVL_INORDER 2
|
||||
#define AVL_POSTORDER 3
|
||||
/* what apply returns if it ran out of nodes */
|
||||
#define AVL_NOMORE -6
|
||||
#define AVL_NOMORE (-6)
|
||||
|
||||
typedef int (*IFP)();
|
||||
LDAP_END_DECL
|
||||
|
||||
#endif /* _AVL */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,14 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
/* Portions
|
||||
* Copyright (c) 1993, 1994 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
*
|
||||
|
|
@ -16,10 +26,9 @@
|
|||
#ifndef _DISPTMPL_H
|
||||
#define _DISPTMPL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include <ldap_cdefs.h>
|
||||
|
||||
LDAP_BEGIN_DECL
|
||||
|
||||
#define LDAP_TEMPLATE_VERSION 1
|
||||
|
||||
|
|
@ -123,16 +132,14 @@ struct ldap_tmplitem {
|
|||
};
|
||||
|
||||
|
||||
#define NULLTMPLITEM ((struct ldap_tmplitem *)0)
|
||||
|
||||
#define LDAP_SET_TMPLITEM_APPDATA( ti, datap ) \
|
||||
(ti)->ti_appdata = (void *)(datap)
|
||||
( (ti)->ti_appdata = (void *)(datap) )
|
||||
|
||||
#define LDAP_GET_TMPLITEM_APPDATA( ti, type ) \
|
||||
(type)((ti)->ti_appdata)
|
||||
( (type)((ti)->ti_appdata) )
|
||||
|
||||
#define LDAP_IS_TMPLITEM_OPTION_SET( ti, option ) \
|
||||
(((ti)->ti_options & option ) != 0 )
|
||||
( ((ti)->ti_options & (option) ) != 0 )
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -143,8 +150,6 @@ struct ldap_oclist {
|
|||
struct ldap_oclist *oc_next;
|
||||
};
|
||||
|
||||
#define NULLOCLIST ((struct ldap_oclist *)0)
|
||||
|
||||
|
||||
/*
|
||||
* add defaults list
|
||||
|
|
@ -158,8 +163,6 @@ struct ldap_adddeflist {
|
|||
struct ldap_adddeflist *ad_next;
|
||||
};
|
||||
|
||||
#define NULLADLIST ((struct ldap_adddeflist *)0)
|
||||
|
||||
|
||||
/*
|
||||
* display template global options
|
||||
|
|
@ -199,16 +202,14 @@ struct ldap_disptmpl {
|
|||
struct ldap_disptmpl *dt_next;
|
||||
};
|
||||
|
||||
#define NULLDISPTMPL ((struct ldap_disptmpl *)0)
|
||||
|
||||
#define LDAP_SET_DISPTMPL_APPDATA( dt, datap ) \
|
||||
(dt)->dt_appdata = (void *)(datap)
|
||||
( (dt)->dt_appdata = (void *)(datap) )
|
||||
|
||||
#define LDAP_GET_DISPTMPL_APPDATA( dt, type ) \
|
||||
(type)((dt)->dt_appdata)
|
||||
( (type)((dt)->dt_appdata) )
|
||||
|
||||
#define LDAP_IS_DISPTMPL_OPTION_SET( dt, option ) \
|
||||
(((dt)->dt_options & option ) != 0 )
|
||||
( ((dt)->dt_options & (option) ) != 0 )
|
||||
|
||||
#define LDAP_TMPL_ERR_VERSION 1
|
||||
#define LDAP_TMPL_ERR_MEM 2
|
||||
|
|
@ -221,110 +222,96 @@ struct ldap_disptmpl {
|
|||
#define LDAP_DTMPL_BUFSIZ 8192
|
||||
|
||||
|
||||
#ifndef NEEDPROTOS
|
||||
typedef int (*ldap_writeptype) LDAP_P((
|
||||
void *writeparm, char *p, ber_len_t len ));
|
||||
|
||||
typedef int (*writeptype)();
|
||||
LDAP_F( int )
|
||||
ldap_init_templates LDAP_P(( char *file, struct ldap_disptmpl **tmpllistp ));
|
||||
|
||||
int ldap_init_templates();
|
||||
int ldap_init_templates_buf();
|
||||
void ldap_free_templates();
|
||||
struct ldap_disptmpl *ldap_first_disptmpl();
|
||||
struct ldap_disptmpl *ldap_next_disptmpl();
|
||||
struct ldap_disptmpl *ldap_name2template();
|
||||
struct ldap_disptmpl *ldap_oc2template();
|
||||
char **ldap_tmplattrs();
|
||||
struct ldap_tmplitem *ldap_first_tmplrow();
|
||||
struct ldap_tmplitem *ldap_next_tmplrow();
|
||||
struct ldap_tmplitem *ldap_first_tmplcol();
|
||||
struct ldap_tmplitem *ldap_next_tmplcol();
|
||||
int ldap_entry2text_search();
|
||||
int ldap_entry2text();
|
||||
int ldap_vals2text();
|
||||
int ldap_entry2html_search();
|
||||
int ldap_entry2html();
|
||||
int ldap_vals2html();
|
||||
LDAP_F( int )
|
||||
ldap_init_templates_buf LDAP_P(( char *buf,
|
||||
ber_len_t buflen,
|
||||
struct ldap_disptmpl **tmpllistp ));
|
||||
|
||||
#else /* !NEEDPROTOS */
|
||||
LDAP_F( void )
|
||||
ldap_free_templates LDAP_P(( struct ldap_disptmpl *tmpllist ));
|
||||
|
||||
typedef int (*writeptype)( void *writeparm, char *p, int len );
|
||||
LDAP_F( struct ldap_disptmpl * )
|
||||
ldap_first_disptmpl LDAP_P(( struct ldap_disptmpl *tmpllist ));
|
||||
|
||||
LDAPFUNCDECL int
|
||||
ldap_init_templates( char *file, struct ldap_disptmpl **tmpllistp );
|
||||
LDAP_F( struct ldap_disptmpl * )
|
||||
ldap_next_disptmpl LDAP_P(( struct ldap_disptmpl *tmpllist,
|
||||
struct ldap_disptmpl *tmpl ));
|
||||
|
||||
LDAPFUNCDECL int
|
||||
ldap_init_templates_buf( char *buf, long buflen,
|
||||
struct ldap_disptmpl **tmpllistp );
|
||||
LDAP_F( struct ldap_disptmpl * )
|
||||
ldap_name2template LDAP_P(( char *name,
|
||||
struct ldap_disptmpl *tmpllist ));
|
||||
|
||||
LDAPFUNCDECL void
|
||||
ldap_free_templates( struct ldap_disptmpl *tmpllist );
|
||||
LDAP_F( struct ldap_disptmpl * )
|
||||
ldap_oc2template LDAP_P(( char **oclist,
|
||||
struct ldap_disptmpl *tmpllist ));
|
||||
|
||||
LDAPFUNCDECL struct ldap_disptmpl *
|
||||
ldap_first_disptmpl( struct ldap_disptmpl *tmpllist );
|
||||
LDAP_F( char ** )
|
||||
ldap_tmplattrs LDAP_P(( struct ldap_disptmpl *tmpl,
|
||||
char **includeattrs,
|
||||
int exclude,
|
||||
unsigned long syntaxmask ));
|
||||
|
||||
LDAPFUNCDECL struct ldap_disptmpl *
|
||||
ldap_next_disptmpl( struct ldap_disptmpl *tmpllist,
|
||||
struct ldap_disptmpl *tmpl );
|
||||
LDAP_F( struct ldap_tmplitem * )
|
||||
ldap_first_tmplrow LDAP_P(( struct ldap_disptmpl *tmpl ));
|
||||
|
||||
LDAPFUNCDECL struct ldap_disptmpl *
|
||||
ldap_name2template( char *name, struct ldap_disptmpl *tmpllist );
|
||||
LDAP_F( struct ldap_tmplitem * )
|
||||
ldap_next_tmplrow LDAP_P(( struct ldap_disptmpl *tmpl,
|
||||
struct ldap_tmplitem *row ));
|
||||
|
||||
LDAPFUNCDECL struct ldap_disptmpl *
|
||||
ldap_oc2template( char **oclist, struct ldap_disptmpl *tmpllist );
|
||||
LDAP_F( struct ldap_tmplitem * )
|
||||
ldap_first_tmplcol LDAP_P(( struct ldap_disptmpl *tmpl,
|
||||
struct ldap_tmplitem *row ));
|
||||
|
||||
LDAPFUNCDECL char **
|
||||
ldap_tmplattrs( struct ldap_disptmpl *tmpl, char **includeattrs, int exclude,
|
||||
unsigned long syntaxmask );
|
||||
LDAP_F( struct ldap_tmplitem * )
|
||||
ldap_next_tmplcol LDAP_P(( struct ldap_disptmpl *tmpl,
|
||||
struct ldap_tmplitem *row,
|
||||
struct ldap_tmplitem *col ));
|
||||
|
||||
LDAPFUNCDECL struct ldap_tmplitem *
|
||||
ldap_first_tmplrow( struct ldap_disptmpl *tmpl );
|
||||
|
||||
LDAPFUNCDECL struct ldap_tmplitem *
|
||||
ldap_next_tmplrow( struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row );
|
||||
|
||||
LDAPFUNCDECL struct ldap_tmplitem *
|
||||
ldap_first_tmplcol( struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row );
|
||||
|
||||
LDAPFUNCDECL struct ldap_tmplitem *
|
||||
ldap_next_tmplcol( struct ldap_disptmpl *tmpl, struct ldap_tmplitem *row,
|
||||
struct ldap_tmplitem *col );
|
||||
|
||||
LDAPFUNCDECL int
|
||||
ldap_entry2text( LDAP *ld, char *buf, LDAPMessage *entry,
|
||||
LDAP_F( int )
|
||||
ldap_entry2text LDAP_P(( LDAP *ld,
|
||||
char *buf, LDAPMessage *entry,
|
||||
struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals,
|
||||
writeptype writeproc, void *writeparm, char *eol, int rdncount,
|
||||
unsigned long opts );
|
||||
ldap_writeptype writeproc, void *writeparm, char *eol, int rdncount,
|
||||
unsigned long opts ));
|
||||
|
||||
LDAPFUNCDECL int
|
||||
ldap_vals2text( LDAP *ld, char *buf, char **vals, char *label, int labelwidth,
|
||||
unsigned long syntaxid, writeptype writeproc, void *writeparm,
|
||||
char *eol, int rdncount );
|
||||
LDAP_F( int )
|
||||
ldap_vals2text LDAP_P(( LDAP *ld,
|
||||
char *buf, char **vals, char *label, int labelwidth,
|
||||
unsigned long syntaxid, ldap_writeptype writeproc, void *writeparm,
|
||||
char *eol, int rdncount ));
|
||||
|
||||
LDAPFUNCDECL int
|
||||
ldap_entry2text_search( LDAP *ld, char *dn, char *base, LDAPMessage *entry,
|
||||
LDAP_F( int )
|
||||
ldap_entry2text_search LDAP_P(( LDAP *ld,
|
||||
char *dn, char *base, LDAPMessage *entry,
|
||||
struct ldap_disptmpl *tmpllist, char **defattrs, char ***defvals,
|
||||
writeptype writeproc, void *writeparm, char *eol, int rdncount,
|
||||
unsigned long opts );
|
||||
ldap_writeptype writeproc, void *writeparm, char *eol, int rdncount,
|
||||
unsigned long opts ));
|
||||
|
||||
LDAPFUNCDECL int
|
||||
ldap_entry2html( LDAP *ld, char *buf, LDAPMessage *entry,
|
||||
LDAP_F( int )
|
||||
ldap_entry2html LDAP_P(( LDAP *ld,
|
||||
char *buf, LDAPMessage *entry,
|
||||
struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals,
|
||||
writeptype writeproc, void *writeparm, char *eol, int rdncount,
|
||||
unsigned long opts, char *urlprefix, char *base );
|
||||
ldap_writeptype writeproc, void *writeparm, char *eol, int rdncount,
|
||||
unsigned long opts, char *urlprefix, char *base ));
|
||||
|
||||
LDAPFUNCDECL int
|
||||
ldap_vals2html( LDAP *ld, char *buf, char **vals, char *label, int labelwidth,
|
||||
unsigned long syntaxid, writeptype writeproc, void *writeparm,
|
||||
char *eol, int rdncount, char *urlprefix );
|
||||
LDAP_F( int )
|
||||
ldap_vals2html LDAP_P(( LDAP *ld,
|
||||
char *buf, char **vals, char *label, int labelwidth,
|
||||
unsigned long syntaxid, ldap_writeptype writeproc, void *writeparm,
|
||||
char *eol, int rdncount, char *urlprefix ));
|
||||
|
||||
LDAPFUNCDECL int
|
||||
ldap_entry2html_search( LDAP *ld, char *dn, char *base, LDAPMessage *entry,
|
||||
LDAP_F( int )
|
||||
ldap_entry2html_search LDAP_P(( LDAP
|
||||
*ld, char *dn, char *base, LDAPMessage *entry,
|
||||
struct ldap_disptmpl *tmpllist, char **defattrs, char ***defvals,
|
||||
writeptype writeproc, void *writeparm, char *eol, int rdncount,
|
||||
unsigned long opts, char *urlprefix );
|
||||
#endif /* !NEEDPROTOS */
|
||||
ldap_writeptype writeproc, void *writeparm, char *eol, int rdncount,
|
||||
unsigned long opts, char *urlprefix ));
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
LDAP_END_DECL
|
||||
#endif /* _DISPTMPL_H */
|
||||
|
|
|
|||
32
include/getopt-compat.h
Normal file
32
include/getopt-compat.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
/*
|
||||
* getopt(3) declarations
|
||||
*/
|
||||
#ifndef _GETOPT_COMPAT_H
|
||||
#define _GETOPT_COMPAT_H
|
||||
|
||||
#include <ldap_cdefs.h>
|
||||
|
||||
LDAP_BEGIN_DECL
|
||||
|
||||
extern char *optarg;
|
||||
extern int optind, opterr, optopt;
|
||||
|
||||
LDAP_F( int )
|
||||
getopt LDAP_P((
|
||||
int,
|
||||
char * const [],
|
||||
const char *));
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
#endif /* _GETOPT_COMPAT_H */
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
|
|
|
|||
38
include/lber_pvt.h
Normal file
38
include/lber_pvt.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
/*
|
||||
* lber_pvt.h - Header for ber_pvt_ functions. These are meant to be used
|
||||
* by the OpenLDAP distribution only.
|
||||
*/
|
||||
|
||||
#ifndef _LBER_PVT_H
|
||||
#define _LBER_PVT_H 1
|
||||
|
||||
#include <lber.h>
|
||||
|
||||
LDAP_BEGIN_DECL
|
||||
|
||||
/*
|
||||
* bprint.c
|
||||
*/
|
||||
LDAP_F( BER_LOG_PRINT_FN ) ber_pvt_log_print;
|
||||
|
||||
LDAP_F( int )
|
||||
ber_pvt_log_printf LDAP_P((
|
||||
int errlvl,
|
||||
int loglvl,
|
||||
const char *fmt,
|
||||
... )) LDAP_GCCATTR((format(printf, 3, 4)));
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
#endif
|
||||
|
||||
31
include/lber_types.h.in
Normal file
31
include/lber_types.h.in
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
|
||||
/*
|
||||
* LBER types
|
||||
*/
|
||||
|
||||
#ifndef _LBER_TYPES_H
|
||||
#define _LBER_TYPES_H
|
||||
|
||||
/* LBER boolean, enum, integers - 32 bits or larger*/
|
||||
#undef LBER_INT_T
|
||||
|
||||
/* LBER tags - 32 bits or larger */
|
||||
#undef LBER_TAG_T
|
||||
|
||||
/* LBER socket descriptor */
|
||||
#undef LBER_SOCKET_T
|
||||
|
||||
/* LBER lengths - 32 bits or larger*/
|
||||
#undef LBER_LEN_T
|
||||
|
||||
#endif /* _LBER_TYPES_H */
|
||||
44
include/lber_types.nt
Normal file
44
include/lber_types.nt
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
|
||||
/*
|
||||
* LBER types for Windows NT
|
||||
*/
|
||||
|
||||
#ifndef _LBER_TYPES_H_NT
|
||||
#define _LBER_TYPES_H_NT
|
||||
|
||||
/*
|
||||
* NT types:
|
||||
*
|
||||
* bitsof(short) == 2
|
||||
* bitsof(int) == 4
|
||||
* bitsof(long) == 4
|
||||
*
|
||||
* typedef unsigned int size_t;
|
||||
* typedef unsigned int SOCKET;
|
||||
*
|
||||
* we use native C types to avoid sucking in system headers
|
||||
*/
|
||||
|
||||
/* LBER boolean, enum, integers - 32 bits or larger*/
|
||||
#define LBER_INT_T int
|
||||
|
||||
/* LBER tags - 32 bits or larger */
|
||||
#define LBER_TAG_T long
|
||||
|
||||
/* LBER socket descriptor */
|
||||
#define LBER_SOCKET_T unsigned int
|
||||
|
||||
/* LBER lengths - 32 bits or larger*/
|
||||
#define LBER_LEN_T int
|
||||
|
||||
#endif /* _LBER_TYPES_H_NT */
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
|
|
@ -167,7 +168,7 @@ typedef struct ldapcontrol {
|
|||
#define LDAP_CHASE_SUBORDINATE_REFERRALS 0x0020
|
||||
#define LDAP_CHASE_EXTERNAL_REFERRALS 0x0040
|
||||
|
||||
#define LDAP_CONTROL_MANAGEDSAIT "2.16.16.840.1.113730.3.4.2"
|
||||
#define LDAP_CONTROL_MANAGEDSAIT "2.16.840.1.113730.3.2.6"
|
||||
|
||||
/* LDAP Unsolicited Notifications */
|
||||
#define LDAP_NOTICE_DISCONNECT "1.3.6.1.4.1.1466.20036"
|
||||
|
|
@ -869,6 +870,27 @@ ldap_modify_s LDAP_P((
|
|||
* in modrdn.c:
|
||||
*/
|
||||
LDAP_F( int )
|
||||
ldap_rename LDAP_P((
|
||||
LDAP *ld,
|
||||
LDAP_CONST char *dn,
|
||||
LDAP_CONST char *newrdn,
|
||||
int deleteoldrdn,
|
||||
LDAP_CONST char *newSuperior,
|
||||
LDAPControl **sctrls,
|
||||
LDAPControl **cctrls,
|
||||
int *msgidp ));
|
||||
|
||||
LDAP_F( int )
|
||||
ldap_rename_s LDAP_P((
|
||||
LDAP *ld,
|
||||
LDAP_CONST char *dn,
|
||||
LDAP_CONST char *newrdn,
|
||||
int deleteoldrdn,
|
||||
LDAP_CONST char *newSuperior,
|
||||
LDAPControl **sctrls,
|
||||
LDAPControl **cctrls ));
|
||||
|
||||
LDAP_F( int )
|
||||
ldap_rename_ext LDAP_P((
|
||||
LDAP *ld,
|
||||
LDAP_CONST char *dn,
|
||||
|
|
@ -1034,38 +1056,38 @@ ldap_add_result_entry LDAP_P((
|
|||
/*
|
||||
* in getdn.c
|
||||
*/
|
||||
LDAP_F( char *)
|
||||
LDAP_F( char * )
|
||||
ldap_get_dn LDAP_P((
|
||||
LDAP *ld,
|
||||
LDAPMessage *entry ));
|
||||
|
||||
LDAP_F( char *)
|
||||
LDAP_F( char * )
|
||||
ldap_dn2ufn LDAP_P((
|
||||
LDAP_CONST char *dn ));
|
||||
|
||||
LDAP_F( char **)
|
||||
LDAP_F( char ** )
|
||||
ldap_explode_dn LDAP_P((
|
||||
LDAP_CONST char *dn,
|
||||
int notypes ));
|
||||
|
||||
LDAP_F( char **)
|
||||
LDAP_F( char ** )
|
||||
ldap_explode_rdn LDAP_P((
|
||||
LDAP_CONST char *rdn,
|
||||
int notypes ));
|
||||
|
||||
LDAP_F( char *)
|
||||
ldap_parent_dn LDAP_P(( /* new (from slapd) */
|
||||
LDAP_F( char * )
|
||||
ldap_parent_dn LDAP_P((
|
||||
LDAP_CONST char *dn ));
|
||||
|
||||
LDAP_F( char *)
|
||||
ldap_relative_dn LDAP_P(( /* new (from slapd) */
|
||||
LDAP_F( char * )
|
||||
ldap_relative_dn LDAP_P((
|
||||
LDAP_CONST char *dn ));
|
||||
|
||||
LDAP_F( char *)
|
||||
ldap_normalize_dn LDAP_P(( /* new (from slapd) */
|
||||
LDAP_F( char * )
|
||||
ldap_normalize_dn LDAP_P((
|
||||
LDAP_CONST char *dn ));
|
||||
|
||||
LDAP_F( char **)
|
||||
LDAP_F( char ** )
|
||||
ldap_explode_dns LDAP_P(( /* deprecated */
|
||||
LDAP_CONST char *dn ));
|
||||
|
||||
|
|
|
|||
78
include/ldap_cdefs.h
Normal file
78
include/ldap_cdefs.h
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
/* LDAP C Defines */
|
||||
|
||||
#ifndef _LDAP_CDEFS_H
|
||||
#define _LDAP_CDEFS_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
# define LDAP_BEGIN_DECL extern "C" {
|
||||
# define LDAP_END_DECL }
|
||||
#else
|
||||
# define LDAP_BEGIN_DECL /* begin declarations */
|
||||
# define LDAP_END_DECL /* end declarations */
|
||||
#endif
|
||||
|
||||
#if !defined(__NO_PROTOTYPES) && ( defined(__NEED_PROTOTYPES) || \
|
||||
defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus) )
|
||||
|
||||
/* ANSI C or C++ */
|
||||
# define LDAP_P(protos) protos
|
||||
# define LDAP_CONCAT1(x,y) x ## y
|
||||
# define LDAP_CONCAT(x,y) LDAP_CONCAT1(x,y)
|
||||
# define LDAP_STRING(x) #x /* stringify without expanding x */
|
||||
# define LDAP_XSTRING(x) LDAP_STRING(x) /* expand x, then stringify */
|
||||
|
||||
#ifndef LDAP_CONST
|
||||
# define LDAP_CONST const
|
||||
#endif
|
||||
|
||||
#else /* no prototypes */
|
||||
|
||||
/* traditional C */
|
||||
# define LDAP_P(protos) ()
|
||||
# define LDAP_CONCAT(x,y) x/**/y
|
||||
# define LDAP_STRING(x) "x"
|
||||
|
||||
#ifndef LDAP_CONST
|
||||
# define LDAP_CONST /* no const */
|
||||
#endif
|
||||
|
||||
#endif /* no prototypes */
|
||||
|
||||
#if _WIN32 && _DLL
|
||||
# define LDAP_F_IMPORT extern __declspec( dllimport )
|
||||
# define LDAP_F_EXPORT extern __declspec( dllexport )
|
||||
#else
|
||||
# define LDAP_F_IMPORT extern
|
||||
# define LDAP_F_EXPORT extern
|
||||
#endif
|
||||
|
||||
#if (__GNUC__) * 1000 + (__GNUC_MINOR__) >= 2006
|
||||
# define LDAP_GCCATTR(attrs) __attribute__(attrs)
|
||||
#else
|
||||
# define LDAP_GCCATTR(attrs)
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _LDAP_CDEFS_H */
|
||||
|
||||
/* purposely allow these to be redefined */
|
||||
#ifndef LDAP_F_PRE
|
||||
# define LDAP_F_PRE LDAP_F_IMPORT
|
||||
#endif
|
||||
#ifndef LDAP_F_POST
|
||||
# define LDAP_F_POST /* no post */
|
||||
#endif
|
||||
#ifndef LDAP_F
|
||||
#define LDAP_F(type) LDAP_F_PRE type LDAP_F_POST
|
||||
#endif
|
||||
|
||||
56
include/ldap_config.h.in
Normal file
56
include/ldap_config.h.in
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file works in confunction with OpenLDAP configure system.
|
||||
* If you do no like the values below, adjust your configure options.
|
||||
*/
|
||||
|
||||
#ifndef _LDAP_CONFIG_H
|
||||
#define _LDAP_CONFIG_H
|
||||
|
||||
/* directory separator */
|
||||
#ifndef LDAP_DIRSEP
|
||||
#define LDAP_DIRSEP "/"
|
||||
#endif
|
||||
|
||||
/* directories */
|
||||
#ifndef LDAP_BINDIR
|
||||
#define LDAP_BINDIR "%BINDIR%"
|
||||
#endif
|
||||
#ifndef LDAP_SBINDIR
|
||||
#define LDAP_SBINDIR "%SBINDIR%"
|
||||
#endif
|
||||
#ifndef LDAP_DATADIR
|
||||
#define LDAP_DATADIR "%DATADIR%"
|
||||
#endif
|
||||
#ifndef LDAP_SYSCONFDIR
|
||||
#define LDAP_SYSCONFDIR "%SYSCONFDIR%"
|
||||
#endif
|
||||
#ifndef LDAP_LIBEXECDIR
|
||||
#define LDAP_LIBEXECDIR "%LIBEXECDIR%"
|
||||
#endif
|
||||
#ifndef LDAP_RUNDIR
|
||||
#define LDAP_RUNDIR "%RUNDIR%"
|
||||
#endif
|
||||
|
||||
/* command locations */
|
||||
#ifndef LDAP_EDITOR
|
||||
#define LDAP_EDITOR "%EDITOR%"
|
||||
#endif
|
||||
#ifndef LDAP_FINGER
|
||||
#define LDAP_FINGER "%FINGER%"
|
||||
#endif
|
||||
#ifndef LDAP_SENDMAIL
|
||||
#define LDAP_SENDMAIL "%SENDMAIL%"
|
||||
#endif
|
||||
|
||||
#endif /* _LDAP_CONFIG_H */
|
||||
59
include/ldap_config.nt
Normal file
59
include/ldap_config.nt
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file works in confunction with OpenLDAP configure system.
|
||||
* If you do no like the values below, adjust your configure options.
|
||||
*/
|
||||
|
||||
#ifndef _LDAP_CONFIG_H
|
||||
#define _LDAP_CONFIG_H
|
||||
|
||||
/* directory separator */
|
||||
#ifndef LDAP_DIRSEP
|
||||
#define LDAP_DIRSEP "\\"
|
||||
#endif
|
||||
|
||||
/* directories */
|
||||
#ifndef LDAP_PREFIX
|
||||
#define LDAP_PREFIX "C:\\OpenLDAP"
|
||||
#endif
|
||||
#ifndef LDAP_BINDIR
|
||||
#define LDAP_BINDIR LDAP_PREFIX "\\bin"
|
||||
#endif
|
||||
#ifndef LDAP_SBINDIR
|
||||
#define LDAP_SBINDIR LDAP_PREFIX "\\sbin"
|
||||
#endif
|
||||
#ifndef LDAP_DATADIR
|
||||
#define LDAP_DATADIR LDAP_PREFIX "\\share"
|
||||
#endif
|
||||
#ifndef LDAP_SYSCONFDIR
|
||||
#define LDAP_SYSCONFDIR LDAP_PREFIX "\\sysconf"
|
||||
#endif
|
||||
#ifndef LDAP_LIBEXECDIR
|
||||
#define LDAP_LIBEXECDIR LDAP_PREFIX "\\libexec"
|
||||
#endif
|
||||
#ifndef LDAP_RUNDIR
|
||||
#define LDAP_RUNDIR LDAP_PREFIX "\\run"
|
||||
#endif
|
||||
|
||||
/* command locations */
|
||||
#ifndef LDAP_EDITOR
|
||||
#define LDAP_EDITOR "%EDITOR%"
|
||||
#endif
|
||||
#ifndef LDAP_FINGER
|
||||
#define LDAP_FINGER "%FINGER%"
|
||||
#endif
|
||||
#ifndef LDAP_SENDMAIL
|
||||
#define LDAP_SENDMAIL "%SENDMAIL%"
|
||||
#endif
|
||||
|
||||
#endif /* _LDAP_CONFIG_H */
|
||||
221
include/ldap_defaults.h
Normal file
221
include/ldap_defaults.h
Normal file
|
|
@ -0,0 +1,221 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
/* Portions
|
||||
* Copyright (c) 1994 Regents of the University of Michigan.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted
|
||||
* provided that this notice is preserved and that due credit is given
|
||||
* to the University of Michigan at Ann Arbor. The name of the University
|
||||
* may not be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission. This software
|
||||
* is provided ``as is'' without express or implied warranty.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file controls defaults for OpenLDAP package.
|
||||
* You should not change any of these settings.
|
||||
*/
|
||||
|
||||
#ifndef _LDAP_DEFAULTS_H
|
||||
#define _LDAP_DEFAULTS_H
|
||||
|
||||
|
||||
#include <ldap_config.h>
|
||||
|
||||
#define LDAP_CONF_FILE LDAP_SYSCONFDIR LDAP_DIRSEP "ldap.conf"
|
||||
#define LDAP_USERRC_FILE "ldaprc"
|
||||
#define LDAP_ENV_PREFIX "LDAP"
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* *
|
||||
* You probably do not need to edit anything below this point *
|
||||
* *
|
||||
*********************************************************************/
|
||||
|
||||
/*
|
||||
* SHARED DEFINITIONS - other things you can change
|
||||
*/
|
||||
/* default attribute to use when sorting entries, NULL => sort by DN */
|
||||
#define SORT_ATTR NULL
|
||||
/* default count of DN components to show in entry displays */
|
||||
#define DEFAULT_RDNCOUNT 2
|
||||
/* default config file locations */
|
||||
#define FILTERFILE LDAP_SYSCONFDIR LDAP_DIRSEP "ldapfilter.conf"
|
||||
#define TEMPLATEFILE LDAP_SYSCONFDIR LDAP_DIRSEP "ldaptemplates.conf"
|
||||
#define SEARCHFILE LDAP_SYSCONFDIR LDAP_DIRSEP "ldapsearchprefs.conf"
|
||||
#define FRIENDLYFILE LDAP_DATADIR LDAP_DIRSEP "ldapfriendly"
|
||||
|
||||
/*
|
||||
* FINGER DEFINITIONS
|
||||
*/
|
||||
/* banner to print */
|
||||
#define FINGER_BANNER "OpenLDAP Finger Service...\r\n"
|
||||
/* who to report errors to */
|
||||
#define FINGER_ERRORS "System Administrator"
|
||||
/* what to say if no matches are found */
|
||||
#define FINGER_NOMATCH "Search failed to find anything.\r\n"
|
||||
/* what to say if the service may be unavailable */
|
||||
#define FINGER_UNAVAILABLE \
|
||||
"The directory service may be temporarily unavailable.\r\n\
|
||||
Please try again later.\r\n"
|
||||
/* printed if a match has no email address - for disptmp default */
|
||||
#define FINGER_NOEMAIL1 "None registered in this service."
|
||||
#define FINGER_NOEMAIL2 NULL
|
||||
#define FINGER_NOEMAIL { FINGER_NOEMAIL1, FINGER_NOEMAIL2, NULL }
|
||||
/* maximum number of matches returned */
|
||||
#define FINGER_SIZELIMIT 50
|
||||
/* max number of hits displayed in full before a list is presented */
|
||||
#define FINGER_LISTLIMIT 1
|
||||
/* what to exec for "finger @host" */
|
||||
#define FINGER_CMD LDAP_FINGER
|
||||
/* how to treat aliases when searching */
|
||||
#define FINGER_DEREF LDAP_DEREF_FINDING
|
||||
/* attribute to use when sorting results */
|
||||
#define FINGER_SORT_ATTR SORT_ATTR
|
||||
/* enable ufn support */
|
||||
#define FINGER_UFN
|
||||
/* timeout for searches */
|
||||
#define FINGER_TIMEOUT 60
|
||||
/* number of DN components to show in entry displays */
|
||||
#define FINGER_RDNCOUNT DEFAULT_RDNCOUNT
|
||||
|
||||
/*
|
||||
* GO500 GOPHER GATEWAY DEFINITIONS
|
||||
*/
|
||||
/* port on which to listen */
|
||||
#define GO500_PORT 5555
|
||||
/* how to handle aliases */
|
||||
#define GO500_DEREF LDAP_DEREF_FINDING
|
||||
/* attribute to use when sorting results */
|
||||
#define GO500_SORT_ATTR SORT_ATTR
|
||||
/* timeout for searches */
|
||||
#define GO500_TIMEOUT 180
|
||||
/* enable ufn support */
|
||||
#define GO500_UFN
|
||||
/*
|
||||
* only set and uncomment this if your hostname() does not return
|
||||
* a fully qualified hostname
|
||||
*/
|
||||
/* #define GO500_HOSTNAME "fully.qualified.hostname.here" */
|
||||
/* number of DN components to show in entry displays */
|
||||
#define GO500_RDNCOUNT DEFAULT_RDNCOUNT
|
||||
|
||||
/*
|
||||
* GO500GW GOPHER GATEWAY DEFINITIONS
|
||||
*/
|
||||
/* where the helpfile lives */
|
||||
#define GO500GW_HELPFILE LDAP_DATADIR LDAP_DIRSEP "go500gw.help"
|
||||
/* port on which to listen */
|
||||
#define GO500GW_PORT 7777
|
||||
/* timeout on all searches */
|
||||
#define GO500GW_TIMEOUT 180
|
||||
/* enable ufn support */
|
||||
#define GO500GW_UFN
|
||||
/* attribute to use when sorting results */
|
||||
#define GO500GW_SORT_ATTR SORT_ATTR
|
||||
/*
|
||||
* only set and uncomment this if your hostname() does not return
|
||||
* a fully qualified hostname
|
||||
*/
|
||||
/* #define GO500GW_HOSTNAME "fully.qualified.hostname.here" */
|
||||
/* number of DN components to show in entry displays */
|
||||
#define GO500GW_RDNCOUNT DEFAULT_RDNCOUNT
|
||||
|
||||
/*
|
||||
* RCPT500 MAIL RESPONDER GATEWAY DEFINITIONS
|
||||
*/
|
||||
/* where the helpfile lives */
|
||||
#define RCPT500_HELPFILE LDAP_DATADIR LDAP_DIRSEP "rcpt500.help"
|
||||
/* maximum number of matches returned */
|
||||
#define RCPT500_SIZELIMIT 50
|
||||
/* address replies will appear to come from */
|
||||
#define RCPT500_FROM "\"Directory Query Program\" <Dir-Query>"
|
||||
/* command that will accept an RFC822 message text on standard
|
||||
input, and send it. sendmail -t does this nicely. */
|
||||
#define RCPT500_PIPEMAILCMD LDAP_SENDMAIL " -t"
|
||||
/* attribute to use when sorting results */
|
||||
#define RCPT500_SORT_ATTR SORT_ATTR
|
||||
/* max number of hits displayed in full before a list is presented */
|
||||
#define RCPT500_LISTLIMIT 1
|
||||
/* enable ufn support */
|
||||
#define RCPT500_UFN
|
||||
/* number of DN components to show in entry displays */
|
||||
#define RCPT500_RDNCOUNT DEFAULT_RDNCOUNT
|
||||
|
||||
/*
|
||||
* MAIL500 MAILER DEFINITIONS
|
||||
*/
|
||||
/* max number of ambiguous matches reported */
|
||||
#define MAIL500_MAXAMBIGUOUS 10
|
||||
/* max subscribers allowed (size limit when searching for them ) */
|
||||
#define MAIL500_MAXGROUPMEMBERS LDAP_NO_LIMIT
|
||||
/* timeout for all searches */
|
||||
#define MAIL500_TIMEOUT 180
|
||||
/* sendmail location - mail500 needs to exec this */
|
||||
#define MAIL500_SENDMAIL LDAP_SENDMAIL
|
||||
|
||||
/*
|
||||
* UD DEFINITIONS
|
||||
*/
|
||||
/* ud configuration file */
|
||||
#define UD_CONFIG_FILE LDAP_SYSCONFDIR LDAP_DIRSEP "ud.conf"
|
||||
/* default editor */
|
||||
#define UD_DEFAULT_EDITOR LDAP_EDITOR
|
||||
/* default bbasename of user config file */
|
||||
#define UD_USER_CONFIG_FILE ".udrc"
|
||||
/* default base where groups are created */
|
||||
#define UD_WHERE_GROUPS_ARE_CREATED ""
|
||||
/* default base below which all groups live */
|
||||
#define UD_WHERE_ALL_GROUPS_LIVE ""
|
||||
|
||||
/*
|
||||
* FAX500 DEFINITIONS
|
||||
*/
|
||||
/* how long to wait for searches */
|
||||
#define FAX_TIMEOUT 180
|
||||
/* maximum number of ambiguous matches reported */
|
||||
#define FAX_MAXAMBIGUOUS 10
|
||||
/* maximum number of members allowed */
|
||||
#define FAX_MAXMEMBERS LDAP_NO_LIMIT
|
||||
/* program to send mail */
|
||||
#define FAX_SENDMAIL LDAP_SENDMAIL
|
||||
|
||||
/*
|
||||
* RP500 DEFINITIONS
|
||||
*/
|
||||
/* prefix to add to non-fully-qualified numbers */
|
||||
#define RP_PHONEPREFIX ""
|
||||
|
||||
/*
|
||||
* SLAPD DEFINITIONS
|
||||
*/
|
||||
/* location of the default slapd config file */
|
||||
#define SLAPD_DEFAULT_CONFIGFILE LDAP_SYSCONFDIR LDAP_DIRSEP "slapd.conf"
|
||||
/* default max deref depth for aliases */
|
||||
#define SLAPD_DEFAULT_MAXDEREFDEPTH 15
|
||||
/* default sizelimit on number of entries from a search */
|
||||
#define SLAPD_DEFAULT_SIZELIMIT 500
|
||||
/* default timelimit to spend on a search */
|
||||
#define SLAPD_DEFAULT_TIMELIMIT 3600
|
||||
/* minimum max ids that a single index entry can map to in ldbm */
|
||||
#define SLAPD_LDBM_MIN_MAXIDS 4000
|
||||
|
||||
/* the following DNs must be normalized and in uppercase! */
|
||||
/* dn of the special "monitor" entry */
|
||||
#define SLAPD_MONITOR_DN "CN=MONITOR"
|
||||
/* dn of the special "config" entry */
|
||||
#define SLAPD_CONFIG_DN "CN=CONFIG"
|
||||
/* dn of the special "schema" entry */
|
||||
#define SLAPD_SCHEMA_DN "CN=SCHEMA"
|
||||
|
||||
#endif /* _LDAP_CONFIG_H */
|
||||
56
include/ldap_features.h.in
Normal file
56
include/ldap_features.h.in
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
/*
|
||||
* LDAP Features
|
||||
*/
|
||||
#ifndef _LDAP_FEATURES_H
|
||||
#define _LDAP_FEATURES_H 1
|
||||
|
||||
/*
|
||||
** OpenLDAP reentrancy/thread-safeness should be dynamically
|
||||
** checked using ldap_get_option().
|
||||
**
|
||||
** The -lldap implementation may or may not be:
|
||||
** LDAP_API_FEATURE_THREAD_SAFE
|
||||
**
|
||||
** The preprocessor flag LDAP_API_FEATURE_X_OPENLDAP_REENTRANT can
|
||||
** be used to determine if -lldap is LDAP_API_FEATURE_THREAD_SAFE at
|
||||
** compile time.
|
||||
**
|
||||
** The -lldap_r implementation is always THREAD_SAFE but
|
||||
** may also be:
|
||||
** LDAP_API_FEATURE_SESSION_THREAD_SAFE
|
||||
** LDAP_API_FEATURE_OPERATION_THREAD_SAFE
|
||||
**
|
||||
** The preprocessor flag LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE
|
||||
** can be used to determine if -lldap_r is available at compile
|
||||
** time. You must define LDAP_THREAD_SAFE if and only if you
|
||||
** link with -lldap_r.
|
||||
**
|
||||
** If you fail to define LDAP_THREAD_SAFE when linking with
|
||||
** -lldap_r or define LDAP_THREAD_SAFE when linking with -lldap,
|
||||
** provided header definations and declarations may be incorrect.
|
||||
**
|
||||
*/
|
||||
|
||||
/* is -lldap reentrant or not */
|
||||
#undef LDAP_API_FEATURE_X_OPENLDAP_REENTRANT
|
||||
|
||||
/* is threadsafe version of -lldap (ie: -lldap_r) *available* or not */
|
||||
#undef LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE
|
||||
|
||||
/* LDAP v2 DNS */
|
||||
#undef LDAP_API_FEATURE_X_OPENLDAP_V2_DNS
|
||||
|
||||
/* LDAP v2 Referrals */
|
||||
#undef LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS
|
||||
|
||||
#endif /* LDAP_FEATURES */
|
||||
56
include/ldap_features.nt
Normal file
56
include/ldap_features.nt
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
/* $OpenLDAP$ */
|
||||
/*
|
||||
* Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms are permitted only
|
||||
* as authorized by the OpenLDAP Public License. A copy of this
|
||||
* license is available at http://www.OpenLDAP.org/license.html or
|
||||
* in file LICENSE in the top-level directory of the distribution.
|
||||
*/
|
||||
/*
|
||||
* LDAP Features
|
||||
*/
|
||||
#ifndef _LDAP_FEATURES_H
|
||||
#define _LDAP_FEATURES_H 1
|
||||
|
||||
/*
|
||||
** OpenLDAP reentrancy/thread-safeness should be dynamically
|
||||
** checked using ldap_get_option().
|
||||
**
|
||||
** The -lldap implementation may or may not be:
|
||||
** LDAP_API_FEATURE_THREAD_SAFE
|
||||
**
|
||||
** The preprocessor flag LDAP_API_FEATURE_X_OPENLDAP_REENTRANT can
|
||||
** be used to determine if -lldap is LDAP_API_FEATURE_THREAD_SAFE at
|
||||
** compile time.
|
||||
**
|
||||
** The -lldap_r implementation is always THREAD_SAFE but
|
||||
** may also be:
|
||||
** LDAP_API_FEATURE_SESSION_THREAD_SAFE
|
||||
** LDAP_API_FEATURE_OPERATION_THREAD_SAFE
|
||||
**
|
||||
** The preprocessor flag LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE
|
||||
** can be used to determine if -lldap_r is availalbe at compile
|
||||
** time. You must define LDAP_THREAD_SAFE if and only if you
|
||||
** link with -lldap_r.
|
||||
**
|
||||
** If you fail to define LDAP_THREAD_SAFE when linking with
|
||||
** -lldap_r or define LDAP_THREAD_SAFE when linking with -lldap,
|
||||
** provided header definations and declarations may be incorrect.
|
||||
**
|
||||
*/
|
||||
|
||||
/* is -lldap reentrant or not */
|
||||
/* #undef LDAP_API_FEATURE_X_OPENLDAP_REENTRANT */
|
||||
|
||||
/* is threadsafe version of -lldap (ie: -lldap_r) *available* or not */
|
||||
#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE LDAP_VENDOR_VERSION
|
||||
|
||||
/* LDAP v2 DNS */
|
||||
/* #undef LDAP_API_FEATURE_X_OPENLDAP_V2_DNS */
|
||||
|
||||
/* LDAP v2 Referrals */
|
||||
#define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
|
||||
|
||||
#endif /* LDAP_FEATURES */
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue