mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ./src/config.h
CONFIG_CLEAN_FILES =
-DIST_COMMON = README AUTHORS INSTALL Makefile.am Makefile.in TODO \
-acconfig.h aclocal.m4 config.guess config.sub configure configure.in \
-install-sh ltconfig ltmain.sh missing mkinstalldirs src/config.h.in \
-src/stamp-h.in
+DIST_COMMON = README AUTHORS Makefile.am Makefile.in TODO acconfig.h \
+aclocal.m4 config.guess config.sub configure configure.in install-sh \
+ltconfig ltmain.sh missing mkinstalldirs src/config.h.in src/stamp-h.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
])
# 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.
+# the libltdl convenience library and INCLTDL to the include flags for
+# the libltdl header and adds --enable-ltdl-convenience to the
+# configure arguments. Note that LIBLTDL and INCLTDL are not
+# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
+# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
+# with '${top_builddir}/' and INCLTDL will be prefixed with
+# '${top_srcdir}/' (note the single quotes!). If your package is not
+# flat and you're not using automake, define top_builddir and
+# top_srcdir appropriately 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'])
+ LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
+ INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['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.
+# the libltdl installable library and INCLTDL to the include flags for
+# the libltdl header and adds --enable-ltdl-install to the configure
+# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
+# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
+# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
+# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
+# with '${top_srcdir}/' (note the single quotes!). If your package is
+# not flat and you're not using automake, define top_builddir and
+# top_srcdir appropriately 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,
])
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'])
+ LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
+ INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
else
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
LIBLTDL="-lltdl"
#ifndef LDAP_ADD_REQUEST_H
#define LDAP_ADD_REQUEST_H
-#include "LDAPRequest.h"
-#include "LDAPEntry.h"
+#include <LDAPRequest.h>
+#include <LDAPEntry.h>
class LDAPMessageQueue;
LDAPAsynConnection::~LDAPAsynConnection(){
DEBUG(LDAP_DEBUG_DESTROY,
"LDAPAsynConnection::~LDAPAsynConnection()" << endl);
+ delete m_constr;
unbind();
}
#include<ldap.h>
#include<lber.h>
-#include "LDAPMessageQueue.h"
-#include "LDAPConstraints.h"
-#include "LDAPModification.h"
-#include "LDAPModList.h"
-#include "LDAPUrl.h"
-#include "LDAPUrlList.h"
+#include <LDAPMessageQueue.h>
+#include <LDAPConstraints.h>
+#include <LDAPModification.h>
+#include <LDAPModList.h>
+#include <LDAPUrl.h>
+#include <LDAPUrlList.h>
class LDAPEntry;
class LDAPAttribute;
#include<ldap.h>
#include<lber.h>
-#include "StringList.h"
+#include <StringList.h>
/**
* Represents the name an value(s) of an Attribute
* This container class is used to store multiple LDAPAttribute-objects.
*/
class LDAPAttributeList{
- typedef AttrList::const_iterator const_iterator;
-
private :
AttrList m_attrs;
public :
+ typedef AttrList::const_iterator const_iterator;
+
/**
* Copy-constructor
#ifndef LDAP_BIND_REQUEST_H
#define LDAP_BIND_REQUEST_H
-#include "LDAPRequest.h"
+#include <LDAPRequest.h>
class LDAPBindRequest : LDAPRequest {
private:
#ifndef LDAP_COMPARE_REQUEST_H
#define LDAP_COMPARE_REQUEST_H
-#include "LDAPRequest.h"
+#include <LDAPRequest.h>
class LDAPMessageQueue;
}
}
delete res;
+ delete msg; // memcheck
}
void LDAPConnection::unbind(){
LDAPSearchResults* results= 0;
try{
+ results = new LDAPSearchResults();
msgq = LDAPAsynConnection::search(base,scope, filter, attrs, attrsOnly,
cons);
- results = new LDAPSearchResults();
res = results->readMessageQueue(msgq);
}catch(LDAPException e){
+ delete results; // memcheck
delete msgq;
throw;
}
case LDAPResult::REFERRAL :
{
LDAPUrlList urls = res->getReferralUrls();
+ delete results; // memcheck
delete res;
delete msgq;
throw LDAPReferralException(urls);
}
break;
default :
+ delete results; // memcheck
delete res;
delete msgq;
throw LDAPException(resCode);
#ifndef LDAP_CONNECTION_H
#define LDAP_CONNECTION_H
-#include "LDAPSearchResults.h"
-#include "LDAPExtResult.h"
-#include "LDAPAsynConnection.h"
+#include <LDAPSearchResults.h>
+#include <LDAPExtResult.h>
+#include <LDAPAsynConnection.h>
/** Main class for synchronous LDAP-Communication
*
* this connection
*/
LDAPConnection(const string& hostname="localhost", int port=389,
- LDAPConstraints* cons=0);
+ LDAPConstraints* cons=new LDAPConstraints());
/**
* Destructor
#include "debug.h"
+#include "config.h"
+#include "ac/time.h"
#include "LDAPConstraints.h"
#include "LDAPControlSet.h"
#ifndef LDAP_CONSTRAINTS_H
#define LDAP_CONSTRAINTS_H
#include <list>
-#include "config.h"
-#include "ac/time.h"
-#include "LDAPControl.h"
-#include "LDAPControlSet.h"
-#include "LDAPRebind.h"
+#include <LDAPControl.h>
+#include <LDAPControlSet.h>
+#include <LDAPRebind.h>
//TODO!!
// * implement the Alias-Handling Option (OPT_DEREF)
#include <list>
#include <ldap.h>
-#include "LDAPControl.h"
+#include <LDAPControl.h>
typedef list<LDAPCtrl> CtrlList;
#ifndef LDAP_DELETE_REQUEST_H
#define LDAP_DELETE_REQUEST_H
-#include "LDAPRequest.h"
+#include <LDAPRequest.h>
class LDAPMessageQueue;
class LDAPDeleteRequest : public LDAPRequest{
#define LDAP_ENTRY_H
#include <ldap.h>
-#include "LDAPAsynConnection.h"
-#include "LDAPAttributeList.h"
+#include <LDAPAsynConnection.h>
+#include <LDAPAttributeList.h>
/**
* This class is used to store every kind of LDAP Entry.
* LDAPEntry-Objects
*/
class LDAPEntryList{
- typedef EntryList::const_iterator const_iterator;
-
public:
+ typedef EntryList::const_iterator const_iterator;
+
/**
* Copy-Constructor
*/
#ifndef LDAP_EXT_REQUEST_H
#define LDAP_EXT_REQUEST_H
-#include "LDAPRequest.h"
+#include <LDAPRequest.h>
class LDAPExtRequest : LDAPRequest {
#include <ldap.h>
-#include "LDAPResult.h"
+#include <LDAPResult.h>
class LDAPRequest;
#define LDAP_MSG_H
#include <ldap.h>
-#include "LDAPControlSet.h"
+#include <LDAPControlSet.h>
class LDAPRequest;
/**
#include <stack>
-#include "LDAPUrlList.h"
+#include <LDAPUrlList.h>
class LDAPAsynConnection;
class LDAPMsg;
#ifndef LDAP_MOD_DN_REQUEST_H
#define LDAP_MOD_DN_REQUEST_H
-#include "LDAPRequest.h"
+#include <LDAPRequest.h>
class LDAPModDNRequest : LDAPRequest {
#include <ldap.h>
#include <list>
-#include "LDAPModification.h"
+#include <LDAPModification.h>
typedef list<LDAPModification> ModList;
#define LDAP_MODIFICATION_H
#include <ldap.h>
-#include "LDAPAttribute.h"
+#include <LDAPAttribute.h>
class LDAPModification{
public:
#ifndef LDAP_MODIFY_REQUEST_H
#define LDAP_MODIFY_REQUEST_H
-#include "LDAPRequest.h"
+#include <LDAPRequest.h>
class LDAPMessageQueue;
#define LDAP_REBIND_H
#include <string>
-#include "LDAPRebindAuth.h"
+#include <LDAPRebindAuth.h>
/**
* Just an abstract class to provide a mechnism for rebind to another
* Used internally only by LDAPSearchResults
*/
class LDAPReferenceList{
- typedef RefList::const_iterator const_iterator;
-
public:
+ typedef RefList::const_iterator const_iterator;
+
/**
* Constructs an empty list.
*/
#define LDAP_REFERRAL_EXCEPTION_H
#include <list>
-#include "LDAPMessage.h"
-#include "LDAPUrlList.h"
+#include <LDAPMessage.h>
+#include <LDAPUrlList.h>
class LDAPUrlList;
#ifndef LDAP_REQUEST_H
#define LDAP_REQUEST_H
-#include "LDAPConstraints.h"
-#include "LDAPAsynConnection.h"
-#include "LDAPMessageQueue.h"
+#include <LDAPConstraints.h>
+#include <LDAPAsynConnection.h>
+#include <LDAPMessageQueue.h>
class LDAPUrl;
#include<iostream>
#include<ldap.h>
-#include "LDAPMessage.h"
-#include "LDAPControlSet.h"
-#include "LDAPUrlList.h"
+#include <LDAPMessage.h>
+#include <LDAPControlSet.h>
+#include <LDAPUrlList.h>
class LDAPRequest;
class LDAPAsynConnection;
#ifndef LDAP_SEARCH_REFERENCE_H
#define LDAP_SEARCH_REFERENCE_H
-#include "LDAPMessage.h"
-#include "LDAPUrlList.h"
+#include <LDAPMessage.h>
+#include <LDAPUrlList.h>
class LDAPRequest;
class LDAPUrl;
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
+#include "config.h"
+#include "ac/time.h"
#include "debug.h"
#include "LDAPSearchRequest.h"
#include "LDAPException.h"
#define LDAP_SEARCH_REQUEST_H
#include <queue>
-#include "LDAPRequest.h"
+#include <LDAPRequest.h>
class LDAPSearchReference;
class LDAPReferral;
#ifndef LDAP_SEARCH_RESULT_H
#define LDAP_SEARCH_RESULT_H
-#include "LDAPMessage.h"
-#include "LDAPEntry.h"
+#include <LDAPMessage.h>
+#include <LDAPEntry.h>
class LDAPRequest;
#ifndef LDAP_SEARCH_RESULTS_H
#define LDAP_SEARCH_RESULTS_H
-#include "LDAPEntry.h"
-#include "LDAPEntryList.h"
-#include "LDAPMessage.h"
-#include "LDAPMessageQueue.h"
-#include "LDAPReferenceList.h"
-#include "LDAPSearchReference.h"
+#include <LDAPEntry.h>
+#include <LDAPEntryList.h>
+#include <LDAPMessage.h>
+#include <LDAPMessageQueue.h>
+#include <LDAPReferenceList.h>
+#include <LDAPSearchReference.h>
class LDAPResult;
#define LDAP_URL_H
#include <ldap.h>
-#include "StringList.h"
+#include <StringList.h>
/**
* This class is used to analyze and store LDAP-Urls as returned by a
#define LDAP_URL_LIST_H
#include <list>
-#include "LDAPUrl.h"
+#include <LDAPUrl.h>
typedef list<LDAPUrl> UrlList;
* This container class is used to store multiple LDAPUrl-objects.
*/
class LDAPUrlList{
- typedef UrlList::const_iterator const_iterator;
-
public:
+ typedef UrlList::const_iterator const_iterator;
+
/**
* Constructs an empty list.
*/
* Container class to store multiple string-objects
*/
class StringList{
- typedef ListType::const_iterator const_iterator;
-
private:
ListType m_data;
public:
+ typedef ListType::const_iterator const_iterator;
+
/**
* Constructs an empty list.
*/