Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • openldap/openldap
  • hyc/openldap
  • ryan/openldap
  • iboukris/openldap
  • ondra/openldap
  • sshanks-kx/openldap
  • blaggacao/openldap
  • pbrezina/openldap
  • quanah/openldap
  • dragos_h/openldap
  • lorenz/openldap
  • tsaarni/openldap
  • fei.ding/openldap
  • orent/openldap
  • arrowplum/openldap
  • barchiesi/openldap
  • jotik/openldap
  • hamano/openldap
  • ingovoss/openldap
  • henson/openldap
  • jlrine2/openldap
  • howeverAT/openldap
  • nivanova/openldap
  • orbea/openldap
  • rdubner/openldap
  • smckinney/openldap
  • jklowden/openldap
  • dpa-openldap/openldap
  • rouzier/openldap
  • orgads/openldap
  • ffontaine/openldap
  • jiaqingz/openldap
  • dcoutadeur/openldap
  • begeragus/openldap
  • pubellit/openldap
  • glandium/openldap
  • facboy/openldap
  • thesamesam/openldap
  • Johan/openldap
  • fkooman/openldap
  • gburd/openldap
  • h-homma/openldap
  • sgallagher/openldap
  • ahmed_zaki/openldap
  • gnoe/openldap
  • mid/openldap
  • clan/openldap
