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
// $OpenLDAP$
/*
* Copyright 2000-2019 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#ifndef STRING_LIST_H
#define STRING_LIST_H
#include <string>
#include <list>
/**
* Container class to store multiple string-objects
*/
class StringList{
typedef std::list<std::string> ListType;
private:
ListType m_data;
public:
typedef ListType::const_iterator const_iterator;
/**
* Constructs an empty list.
*/
StringList();
/**
* Copy-constructor
*/
StringList(const StringList& sl);
/**
* For internal use only
*
* This constructor is used by the library internally to create a
* list of string from a array for c-Strings (char*)thar was
* returned by the C-API
*/
StringList(char** values);
/**
* Destructor
*/
~StringList();
/**
* The methods converts the list to a 0-terminated array of
* c-Strings.
*/
char** toCharArray() const;
/**
* Adds one element to the end of the list.
* @param attr The attribute to add to the list.
*/
void add(const std::string& value);
/**
* @return The number of strings that are currently
* stored in this list.
*/
size_t size() const;
/**
* @return true if there are zero strings currently
* stored in this list.
*/
bool empty() const;
/**
* @return A iterator that points to the first element of the list.
*/
const_iterator begin() const;
/**
* @return A iterator that points to the element after the last
* element of the list.
*/
const_iterator end() const;
/**
* removes all elements from the list
*/
void clear();
};
#endif //STRING_LIST_H
// $OpenLDAP$
/*
* Copyright 2010-2019 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#include <fstream>
#include <sstream>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <unistd.h>
#include <cstring>
#include "TlsOptions.h"
#include "LDAPException.h"
enum opttype {
INT=0,
STRING,
OTHER
};
typedef struct tls_optmap {
int optval;
opttype type;
} tls_optmap_t;
static tls_optmap_t optmap[] = {
{ LDAP_OPT_X_TLS_CACERTFILE, STRING },
{ LDAP_OPT_X_TLS_CACERTDIR, STRING },
{ LDAP_OPT_X_TLS_CERTFILE, STRING },
{ LDAP_OPT_X_TLS_KEYFILE, STRING },
{ LDAP_OPT_X_TLS_REQUIRE_CERT, INT },
{ LDAP_OPT_X_TLS_PROTOCOL_MIN, INT },
{ LDAP_OPT_X_TLS_CIPHER_SUITE, STRING },
{ LDAP_OPT_X_TLS_RANDOM_FILE, STRING },
{ LDAP_OPT_X_TLS_CRLCHECK, INT },
{ LDAP_OPT_X_TLS_DHFILE, STRING },
{ LDAP_OPT_X_TLS_NEWCTX, INT }
};
#if 0 /* not implemented currently */
static const int TLS_CRLFILE /* GNUtls only */
static const int TLS_SSL_CTX /* OpenSSL SSL* */
static const int TLS_CONNECT_CB
static const int TLS_CONNECT_ARG
#endif
static void checkOpt( TlsOptions::tls_option opt, opttype type ) {
if ( opt < TlsOptions::CACERTFILE || opt >= TlsOptions::LASTOPT ){
throw( LDAPException( LDAP_PARAM_ERROR, "unknown Option" ) );
}
if ( optmap[opt].type != type ){
throw( LDAPException( LDAP_PARAM_ERROR, "not a string option" ) );
}
}
TlsOptions::TlsOptions() : m_ld(NULL) {}
TlsOptions::TlsOptions( LDAP* ld ): m_ld(ld) { }
void TlsOptions::setOption( tls_option opt, const std::string& value ) const {
checkOpt(opt, STRING);
switch(opt) {
case TlsOptions::CACERTFILE :
case TlsOptions::CERTFILE :
case TlsOptions::KEYFILE :
{
// check if the supplied file is actually readable
std::ifstream ifile(value.c_str());
if ( !ifile ) {
throw( LDAPException( LDAP_LOCAL_ERROR, "Unable to open the supplied file for reading" ) );
}
}
break;
case TlsOptions::CACERTDIR :
{
struct stat st;
std::ostringstream msg;
bool fail=false;
int err = stat(value.c_str(),&st);
if ( err ) {
msg << strerror(errno);
fail = true;
} else {
if ( !S_ISDIR(st.st_mode) ){
msg << "The supplied path is not a directory.";
fail = true;
}
}
if ( fail ) {
std::ostringstream errstr;
errstr << "Error while setting Certificate Directory (" << value << "): " << msg.str();
throw( LDAPException( LDAP_LOCAL_ERROR, errstr.str() ) );
}
}
break;
}
this->setOption( opt, value.empty() ? NULL : (void*) value.c_str() );
}
void TlsOptions::setOption( tls_option opt, int value ) const {
checkOpt(opt, INT);
this->setOption( opt, (void*) &value);
}
void TlsOptions::setOption( tls_option opt, void *value ) const {
int ret = ldap_set_option( m_ld, optmap[opt].optval, value);
if ( ret != LDAP_OPT_SUCCESS )
{
if ( ret != LDAP_OPT_ERROR ){
throw( LDAPException( ret ));
} else {
throw( LDAPException( LDAP_PARAM_ERROR, "error while setting TLS option" ) );
}
}
this->newCtx();
}
void TlsOptions::getOption( tls_option opt, void* value ) const {
int ret = ldap_get_option( m_ld, optmap[opt].optval, value);
if ( ret != LDAP_OPT_SUCCESS )
{
if ( ret != LDAP_OPT_ERROR ){
throw( LDAPException( ret ));
} else {
throw( LDAPException( LDAP_PARAM_ERROR, "error while reading TLS option" ) );
}
}
}
int TlsOptions::getIntOption( tls_option opt ) const {
int value;
checkOpt(opt, INT);
ldap_get_option( m_ld, optmap[opt].optval, (void*) &value);
return value;
}
std::string TlsOptions::getStringOption( tls_option opt ) const {
char *value;
checkOpt(opt, STRING);
ldap_get_option( m_ld, optmap[opt].optval, (void*) &value);
std::string strval;
if (value)
{
strval=std::string(value);
ldap_memfree(value);
}
return strval;
}
void TlsOptions::newCtx() const {
int val = 0;
int ret = ldap_set_option( m_ld, LDAP_OPT_X_TLS_NEWCTX, &val);
if ( ret != LDAP_OPT_SUCCESS )
{
if ( ret != LDAP_OPT_ERROR ){
throw( LDAPException( ret ));
} else {
throw( LDAPException( LDAP_LOCAL_ERROR, "error while renewing TLS context" ) );
}
}
}
// $OpenLDAP$
/*
* Copyright 2010-2019 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#ifndef TLS_OPTIONS_H
#define TLS_OPTIONS_H
#include <string>
#include <ldap.h>
/**
* Class to access the global (and connection specific) TLS Settings
* To access the global TLS Settings just instantiate a TlsOption object
* using the default constructor.
*
* To access connection specific settings instantiate a TlsOption object
* through the getTlsOptions() method from the corresponding
* LDAPConnection/LDAPAsynConnection object.
*
*/
class TlsOptions {
public:
/**
* Available TLS Options
*/
enum tls_option {
CACERTFILE=0,
CACERTDIR,
CERTFILE,
KEYFILE,
REQUIRE_CERT,
PROTOCOL_MIN,
CIPHER_SUITE,
RANDOM_FILE,
CRLCHECK,
DHFILE,
/// @cond
LASTOPT /* dummy */
/// @endcond
};
/**
* Possible Values for the REQUIRE_CERT option
*/
enum verifyMode {
NEVER=0,
HARD,
DEMAND,
ALLOW,
TRY
};
/**
* Possible Values for the CRLCHECK option
*/
enum crlMode {
CRL_NONE=0,
CRL_PEER,
CRL_ALL
};
/**
* Default constructor. Gives access to the global TlsSettings
*/
TlsOptions();
/**
* Set string valued options.
* @param opt The following string valued options are available:
* - TlsOptions::CACERTFILE
* - TlsOptions::CACERTDIR
* - TlsOptions::CERTFILE
* - TlsOptions::KEYFILE
* - TlsOptions::CIPHER_SUITE
* - TlsOptions::RANDOM_FILE
* - TlsOptions::DHFILE
* @param value The value to apply to that option,
* - TlsOptions::CACERTFILE:
* The path to the file containing all recognized Certificate
* Authorities
* - TlsOptions::CACERTDIR:
* The path to a directory containing individual files of all
* recognized Certificate Authority certificates
* - TlsOptions::CERTFILE:
* The path to the client certificate
* - TlsOptions::KEYFILE:
* The path to the file containing the private key matching the
* Certificate that as configured with TlsOptions::CERTFILE
* - TlsOptions::CIPHER_SUITE
* Specifies the cipher suite and preference order
* - TlsOptions::RANDOM_FILE
* Specifies the file to obtain random bits from when
* /dev/[u]random is not available.
* - TlsOptions::DHFILE
* File containing DH parameters
*/
void setOption(tls_option opt, const std::string& value) const;
/**
* Set integer valued options.
* @param opt The following string valued options are available:
* - TlsOptions::REQUIRE_CERT
* - TlsOptions::PROTOCOL_MIN
* - TlsOptions::CRLCHECK
* @param value The value to apply to that option,
* - TlsOptions::REQUIRE_CERT:
* Possible Values (For details see the ldap.conf(5) man-page):
* - TlsOptions::NEVER
* - TlsOptions::DEMAND
* - TlsOptions::ALLOW
* - TlsOptions::TRY
* - TlsOptions::PROTOCOL_MIN
* - TlsOptions::CRLCHECK
* Possible Values:
* - TlsOptions::CRL_NONE
* - TlsOptions::CRL_PEER
* - TlsOptions::CRL_ALL
*/
void setOption(tls_option opt, int value) const;
/**
* Generic setOption variant. Generally you should prefer to use one
* of the other variants
*/
void setOption(tls_option opt, void *value) const;
/**
* Read integer valued options
* @return Option value
* @throws LDAPException in case of error (invalid on non-integer
* valued option is requested)
*/
int getIntOption(tls_option opt) const;
/**
* Read string valued options
* @return Option value
* @throws LDAPException in case of error (invalid on non-string
* valued option is requested)
*/
std::string getStringOption(tls_option opt) const;
/**
* Read options value. Usually you should prefer to use either
* getIntOption() or getStringOption()
* @param value points to a buffer containing the option value
* @throws LDAPException in case of error (invalid on non-string
* valued option is requested)
*/
void getOption(tls_option opt, void *value ) const;
private:
TlsOptions( LDAP* ld );
void newCtx() const;
LDAP *m_ld;
friend class LDAPAsynConnection;
};
#endif /* TLS_OPTIONS_H */
/* Generic time.h */
/* $OpenLDAP$ */
/*
* Copyright 1998-2019 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
#ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#elif defined 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 */
/* src/config.h.in. Generated from configure.in by autoheader. */
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <ldap.h> header file. */
#undef HAVE_LDAP_H
/* Define to 1 if you have the `resolv' library (-lresolv). */
#undef HAVE_LIBRESOLV
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <termios.h> header file. */
#undef HAVE_TERMIOS_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Version number of package */
#undef VERSION
/* Define to 1 ot enable debug logging */
#undef WITH_DEBUG
// $OpenLDAP$
/*
* Copyright 2000-2019 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#ifndef DEBUG_H
#define DEBUG_H
#include <iostream>
#include "config.h"
#define LDAP_DEBUG_NONE 0x0000
#define LDAP_DEBUG_TRACE 0x0001
#define LDAP_DEBUG_CONSTRUCT 0x0002
#define LDAP_DEBUG_DESTROY 0x0004
#define LDAP_DEBUG_PARAMETER 0x0008
#define LDAP_DEBUG_ANY 0xffff
#define DEBUGLEVEL LDAP_DEBUG_ANY
#define PRINT_FILE \
std::cerr << "file: " __FILE__ << " line: " << __LINE__
#ifdef WITH_DEBUG
#define DEBUG(level, arg) \
if((level) & DEBUGLEVEL){ \
std::cerr << arg ; \
}
#else
#undef DEBUG
#define DEBUG(level,arg)
#endif //WITH_DEBUG
#endif // DEBUG_H
timestamp
#! /bin/sh
# $OpenLDAP$
#
# Copyright 2008-2019 The OpenLDAP Foundation. All Rights Reserved.
# COPYING RESTRICTIONS APPLY, see COPYRIGHT file
DIR=`dirname $0`
. $DIR/version.var
echo OL_CPP_API_VERSION=$ol_cpp_api_current:$ol_cpp_api_revision:$ol_cpp_api_age
echo OL_CPP_API_RELEASE=$ol_cpp_api_rel_major.$ol_cpp_api_rel_minor.$ol_cpp_api_rel_patch
#! /bin/sh
# $OpenLDAP$
#
# Copyright 2008-2019 The OpenLDAP Foundation. All Rights Reserved.
# COPYING RESTRICTIONS APPLY, see COPYRIGHT file
ol_cpp_api_rel_major=0
ol_cpp_api_rel_minor=0
ol_cpp_api_rel_patch=0
ol_cpp_api_current=0
ol_cpp_api_revision=0
ol_cpp_api_age=0
Package rersion 2.0:
- Detects OpenLDAP 2.0 and builds correctly with it.
- Increment major version to 2, library file to libldaptcl2.0.so.
- Can now perform add/delete/replace modifications in a single command.
- Replaced calls to TclX_WrongArgs with core Tcl_WrongNumArgs to reduce
dependency on Extended Tcl.
- Wrap dereference search control with #ifdef LDAP_OPT_DEREF.
- Deref during search should work.
- Add protocol_version option to ldap init command.
- Add LDAPTCL_PROTOCOL_VERSION_DEFAULT to allow specifying the default
protocol version used.
- Add controlArray(timeout) to control timeouts during searches.
- Add controlArray(cache) to control caching current search results.
(Experience has shown this to be not very useful or not working correctly.
Caching search results should probably be done in Ldaptcl rather than
letting the LDAP API do it.)
- Add "compare" subcommand
- Add experimental trap subcommand (undocumented -- use at your own risk).
Package version 1.2:
- Filter no longer a required controlArray member, defaults to objectclass=*.
- Sets errorCode with LDAP macro string value (better to test than the more
human readable values).
- Shorten minimum required characters for search scope definitions: now allows
"base", "one", and "sub". For the latter two, additional characters are
ignored.
- Now compiles successfully with -devel branch.
- Client cache management code enabled for OpenLDAP versions <= 1.2.4. (This
code is relatively untested and feedback is welcome.)
Copyright 1998-2019 The OpenLDAP Foundation. All rights reserved.
COPYING RESTRICTIONS APPLY.
See COPYRIGHT and LICENSE files in the top-level directory of this
distribution (i.e., ../../COPYRIGHT and ../../LICENSE, respectively).
---
NeoSoft Tcl client extensions to Lightweight Directory Access Protocol.
Copyright (c) 1998-1999 NeoSoft, Inc.
All Rights Reserved.
This software may be used, modified, copied, distributed, and sold,
in both source and binary form provided that these copyrights are
retained and their terms are followed.
Under no circumstances are the authors or NeoSoft Inc. responsible
for the proper functioning of this software, nor do the authors
assume any liability for damages incurred with its use.
Redistribution and use in source and binary forms are permitted
provided that this notice is preserved and that due credit is given
to NeoSoft, Inc.
NeoSoft, Inc. 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.
Requests for permission may be sent to NeoSoft Inc, 1770 St. James Place,
Suite 500, Houston, TX, 77056.
#
# This file is a Makefile for Neo, the NeoSoft extensions to Tcl.
# If it has the name "Makefile.in" then it is a template for a
# Makefile; to generate the actual Makefile, run "./configure",
# which is a configuration script generated by the "autoconf" program
# (constructs like "@foo@" will get replaced in the actual Makefile.
#
VERSION = @NEO_VERSION@
LIBNAME = @NEO_SHARED_LIB_FILE@
# Default top-level directories in which to install architecture-
# specific files (exec_prefix) and machine-independent files such
# as scripts (prefix). The values specified here may be overridden
# at configure-time with the --exec-prefix and --prefix options
# to the "configure" script.
prefix = @prefix@
exec_prefix = @exec_prefix@
# The following definition can be set to non-null for special systems
# like AFS with replication. It allows the pathnames used for installation
# to be different than those used for actually reference files at
# run-time. DESTDIR is prepended to $prefix and $exec_prefix
# when installing files.
DESTDIR =
# Directory in which to search for tcl libraries
NEO_LIBRARY = $(exec_prefix)/lib/ldaptcl$(VERSION)
# Directory in which to install the ldaptcl binary:
BIN_INSTALL_DIR = $(DESTDIR)$(exec_prefix)/bin
# Directory in which to install the .a or .so binary for the Neo library:
LIB_INSTALL_DIR = $(DESTDIR)$(exec_prefix)/lib
# Path to use at runtime to refer to LIB_INSTALL_DIR:
LIB_RUNTIME_DIR = $(exec_prefix)/lib
# Top-level directory for man entries:
MANN_INSTALL_DIR = $(DESTDIR)$(prefix)/man/mann
# The symbols below provide support for dynamic loading and shared
# libraries. The values of the symbols are normally set by the
# configure script. You shouldn't normally need to modify any of
# these definitions by hand.
SHLIB_CFLAGS = @NEO_SHLIB_CFLAGS@
NEO_LIB_FILE = @NEO_LIB_FILE@
NEO_SHARED_LIB_FILE = @NEO_SHARED_LIB_FILE@
# The directory containing the Tcl sources and headers appropriate
# for this version of Neo ("srcdir" will be replaced or has already
# been replaced by the configure script):
TCL_GENERIC_DIR = @TCL_SRC_DIR@/generic
# The top of the TclX directory tree
TCLX_TOP_DIR = @TCLX_TOP_DIR@
# The directory where tclExtend.h will be:
TCLX_TCL_GEN_DIR = ${TCLX_TOP_DIR}/tcl/generic
# The directory where tclXunixPort.h will be:
TCLX_TCL_UNIX_DIR = ${TCLX_TOP_DIR}/tcl/unix
# The path to tclX the runtcl script:
TCLX_RUNTCL = ${TCLX_TOP_DIR}/unix/runtcl
# The directory containing the Tcl library archive file appropriate
# for this version of Neo:
TCL_BIN_DIR = @TCL_BIN_DIR@
# The symbol below provides support for dynamic loading and shared
# libraries. See configure.in for a description of what it means.
# The values of the symbolis normally set by the configure script.
SHLIB_LD = @SHLIB_LD@
# Set to the options to include libldap.a and liblber.a
# (eg. -L../tools/blah -lldap -llber)
LDAP_LIBFLAGS = @ldaplibflags@
LDAP_CFLAGS = @ldapinclude@
LDAP_INCDIR = @ldapincdir@
LDAP_BUILD = @ldapbuild@
LDAP_DIR = @ldapdir@
#----------------------------------------------------------------
# The information below is modified by the configure script when
# Makefile is generated from Makefile.in. You shouldn't normally
# modify any of this stuff by hand.
#----------------------------------------------------------------
AC_FLAGS = @DEFS@
INSTALL= @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
RANLIB = @RANLIB@
SRC_DIR = @srcdir@/..
TOP_DIR = @srcdir@/..
GENERIC_DIR = $(TOP_DIR)/generic
#----------------------------------------------------------------
# The information below should be usable as is. The configure
# script won't modify it and you shouldn't need to modify it
# either.
#----------------------------------------------------------------
OBJS= neoXldap.o
LIBDIR=$(exec_prefix)/lib
INCDIR=$(prefix)/include
LIBS= @LIBS@ @TCLX_LIB_SPEC@ @TCL_LIB_SPEC@ @TCL_LIBS@ $(LDAP_LIBFLAGS) -lc
TK_LIBS=@TKX_LIB_SPEC@ @TK_LIB_SPEC@ @TK_LIBS@
TK_VERSION=@TK_VERSION@
CC = @CC@
CC_SWITCHES = ${CFLAGS} @NEO_SHLIB_CFLAGS@ -I. \
-I@prefix@/include ${AC_FLAGS} ${PROTO_FLAGS} \
${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} \
-DNEO_LIBRARY=\"${NEO_LIBRARY}\" -DVERSION=\"${VERSION}\"
TK_SWITCHES = ${CC_SWITCHES} @TK_XINCLUDES@
.c.o:
$(CC) -c $(CC_SWITCHES) $<
all: @NEO_LIB_FILE@ ldaptclsh @LDAPWISH@
@NEO_LIB_FILE@: $(OBJS)
rm -f @NEO_LIB_FILE@
@MAKE_LIB@
$(RANLIB) @NEO_LIB_FILE@
neoXldap.o: neoXldap.c ldaptclerr.h
$(CC) -c $(LDAP_CFLAGS) $(CC_SWITCHES) neoXldap.c
ldaptclerr.h: ldaperr.tcl
tcl ldaperr.tcl $(LDAP_INCDIR)/ldap.h > ldaptclerr.h
clean:
-rm -f ldaptclsh ldapwish
-rm -f *.o *.a *.so*
distclean: clean
rm -f Makefile pkgIndex.tcl config.cache config.log config.status \
ldaptclerr.h
install: install-binaries install-man
install-binaries: @NEO_LIB_FILE@ ldaptclsh @LDAPWISH@
@-mkdir -p $(BIN_INSTALL_DIR)
$(INSTALL_PROGRAM) ldaptclsh $(BIN_INSTALL_DIR)/ldaptclsh
@if [ -n "@LDAPWISH@" ] ; then \
echo $(INSTALL_PROGRAM) ldapwish $(BIN_INSTALL_DIR)/ldapwish; \
$(INSTALL_PROGRAM) ldapwish $(BIN_INSTALL_DIR)/ldapwish; \
fi
$(INSTALL_DATA) @NEO_LIB_FILE@ $(LIB_INSTALL_DIR)
@if [ "$(NEO_LIB_FILE)" = "$(NEO_SHARED_LIB_FILE)" ] ; then \
echo Installing pkgIndex.tcl in $(NEO_LIBRARY); \
mkdir -p $(NEO_LIBRARY); \
$(INSTALL_DATA) pkgIndex.tcl $(NEO_LIBRARY); \
fi
install-man:
@for i in ldap.n; \
do \
echo "Installing $$i"; \
rm -f $(MANN_INSTALL_DIR)/$$i; \
sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
$$i > $(MANN_INSTALL_DIR)/$$i; \
chmod 444 $(MANN_INSTALL_DIR)/$$i; \
done;
TCLOFILES= tclAppInit.o
ldaptclsh:$(TCLOFILES) @NEO_LIB_FILE@
$(CC) @LD_FLAGS@ $(TCLOFILES) @NEO_BUILD_LIB_SPEC@ $(LIBS) \
@TCL_LD_SEARCH_FLAGS@ -o ldaptclsh
tkAppInit.o: tkAppInit.c
$(CC) -c ${TK_SWITCHES} tkAppInit.c
ldapwish:tkAppInit.o @NEO_LIB_FILE@
$(CC) @LD_FLAGS@ tkAppInit.o @NEO_BUILD_LIB_SPEC@ $(TK_LIBS) $(LIBS) \
@TCL_LD_SEARCH_FLAGS@ -o ldapwish
Copyright (c) 1998-1999 NeoSoft, Inc.
For licensing information, see the file neoXldap.c and/or the COPYRIGHT
file contained in the directory you found this file.
This directory contains an extension to Tcl to interface with an
LDAP server. While this software is being released to the OpenLDAP
community, it is the authors' intention that support continue (and
be added) for other client libraries as well. As time goes on, it
is expected that code will converge rather than diverge.
Support is provided for University of Michigan LDAP version 3.3,
OpenLDAP, and Netscape. The default configuration supports
OpenLDAP 1.2.4 and above.
OpenLDAP 2.x is supported, but there is not yet any support for
using SASL or TLS. There may be interface changes in the LDAP API
which the author is unaware of (a leak was recently fixed for the
return values of ldap_first/next_attribute() calls).
It uses GNU autoconf. It builds and installs without requiring
parallel directories, but it does require that Tcl and Extended Tcl
are installed in the directory pointed to by --prefix (/usr/local
by default).
For further info, try "./configure --help".
For example, I run:
./configure --prefix=/opt/neotcl --enable-shared \
--with-ldap=/usr/local/ldap
Remember that --prefix must be the same prefix used when building
and installint Tcl.
Netscape configuration has not been well tested, and you may have to
play with the resulting Makefile to get it to work. In particular,
you will probably need to modify the LDAP_LIBFLAGS. However, the
C code itself is reasonably well tested with Netscape.
This module will install a regular shell (ldaptclsh) a windowing
shell (ldapwish) a library, a pkgIndex.tcl, and a manpage (ldap.n).
If your Tcl installation has been configured with --enable-shared,
then you must also use --enable-shared here.
Shared libraries and Tcl packages.
If Tcl is built with --enable-shared, AND OpenLDAP (or another version
for that matter) has been build to create -llber and -lldap as shared
libaries, AND you build ldaptcl with --enable-shared, it should be
possible to run a plain Tcl interpreter (eg. tclsh8.0) and do
package require Ldaptcl
which will install the "ldap" command into the interpreter.
You may need to set the LD_LIBRARY_PATH environment variable appropriately,
or use -R or -W,-rpath ld command options to resolve the search for ldap
and lber libraries.
This package was test built on a Alpha OSF4.0e with the native C
compiler.
Please email comments or bug fixes to openldap-devel@OpenLDAP.org,
or to kunkee@OpenLDAP.org. I would also like to know if you are
using this interface, so I invite you to drop me an email if you do.