47 results
Show changes
Showing with 574 additions and 430 deletions
#! /bin/sh
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
## Copyright 1998-2008 The OpenLDAP Foundation.
## Copyright 1998-2011 The OpenLDAP Foundation.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
......
......@@ -2,7 +2,7 @@
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
## Copyright 1998-2008 The OpenLDAP Foundation.
## Copyright 1998-2011 The OpenLDAP Foundation.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
......@@ -14,25 +14,26 @@
## <http://www.OpenLDAP.org/license.html>.
#
# Make a release
# mkrelease RELNAME CVSTAG CVSMODULES
# where CVSTAG is the tag to export from the current CVSROOT
#
#
# This script MUST NOT add files to the export nor modify
# any file in the export.
# any file in the export, exceptions:
# make guide.html
#
set -e # exit immediately if any errors occur
if test $# != 3 ; then
echo 'usage: mkrelease RELNAME CVSTAG CVSMODULES ...'
echo 'usage: mkrelease REPO RELNAME TAG'
exit 1
fi
REPO=$1
shift
RELNAME=openldap-$1
shift
CVSTAG=$1
TAG=$1
shift
if test -e $RELNAME ; then
......@@ -41,10 +42,9 @@ if test -e $RELNAME ; then
fi
echo Release: $RELNAME
echo CVS Tag: $CVSTAG
echo Modules: $*
echo Tag: $TAG
cvs -q export -kkv -r $CVSTAG -d $RELNAME $*
git archive --format=tar --prefix="${RELNAME}/" --remote="${REPO}" "$TAG" | tar xvf -
if test ! -d $RELNAME ; then
echo "error: $RELNAME doesn't exists"
......
:: $OpenLDAP$
:: This work is part of OpenLDAP Software <http://www.openldap.org/>.
::
:: Copyright 1998-2008 The OpenLDAP Foundation.
:: Copyright 1998-2011 The OpenLDAP Foundation.
:: All rights reserved.
::
:: Redistribution and use in source and binary forms, with or without
......
......@@ -3,7 +3,7 @@
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
## Copyright 1998-2008 The OpenLDAP Foundation.
## Copyright 1998-2011 The OpenLDAP Foundation.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
......@@ -55,7 +55,7 @@ WHOWHERE="$USER@`uname -n`:`pwd`"
cat << __EOF__
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
* Copyright 1998-2008 The OpenLDAP Foundation.
* Copyright 1998-2011 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
......@@ -68,7 +68,7 @@ cat << __EOF__
*/
static const char copyright[] =
"Copyright 1998-2008 The OpenLDAP Foundation. All rights reserved.\n"
"Copyright 1998-2011 The OpenLDAP Foundation. All rights reserved.\n"
"COPYING RESTRICTIONS APPLY\n";
$static $const char $SYMBOL[] =
......
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
## Copyright 1998-2008 The OpenLDAP Foundation.
## Copyright 1998-2011 The OpenLDAP Foundation.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
......
......@@ -2,7 +2,7 @@ dnl OpenLDAP Autoconf Macros
dnl $OpenLDAP$
dnl This work is part of OpenLDAP Software <http://www.openldap.org/>.
dnl
dnl Copyright 1998-2008 The OpenLDAP Foundation.
dnl Copyright 1998-2011 The OpenLDAP Foundation.
dnl All rights reserved.
dnl
dnl Redistribution and use in source and binary forms, with or without
......@@ -119,6 +119,17 @@ if test $ol_cv_cpp_ebcdic = yes ; then
fi
])
dnl
dnl --------------------------------------------------------------------
dnl Check for MSVC
AC_DEFUN([OL_MSVC],
[AC_REQUIRE_CPP()dnl
AC_CACHE_CHECK([whether we are using MS Visual C++], ol_cv_msvc,
[AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
#ifndef _MSC_VER
#include <__FOO__/generate_error.h>
#endif
]])],[ol_cv_msvc=yes],[ol_cv_msvc=no])])])
dnl --------------------------------------------------------------------
dnl OpenLDAP version of STDC header check w/ EBCDIC support
AC_DEFUN([OL_HEADER_STDC],
......@@ -288,24 +299,6 @@ AC_DEFUN([OL_BERKELEY_DB_TRY],
#define NULL ((void*)0)
#endif
]], [[
#if DB_VERSION_MAJOR > 1
{
char *version;
int major, minor, patch;
version = db_version( &major, &minor, &patch );
if( major != DB_VERSION_MAJOR ||
minor < DB_VERSION_MINOR )
{
printf("Berkeley DB version mismatch\n"
"\theader: %s\n\tlibrary: %s\n",
DB_VERSION_STRING, version);
return 1;
}
}
#endif
#if DB_VERSION_MAJOR > 2
db_env_create( NULL, 0 );
#elif DB_VERSION_MAJOR > 1
......@@ -325,217 +318,68 @@ fi
])
dnl
dnl --------------------------------------------------------------------
dnl Try to locate appropriate library
AC_DEFUN([OL_BERKELEY_DB_LINK],
[ol_cv_lib_db=no
dnl Determine major version
AC_CACHE_CHECK([for Berkeley DB major version], [ol_cv_bdb_major],[
ol_cv_bdb_major=0
if test $ol_cv_bdb_major = 0 ; then
AC_EGREP_CPP(__db_version, [
#include <db.h>
#ifndef DB_VERSION_MAJOR
# define DB_VERSION_MAJOR 1
#endif
#if DB_VERSION_MAJOR == 4
__db_version
#endif
], [ol_cv_bdb_major=4], [:])
fi
if test $ol_cv_bdb_major = 0 ; then
AC_EGREP_CPP(__db_version, [
dnl Get major and minor version from <db.h>
AC_DEFUN([OL_BDB_HEADER_VERSION],
[AC_CACHE_CHECK([for Berkeley DB major version in db.h], [ol_cv_bdb_major],[
AC_LANG_CONFTEST([
#include <db.h>
#ifndef DB_VERSION_MAJOR
# define DB_VERSION_MAJOR 1
#endif
#if DB_VERSION_MAJOR == 3
__db_version
#endif
], [ol_cv_bdb_major=3], [:])
fi
if test $ol_cv_bdb_major = 0 ; then
AC_EGREP_CPP(__db_version, [
#include <db.h>
#ifndef DB_VERSION_MAJOR
# define DB_VERSION_MAJOR 1
#endif
#if DB_VERSION_MAJOR == 2
__db_version
#endif
], [ol_cv_bdb_major=2], [:])
fi
if test $ol_cv_bdb_major = 0 ; then
AC_EGREP_CPP(__db_version, [
#include <db.h>
#ifndef DB_VERSION_MAJOR
# define DB_VERSION_MAJOR 1
#endif
#if DB_VERSION_MAJOR == 1
__db_version
#endif
], [ol_cv_bdb_major=1], [:])
fi
if test $ol_cv_bdb_major = 0 ; then
AC_MSG_ERROR([Unknown Berkeley DB major version])
fi
__db_version DB_VERSION_MAJOR
])
set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none
ol_cv_bdb_major=${3}
])
case $ol_cv_bdb_major in [[1-9]]*) : ;; *)
AC_MSG_ERROR([Unknown Berkeley DB major version in db.h]) ;;
esac
dnl Determine minor version
AC_CACHE_CHECK([for Berkeley DB minor version], [ol_cv_bdb_minor],[
ol_cv_bdb_minor=0
if test $ol_cv_bdb_minor = 0 ; then
AC_EGREP_CPP(__db_version, [
AC_CACHE_CHECK([for Berkeley DB minor version in db.h], [ol_cv_bdb_minor],[
AC_LANG_CONFTEST([
#include <db.h>
#ifndef DB_VERSION_MINOR
# define DB_VERSION_MINOR 0
#endif
#if DB_VERSION_MINOR == 9
__db_version
#endif
], [ol_cv_bdb_minor=9], [:])
fi
if test $ol_cv_bdb_minor = 0 ; then
AC_EGREP_CPP(__db_version, [
#include <db.h>
#ifndef DB_VERSION_MINOR
# define DB_VERSION_MINOR 0
#endif
#if DB_VERSION_MINOR == 8
__db_version
#endif
], [ol_cv_bdb_minor=8], [:])
fi
if test $ol_cv_bdb_minor = 0 ; then
AC_EGREP_CPP(__db_version, [
#include <db.h>
#ifndef DB_VERSION_MINOR
# define DB_VERSION_MINOR 0
#endif
#if DB_VERSION_MINOR == 7
__db_version
#endif
], [ol_cv_bdb_minor=7], [:])
fi
if test $ol_cv_bdb_minor = 0 ; then
AC_EGREP_CPP(__db_version, [
#include <db.h>
#ifndef DB_VERSION_MINOR
# define DB_VERSION_MINOR 0
#endif
#if DB_VERSION_MINOR == 6
__db_version
#endif
], [ol_cv_bdb_minor=6], [:])
fi
if test $ol_cv_bdb_minor = 0 ; then
AC_EGREP_CPP(__db_version, [
#include <db.h>
#ifndef DB_VERSION_MINOR
# define DB_VERSION_MINOR 0
#endif
#if DB_VERSION_MINOR == 5
__db_version
#endif
], [ol_cv_bdb_minor=5], [:])
fi
if test $ol_cv_bdb_minor = 0 ; then
AC_EGREP_CPP(__db_version, [
#include <db.h>
#ifndef DB_VERSION_MINOR
# define DB_VERSION_MINOR 0
#endif
#if DB_VERSION_MINOR == 4
__db_version
#endif
], [ol_cv_bdb_minor=4], [:])
fi
if test $ol_cv_bdb_minor = 0 ; then
AC_EGREP_CPP(__db_version, [
#include <db.h>
#ifndef DB_VERSION_MINOR
# define DB_VERSION_MINOR 0
#endif
#if DB_VERSION_MINOR == 3
__db_version
#endif
], [ol_cv_bdb_minor=3], [:])
fi
if test $ol_cv_bdb_minor = 0 ; then
AC_EGREP_CPP(__db_version, [
#include <db.h>
#ifndef DB_VERSION_MINOR
# define DB_VERSION_MINOR 0
#endif
#if DB_VERSION_MINOR == 2
__db_version
#endif
], [ol_cv_bdb_minor=2], [:])
fi
if test $ol_cv_bdb_minor = 0 ; then
AC_EGREP_CPP(__db_version, [
#include <db.h>
#ifndef DB_VERSION_MINOR
# define DB_VERSION_MINOR 0
#endif
#if DB_VERSION_MINOR == 1
__db_version
#endif
], [ol_cv_bdb_minor=1], [:])
fi
__db_version DB_VERSION_MINOR
])
set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none
ol_cv_bdb_minor=${3}
])
case $ol_cv_bdb_minor in [[0-9]]*) : ;; *)
AC_MSG_ERROR([Unknown Berkeley DB minor version in db.h]) ;;
esac
])
dnl
dnl --------------------------------------------------------------------
dnl Try to locate appropriate library
AC_DEFUN([OL_BERKELEY_DB_LINK],
[ol_cv_lib_db=no
if test $ol_cv_bdb_major = 4 ; then
if test $ol_cv_bdb_minor = 6 ; then
OL_BERKELEY_DB_TRY(ol_cv_db_db_4_dot_6,[-ldb-4.6])
OL_BERKELEY_DB_TRY(ol_cv_db_db46,[-ldb46])
OL_BERKELEY_DB_TRY(ol_cv_db_db_46,[-ldb-46])
OL_BERKELEY_DB_TRY(ol_cv_db_db_4_6,[-ldb-4-6])
elif test $ol_cv_bdb_minor = 5 ; then
OL_BERKELEY_DB_TRY(ol_cv_db_db_4_dot_5,[-ldb-4.5])
OL_BERKELEY_DB_TRY(ol_cv_db_db45,[-ldb45])
OL_BERKELEY_DB_TRY(ol_cv_db_db_45,[-ldb-45])
OL_BERKELEY_DB_TRY(ol_cv_db_db_4_5,[-ldb-4-5])
elif test $ol_cv_bdb_minor = 4 ; then
OL_BERKELEY_DB_TRY(ol_cv_db_db_4_dot_4,[-ldb-4.4])
OL_BERKELEY_DB_TRY(ol_cv_db_db44,[-ldb44])
OL_BERKELEY_DB_TRY(ol_cv_db_db_44,[-ldb-44])
OL_BERKELEY_DB_TRY(ol_cv_db_db_4_4,[-ldb-4-4])
elif test $ol_cv_bdb_minor = 3 ; then
OL_BERKELEY_DB_TRY(ol_cv_db_db_4_dot_3,[-ldb-4.3])
OL_BERKELEY_DB_TRY(ol_cv_db_db43,[-ldb43])
OL_BERKELEY_DB_TRY(ol_cv_db_db_43,[-ldb-43])
OL_BERKELEY_DB_TRY(ol_cv_db_db_4_3,[-ldb-4-3])
elif test $ol_cv_bdb_minor = 2 ; then
OL_BERKELEY_DB_TRY(ol_cv_db_db_4_dot_2,[-ldb-4.2])
OL_BERKELEY_DB_TRY(ol_cv_db_db42,[-ldb42])
OL_BERKELEY_DB_TRY(ol_cv_db_db_42,[-ldb-42])
OL_BERKELEY_DB_TRY(ol_cv_db_db_4_2,[-ldb-4-2])
fi
if test $ol_cv_bdb_major = 5 ; then
OL_BERKELEY_DB_TRY(ol_cv_db_db_5_dot_m,[-ldb-5.$ol_cv_bdb_minor])
OL_BERKELEY_DB_TRY(ol_cv_db_db5m,[-ldb5$ol_cv_bdb_minor])
OL_BERKELEY_DB_TRY(ol_cv_db_db_5m,[-ldb-5$ol_cv_bdb_minor])
OL_BERKELEY_DB_TRY(ol_cv_db_db_5_m,[-ldb-5-$ol_cv_bdb_minor])
OL_BERKELEY_DB_TRY(ol_cv_db_db_5,[-ldb-5])
OL_BERKELEY_DB_TRY(ol_cv_db_db5,[-ldb5])
elif test $ol_cv_bdb_major = 4 ; then
OL_BERKELEY_DB_TRY(ol_cv_db_db_4_dot_m,[-ldb-4.$ol_cv_bdb_minor])
OL_BERKELEY_DB_TRY(ol_cv_db_db4m,[-ldb4$ol_cv_bdb_minor])
OL_BERKELEY_DB_TRY(ol_cv_db_db_4m,[-ldb-4$ol_cv_bdb_minor])
OL_BERKELEY_DB_TRY(ol_cv_db_db_4_m,[-ldb-4-$ol_cv_bdb_minor])
OL_BERKELEY_DB_TRY(ol_cv_db_db_4,[-ldb-4])
OL_BERKELEY_DB_TRY(ol_cv_db_db4,[-ldb4])
OL_BERKELEY_DB_TRY(ol_cv_db_db,[-ldb])
elif test $ol_cv_bdb_major = 3 ; then
OL_BERKELEY_DB_TRY(ol_cv_db_db3,[-ldb3])
OL_BERKELEY_DB_TRY(ol_cv_db_db_3,[-ldb-3])
elif test $ol_cv_bdb_major = 2 ; then
OL_BERKELEY_DB_TRY(ol_cv_db_db2,[-ldb2])
OL_BERKELEY_DB_TRY(ol_cv_db_db_2,[-ldb-2])
elif test $ol_cv_bdb_major = 1 ; then
OL_BERKELEY_DB_TRY(ol_cv_db_db1,[-ldb1])
OL_BERKELEY_DB_TRY(ol_cv_db_db_1,[-ldb-1])
fi
OL_BERKELEY_DB_TRY(ol_cv_db_db,[-ldb])
OL_BERKELEY_DB_TRY(ol_cv_db_none)
])
dnl
dnl --------------------------------------------------------------------
dnl Check if Berkeley DB version
AC_DEFUN([OL_BERKELEY_DB_VERSION],
[AC_CACHE_CHECK([for Berkeley DB version match], [ol_cv_berkeley_db_version], [
[AC_CACHE_CHECK([for Berkeley DB library and header version match], [ol_cv_berkeley_db_version], [
ol_LIBS="$LIBS"
LIBS="$LTHREAD_LIBS $LIBS"
if test $ol_cv_lib_db != yes ; then
......@@ -674,6 +518,13 @@ AC_DEFUN([OL_BERKELEY_DB],
[ol_cv_berkeley_db=no
AC_CHECK_HEADERS(db.h)
if test $ac_cv_header_db_h = yes; then
OL_BDB_HEADER_VERSION
OL_BDB_COMPAT
if test $ol_cv_bdb_compat != yes ; then
AC_MSG_ERROR([BerkeleyDB version incompatible with BDB/HDB backends])
fi
OL_BERKELEY_DB_LINK
if test "$ol_cv_lib_db" != no ; then
ol_cv_berkeley_db=yes
......@@ -685,7 +536,7 @@ fi
dnl --------------------------------------------------------------------
dnl Check for version compatility with back-bdb
AC_DEFUN([OL_BDB_COMPAT],
[AC_CACHE_CHECK([Berkeley DB version for BDB/HDB backends], [ol_cv_bdb_compat],[
[AC_CACHE_CHECK([if Berkeley DB version supported by BDB/HDB backends], [ol_cv_bdb_compat],[
AC_EGREP_CPP(__db_version_compat,[
#include <db.h>
......@@ -697,44 +548,15 @@ AC_DEFUN([OL_BDB_COMPAT],
# define DB_VERSION_MINOR 0
#endif
/* require 4.2 or later, but exclude 4.3 */
#if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2) && (DB_VERSION_MINOR !=3)
#define DB_VERSION_MM ((DB_VERSION_MAJOR<<8)|DB_VERSION_MINOR)
/* require 4.4 or later */
#if DB_VERSION_MM >= 0x0404
__db_version_compat
#endif
], [ol_cv_bdb_compat=yes], [ol_cv_bdb_compat=no])])
])
dnl --------------------------------------------------------------------
dnl Find old Berkeley DB 1.85/1.86
AC_DEFUN([OL_BERKELEY_COMPAT_DB],
[AC_CHECK_HEADERS(db_185.h db.h)
if test $ac_cv_header_db_185_h = yes || test $ac_cv_header_db_h = yes; then
AC_CACHE_CHECK([if Berkeley DB header compatibility], [ol_cv_header_db1],[
AC_EGREP_CPP(__db_version_1,[
#if HAVE_DB_185_H
# include <db_185.h>
#else
# include <db.h>
#endif
/* this check could be improved */
#ifndef DB_VERSION_MAJOR
# define DB_VERSION_MAJOR 1
#endif
#if DB_VERSION_MAJOR == 1
__db_version_1
#endif
], [ol_cv_header_db1=yes], [ol_cv_header_db1=no])])
if test $ol_cv_header_db1 = yes ; then
OL_BERKELEY_DB_LINK
if test "$ol_cv_lib_db" != no ; then
ol_cv_berkeley_db=yes
fi
fi
fi
])
dnl
dnl ====================================================================
dnl Check POSIX Thread version
......@@ -1106,7 +928,9 @@ AC_DEFUN([OL_LIB_FETCH],
LIBS="-lfetch -lcom_err $LIBS"
AC_CACHE_CHECK([fetch(3) library],ol_cv_lib_fetch,[
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#include <stdio.h>
#include <fetch.h>]], [[struct url *u = fetchParseURL("file:///"); ]])],[ol_cv_lib_fetch=yes],[ol_cv_lib_fetch=no])])
LIBS=$ol_LIBS
......
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
## Copyright 1998-2008 The OpenLDAP Foundation.
## Copyright 1998-2011 The OpenLDAP Foundation.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
......
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
## Copyright 1998-2008 The OpenLDAP Foundation.
## Copyright 1998-2011 The OpenLDAP Foundation.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
......
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
## Copyright 1998-2008 The OpenLDAP Foundation.
## Copyright 1998-2011 The OpenLDAP Foundation.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
......@@ -32,6 +32,7 @@ exec_prefix = @exec_prefix@
ldap_subdir = @ldap_subdir@
bindir = @bindir@
datarootdir = @datarootdir@
datadir = @datadir@$(ldap_subdir)
includedir = @includedir@
infodir = @infodir@
......@@ -159,6 +160,7 @@ LUTIL_LIBS = @LUTIL_LIBS@
LTHREAD_LIBS = @LTHREAD_LIBS@
BDB_LIBS = @BDB_LIBS@
SLAPD_NDB_LIBS = @SLAPD_NDB_LIBS@
LDAP_LIBLBER_LA = $(LDAP_LIBDIR)/liblber/liblber.la
LDAP_LIBLDAP_LA = $(LDAP_LIBDIR)/libldap/libldap.la
......
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
* Copyright 1998-2008 The OpenLDAP Foundation.
* Copyright 1998-2011 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
......@@ -13,6 +13,6 @@
*/
static const char copyright[] =
"Copyright 1998-2008 The OpenLDAP Foundation. All rights reserved.\n"
"Copyright 1998-2011 The OpenLDAP Foundation. All rights reserved.\n"
"COPYING RESTRICTIONS APPLY.\n";
......@@ -2,7 +2,7 @@
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
## Copyright 1998-2008 The OpenLDAP Foundation.
## Copyright 1998-2011 The OpenLDAP Foundation.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
......
......@@ -2,7 +2,7 @@
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
## Copyright 1998-2008 The OpenLDAP Foundation.
## Copyright 1998-2011 The OpenLDAP Foundation.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
......@@ -14,10 +14,10 @@
## <http://www.OpenLDAP.org/license.html>.
ol_package=OpenLDAP
ol_major=2
ol_minor=X
ol_minor=4
ol_patch=X
ol_api_inc=000000
ol_api_current=0
ol_api_inc=20425
ol_api_current=9
ol_api_revision=0
ol_api_age=0
ol_release_date="0000/00/00"
ol_api_age=7
ol_release_date="2011/03/26"
......@@ -2,7 +2,7 @@
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
## Copyright 1998-2008 The OpenLDAP Foundation.
## Copyright 1998-2011 The OpenLDAP Foundation.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
......
......@@ -2,7 +2,7 @@
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
## Copyright 1998-2008 The OpenLDAP Foundation.
## Copyright 1998-2011 The OpenLDAP Foundation.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
......@@ -15,10 +15,10 @@
SRCS = ldapsearch.c ldapmodify.c ldapdelete.c ldapmodrdn.c \
ldappasswd.c ldapwhoami.c ldapcompare.c \
ldapexop.c common.c
ldapexop.c ldapurl.c common.c
OBJS = ldapsearch.o ldapmodify.o ldapdelete.o ldapmodrdn.o \
ldappasswd.o ldapwhoami.o ldapcompare.o \
ldapexop.o common.o
ldapexop.o ldapurl.o common.o
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
......@@ -29,10 +29,10 @@ XLIBS = $(LDAP_L)
XXLIBS = $(SECURITY_LIBS) $(LUTIL_LIBS)
XSRCS = ldsversion.c ldmversion.c lddversion.c ldrversion.c \
ldpversion.c ldwversion.c ldcversion.c ldeversion.c
ldpversion.c ldwversion.c ldcversion.c ldeversion.c lduversion.c
PROGRAMS = ldapsearch ldapmodify ldapdelete ldapmodrdn \
ldappasswd ldapwhoami ldapcompare ldapexop
ldappasswd ldapwhoami ldapcompare ldapexop ldapurl
ldapsearch: ldsversion.o
......@@ -59,6 +59,9 @@ ldapcompare: ldcversion.o
ldapexop: ldeversion.o
$(LTLINK) -o $@ ldapexop.o common.o ldeversion.o $(LIBS)
ldapurl: lduversion.o
$(LTLINK) -o $@ ldapurl.o lduversion.o $(LIBS)
ldsversion.c: Makefile
@-$(RM) $@
$(MKVERSION) $(MKVOPTS) ldapsearch > $@
......@@ -107,6 +110,12 @@ ldeversion.c: Makefile
ldeversion.o: ldapexop.o common.o $(XLIBS)
lduversion.c: Makefile
@-$(RM) $@
$(MKVERSION) $(MKVOPTS) ldapurl > $@
lduversion.o: ldapurl.o $(XLIBS)
install-local: FORCE
-$(MKDIR) $(DESTDIR)$(bindir)
@( \
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
* Copyright 1998-2008 The OpenLDAP Foundation.
* Copyright 1998-2011 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
......@@ -55,6 +55,7 @@ extern int dont;
extern int referrals;
extern int verbose;
extern int ldif;
extern ber_len_t ldif_wrap;
extern char *prog;
/* connection */
......@@ -93,6 +94,9 @@ extern struct berval pr_cookie;
#ifdef LDAP_CONTROL_X_CHAINING_BEHAVIOR
extern int chaining;
#endif /* LDAP_CONTROL_X_CHAINING_BEHAVIOR */
extern ber_int_t vlvPos;
extern ber_int_t vlvCount;
extern struct berval *vlvContext;
/* options */
extern struct timeval nettimeout;
......
......@@ -2,7 +2,7 @@
/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
* Copyright 1998-2008 The OpenLDAP Foundation.
* Copyright 1998-2011 The OpenLDAP Foundation.
* Portions Copyright 1998-2003 Kurt D. Zeilenga.
* Portions Copyright 1998-2001 Net Boolean Incorporated.
* All rights reserved.
......@@ -85,6 +85,8 @@ usage( void )
fprintf( stderr, _("Compare options:\n"));
fprintf( stderr, _(" -E [!]<ext>[=<extparam>] compare extensions (! indicates criticality)\n"));
fprintf( stderr, _(" !dontUseCopy (Don't Use Copy)\n"));
fprintf( stderr, _(" -M enable Manage DSA IT control (-MM to make critical)\n"));
fprintf( stderr, _(" -P version protocol version (default: 3)\n"));
fprintf( stderr, _(" -z Quiet mode,"
" don't print anything, use return values\n"));
tool_common_usage();
......@@ -102,7 +104,7 @@ static int docompare LDAP_P((
const char options[] = "z"
"Cd:D:e:h:H:IMnO:o:p:P:QR:U:vVw:WxX:y:Y:Z";
"Cd:D:e:h:H:IMnNO:o:p:P:QR:U:vVw:WxX:y:Y:Z";
#ifdef LDAP_CONTROL_DONTUSECOPY
int dontUseCopy = 0;
......@@ -228,16 +230,6 @@ main( int argc, char **argv )
ld = tool_conn_setup( 0, 0 );
if ( pw_file || want_bindpw ) {
if ( pw_file ) {
rc = lutil_get_filed_password( pw_file, &passwd );
if( rc ) return EXIT_FAILURE;
} else {
passwd.bv_val = getpassphrase( _("Enter LDAP Password: ") );
passwd.bv_len = passwd.bv_val ? strlen( passwd.bv_val ) : 0;
}
}
tool_bind( ld );
if ( 0
......
......@@ -2,7 +2,7 @@
/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
* Copyright 1998-2008 The OpenLDAP Foundation.
* Copyright 1998-2011 The OpenLDAP Foundation.
* Portions Copyright 1998-2003 Kurt D. Zeilenga.
* All rights reserved.
*
......@@ -71,6 +71,10 @@ usage( void )
fprintf( stderr, _(" dn: list of DNs to delete. If not given, it will be readed from stdin\n"));
fprintf( stderr, _(" or from the file specified with \"-f file\".\n"));
fprintf( stderr, _("Delete Options:\n"));
fprintf( stderr, _(" -c continuous operation mode (do not stop on errors)\n"));
fprintf( stderr, _(" -f file read operations from `file'\n"));
fprintf( stderr, _(" -M enable Manage DSA IT control (-MM to make critical)\n"));
fprintf( stderr, _(" -P version protocol version (default: 3)\n"));
fprintf( stderr, _(" -r delete recursively\n"));
tool_common_usage();
exit( EXIT_FAILURE );
......@@ -78,7 +82,7 @@ usage( void )
const char options[] = "r"
"cd:D:e:f:h:H:IMnO:o:p:P:QR:U:vVw:WxX:y:Y:z:Z";
"cd:D:e:f:h:H:IMnNO:o:p:P:QR:U:vVw:WxX:y:Y:z:Z";
int
handle_private_option( int i )
......@@ -162,12 +166,10 @@ int
main( int argc, char **argv )
{
char buf[ 4096 ];
FILE *fp;
FILE *fp = NULL;
LDAP *ld;
int rc, retval;
fp = NULL;
tool_init( TOOL_DELETE );
prog = lutil_progname( "ldapdelete", argc, argv );
......@@ -179,23 +181,13 @@ main( int argc, char **argv )
exit( EXIT_FAILURE );
}
} else {
if ( optind >= argc ) {
fp = stdin;
if ( optind >= argc ) {
fp = stdin;
}
}
}
ld = tool_conn_setup( 0, &private_conn_setup );
if ( pw_file || want_bindpw ) {
if ( pw_file ) {
rc = lutil_get_filed_password( pw_file, &passwd );
if( rc ) return EXIT_FAILURE;
} else {
passwd.bv_val = getpassphrase( _("Enter LDAP Password: ") );
passwd.bv_len = passwd.bv_val ? strlen( passwd.bv_val ) : 0;
}
}
tool_bind( ld );
tool_server_controls( ld, NULL, 0 );
......@@ -222,6 +214,8 @@ main( int argc, char **argv )
retval = rc;
}
}
if ( fp != stdin )
fclose( fp );
}
tool_unbind( ld );
......
......@@ -2,7 +2,7 @@
/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
* Copyright 2005-2008 The OpenLDAP Foundation.
* Copyright 2005-2011 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
......@@ -43,13 +43,16 @@ usage( void )
{
fprintf( stderr, _("Issue LDAP extended operations\n\n"));
fprintf( stderr, _("usage: %s [options] <oid|oid:data|oid::b64data>\n"), prog);
fprintf( stderr, _(" %s [options] whoami\n"), prog);
fprintf( stderr, _(" %s [options] cancel <id>\n"), prog);
fprintf( stderr, _(" %s [options] refresh <DN> [<ttl>]\n"), prog);
tool_common_usage();
exit( EXIT_FAILURE );
}
const char options[] = ""
"d:D:e:h:H:InO:o:p:QR:U:vVw:WxX:y:Y:Z";
"d:D:e:h:H:InNO:o:p:QR:U:vVw:WxX:y:Y:Z";
int
handle_private_option( int i )
......@@ -72,7 +75,7 @@ main( int argc, char *argv[] )
char *matcheddn = NULL, *text = NULL, **refs = NULL;
LDAPControl **ctrls = NULL;
int id, code;
LDAPMessage *res;
LDAPMessage *res = NULL;
tool_init( TOOL_EXOP );
prog = lutil_progname( "ldapexop", argc, argv );
......@@ -86,16 +89,6 @@ main( int argc, char *argv[] )
usage();
}
if ( pw_file || want_bindpw ) {
if ( pw_file ) {
rc = lutil_get_filed_password( pw_file, &passwd );
if( rc ) return EXIT_FAILURE;
} else {
passwd.bv_val = getpassphrase( _("Enter LDAP Password: ") );
passwd.bv_len = passwd.bv_val ? strlen( passwd.bv_val ) : 0;
}
}
ld = tool_conn_setup( 0, 0 );
tool_bind( ld );
......@@ -152,8 +145,6 @@ main( int argc, char *argv[] )
case 2:
dn.bv_val = argv[ 1 ];
dn.bv_len = strlen( dn.bv_val );
case 1:
break;
default:
......@@ -256,7 +247,7 @@ main( int argc, char *argv[] )
char *retoid = NULL;
struct berval *retdata = NULL;
rc = ldap_parse_extended_result( ld, res, &retoid, &retdata, 1 );
rc = ldap_parse_extended_result( ld, res, &retoid, &retdata, 0 );
if ( rc != LDAP_SUCCESS ) {
tool_perror( "ldap_parse_extended_result", rc, NULL, NULL, NULL, NULL );
......@@ -303,7 +294,7 @@ main( int argc, char *argv[] )
printf(_("# extended operation response\n"));
}
rc = ldap_parse_extended_result( ld, res, &retoid, &retdata, 1 );
rc = ldap_parse_extended_result( ld, res, &retoid, &retdata, 0 );
if ( rc != LDAP_SUCCESS ) {
tool_perror( "ldap_parse_extended_result", rc, NULL, NULL, NULL, NULL );
rc = EXIT_FAILURE;
......@@ -357,6 +348,8 @@ main( int argc, char *argv[] )
skip:
/* disconnect from server */
if ( res )
ldap_msgfree( res );
tool_unbind( ld );
tool_destroy();
......
This diff is collapsed.