Hello community,
here is the log from the commit of package ldapcpplib
checked in at Wed Jan 23 22:25:55 CET 2008.
--------
--- ldapcpplib/ldapcpplib.changes 2007-11-21 11:52:21.000000000 +0100
+++ /mounts/work_src_done/STABLE/ldapcpplib/ldapcpplib.changes 2008-01-22 15:56:16.000000000 +0100
@@ -1,0 +2,6 @@
+Tue Jan 22 15:54:19 CET 2008 - rhafer@suse.de
+
+- synced with latest CVS, adds SASL support and some methods to
+ ease the manipulation of Entries
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ldapcpplib.spec ++++++
--- /var/tmp/diff_new_pack.h15430/_old 2008-01-23 22:04:47.000000000 +0100
+++ /var/tmp/diff_new_pack.h15430/_new 2008-01-23 22:04:47.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package ldapcpplib (Version 0.0.5)
#
-# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@@ -18,7 +18,7 @@
AutoReqProv: on
Summary: C++ API for LDAPv3
Version: 0.0.5
-Release: 5
+Release: 19
Source: %{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -64,7 +64,7 @@
./configure --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc \
--enable-shared --with-libldap=%{_libdir} \
--with-ldap-includes=/usr/include --libdir=%{_libdir}
-make CXXFLAGS="$RPM_OPT_FLAGS"
+make CXXFLAGS="$RPM_OPT_FLAGS" %{?jobs:-j%jobs}
rm -rf srcdoc/CVS
doxygen doxygen.rc
@@ -94,105 +94,110 @@
%files devel
%defattr(-,root,root)
/usr/include/LDAP*.h
+/usr/include/Sasl*.h
/usr/include/StringList.h
%{_libdir}/libldapcpp.so
%{_libdir}/libldapcpp.a
%{_libdir}/libldapcpp.la
%{_defaultdocdir}/%{name}/html
+
%changelog
-* Wed Nov 21 2007 - rhafer@suse.de
+* Tue Jan 22 2008 rhafer@suse.de
+- synced with latest CVS, adds SASL support and some methods to
+ ease the manipulation of Entries
+* Wed Nov 21 2007 rhafer@suse.de
- Make LDAPUrl::getURLString() const, to allow easier usage with
LDAPUrlList::const_iterator. (Bug #341255)
-* Wed Nov 07 2007 - rhafer@suse.de
+* Wed Nov 07 2007 rhafer@suse.de
- Updated to 0.0.5 (fixes gcc 4.3 issues)
- Cleaned up BuildRequires
- silenced some RPMLINT warnings
-* Wed Jan 24 2007 - rhafer@suse.de
+* Wed Jan 24 2007 rhafer@suse.de
- correctly initialize usage- and single-Attribute of LDAPAttrType
(Bug #237305)
-* Thu Jan 11 2007 - rhafer@suse.de
+* Thu Jan 11 2007 rhafer@suse.de
- added methods to get the usage definition of an AttributeType.
(Needed for feature #301179)
-* Tue Nov 07 2006 - ro@suse.de
+* Tue Nov 07 2006 ro@suse.de
- fix docu permissions
-* Tue Oct 31 2006 - meissner@suse.de
+* Tue Oct 31 2006 meissner@suse.de
- use RPM_OPT_FLAGS for CXXFLAGS
-* Tue Jun 27 2006 - lrupp@suse.de
+* Tue Jun 27 2006 lrupp@suse.de
- fix %%files for valid debuginfo package
-* Fri Mar 31 2006 - rhafer@suse.de
+* Fri Mar 31 2006 rhafer@suse.de
- throw Exception if initialization failed (Bug #159741)
-* Wed Jan 25 2006 - mls@suse.de
+* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
-* Wed Oct 05 2005 - rhafer@suse.de
+* Wed Oct 05 2005 rhafer@suse.de
- synced with current CVS (doesn't need LDAP_DEPRECATED anymore)
-* Mon Sep 26 2005 - ro@suse.de
+* Mon Sep 26 2005 ro@suse.de
- set CPPFLAGS as well
-* Mon Sep 26 2005 - ro@suse.de
+* Mon Sep 26 2005 ro@suse.de
- added LDAP_DEPRECATED to CFLAGS
-* Thu Aug 11 2005 - rhafer@suse.de
+* Thu Aug 11 2005 rhafer@suse.de
- Don't initalize error string with NULL in LDAPException.
(Bugzilla #99712)
-* Wed Apr 20 2005 - rhafer@suse.de
+* Wed Apr 20 2005 rhafer@suse.de
- synced with current CVS
-* Thu Nov 18 2004 - ro@suse.de
+* Thu Nov 18 2004 ro@suse.de
- use kerberos-devel-packages
-* Thu Aug 12 2004 - ro@suse.de
+* Thu Aug 12 2004 ro@suse.de
- added libpng to neededforbuild (for doxygen)
-* Mon Aug 09 2004 - rhafer@suse.de
+* Mon Aug 09 2004 rhafer@suse.de
- Removed duplicate files from -devel filelist.
-* Thu Aug 05 2004 - rhafer@suse.de
+* Thu Aug 05 2004 rhafer@suse.de
- Fixed typo in the "Requires" of the -devel package
-* Wed Aug 04 2004 - rhafer@suse.de
+* Wed Aug 04 2004 rhafer@suse.de
- Splitted into runtime and -devel package (Bugzilla #42845)
-* Fri Apr 16 2004 - rhafer@suse.de
+* Fri Apr 16 2004 rhafer@suse.de
- Bugzilla ID #38668: read additional server messsage in case of
errors.
-* Mon Mar 22 2004 - rhafer@suse.de
+* Mon Mar 22 2004 rhafer@suse.de
- correctly ignore capitalisation of Objectclasses and
Attributetypes in LDAPSchema.cpp
-* Tue Feb 03 2004 - rhafer@suse.de
+* Tue Feb 03 2004 rhafer@suse.de
- updated to latest version
- run auto*-tools before build
- filelist cleanup
-* Thu Jan 22 2004 - rhafer@suse.de
+* Thu Jan 22 2004 rhafer@suse.de
- updated to latest version from CVS
-* Sat Jan 10 2004 - adrian@suse.de
+* Sat Jan 10 2004 adrian@suse.de
- add %%defattr
-* Tue Jul 15 2003 - rhafer@suse.de
+* Tue Jul 15 2003 rhafer@suse.de
- added Schema parsing Classes, needed by YaST
-* Mon May 12 2003 - rhafer@suse.de
+* Mon May 12 2003 rhafer@suse.de
- removed caching code (no_cache.dif) as libldap doesn't support
it anymore
-* Wed Jan 15 2003 - ro@suse.de
+* Wed Jan 15 2003 ro@suse.de
- use sasl2
-* Thu Aug 08 2002 - rhafer@suse.de
+* Thu Aug 08 2002 rhafer@suse.de
- removed SASL related stuff (did not work correctly)
-* Sat Jul 27 2002 - adrian@suse.de
+* Sat Jul 27 2002 adrian@suse.de
- add %%run_ldconfig
-* Thu Jul 04 2002 - ro@suse.de
+* Thu Jul 04 2002 ro@suse.de
- added heimdal-devel to neededforbuild to make libtool happy
-* Mon Apr 29 2002 - rhafer@suse.de
+* Mon Apr 29 2002 rhafer@suse.de
- added %%{_libdir} to compile package on lib64-archs
-* Mon Apr 08 2002 - rhafer@suse.de
+* Mon Apr 08 2002 rhafer@suse.de
- using bzip2 compression now
- included newest version to be able to build with gcc 3.1 now
-* Fri Nov 16 2001 - rhafer@suse.de
+* Fri Nov 16 2001 rhafer@suse.de
- Makes use of namespaces now
- Include bugfixes for some memory allocation/freeing issues
-* Tue Jun 12 2001 - rhafer@suse.de
+* Tue Jun 12 2001 rhafer@suse.de
- added openssl-devel to needforbuild
- some changes in configure.in to make it work with new autoconf
- added libtoolize, aclocal calls to SPEC file
-* Thu Mar 15 2001 - ro@suse.de
+* Thu Mar 15 2001 ro@suse.de
- fixed neededforbuild for openldap
-* Wed Feb 28 2001 - rhafer@suse.de
+* Wed Feb 28 2001 rhafer@suse.de
- disabled generation of RTF docs
-* Tue Feb 27 2001 - ro@suse.de
+* Tue Feb 27 2001 ro@suse.de
- changed neededforbuild <cyrus-sasl> to <cyrus-sasl cyrus-sasl-devel>
-* Mon Feb 26 2001 - rhafer@suse.de
+* Mon Feb 26 2001 rhafer@suse.de
- Included the lastest bugfixes and the diff of schwab@suse.de
in the source tgz
-* Mon Jan 22 2001 - schwab@suse.de
+* Mon Jan 22 2001 schwab@suse.de
- Fix visibility violations.
-* Fri Jan 05 2001 - rhafer@suse.de
+* Fri Jan 05 2001 rhafer@suse.de
- first version of the ldapcpplib package
++++++ ldapcpplib-0.0.5.tar.bz2 ++++++
++++ 1763 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/configure.in new/ldapcpplib-0.0.5/configure.in
--- old/ldapcpplib-0.0.5/configure.in 2007-11-07 10:35:23.000000000 +0100
+++ new/ldapcpplib-0.0.5/configure.in 2007-12-20 12:35:30.000000000 +0100
@@ -67,7 +67,7 @@
])
dnl Checks for header files.
AC_HEADER_TIME
-AC_CHECK_HEADER(ldap.h)
+AC_CHECK_HEADERS(termios.h ldap.h)
AC_EGREP_HEADER(ldap_add_ext,ldap.h,[
dnl NOOP
:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/COPYRIGHT new/ldapcpplib-0.0.5/COPYRIGHT
--- old/ldapcpplib-0.0.5/COPYRIGHT 2007-02-09 14:07:37.000000000 +0100
+++ new/ldapcpplib-0.0.5/COPYRIGHT 2008-01-08 00:20:00.000000000 +0100
@@ -1,4 +1,4 @@
-Copyright 1998-2007 The OpenLDAP Foundation
+Copyright 1998-2008 The OpenLDAP Foundation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/ac/time.h new/ldapcpplib-0.0.5/src/ac/time.h
--- old/ldapcpplib-0.0.5/src/ac/time.h 2007-05-10 11:47:29.000000000 +0200
+++ new/ldapcpplib-0.0.5/src/ac/time.h 2008-01-08 00:20:00.000000000 +0100
@@ -1,7 +1,7 @@
/* Generic time.h */
-/* $OpenLDAP: pkg/ldap/contrib/ldapc++/src/ac/time.h,v 1.9 2007/05/09 16:17:10 hallvard Exp $ */
+/* $OpenLDAP: pkg/ldap/contrib/ldapc++/src/ac/time.h,v 1.10 2008/01/07 23:20:00 kurt Exp $ */
/*
- * Copyright 1998-2007 The OpenLDAP Foundation, Redwood City, California, USA
+ * Copyright 1998-2008 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/config.h.in new/ldapcpplib-0.0.5/src/config.h.in
--- old/ldapcpplib-0.0.5/src/config.h.in 2007-11-09 12:22:47.000000000 +0100
+++ new/ldapcpplib-0.0.5/src/config.h.in 2007-12-20 12:33:48.000000000 +0100
@@ -6,6 +6,9 @@
/* Define to 1 if you have the header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the header file. */
+#undef HAVE_LDAP_H
+
/* Define to 1 if you have the `resolv' library (-lresolv). */
#undef HAVE_LIBRESOLV
@@ -30,6 +33,9 @@
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_TYPES_H
+/* Define to 1 if you have the header file. */
+#undef HAVE_TERMIOS_H
+
/* Define to 1 if you have the header file. */
#undef HAVE_UNISTD_H
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/config.h.in~ new/ldapcpplib-0.0.5/src/config.h.in~
--- old/ldapcpplib-0.0.5/src/config.h.in~ 2005-10-05 17:19:08.000000000 +0200
+++ new/ldapcpplib-0.0.5/src/config.h.in~ 1970-01-01 01:00:00.000000000 +0100
@@ -1,63 +0,0 @@
-/* src/config.h.in. Generated from configure.in by autoheader. */
-#undef WITH_DEBUG
-
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the `resolv' library (-lresolv). */
-#undef HAVE_LIBRESOLV
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the 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 and . */
-#undef TIME_WITH_SYS_TIME
-
-/* Version number of package */
-#undef VERSION
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/LDAPAsynConnection.cpp new/ldapcpplib-0.0.5/src/LDAPAsynConnection.cpp
--- old/ldapcpplib-0.0.5/src/LDAPAsynConnection.cpp 2007-11-21 10:42:01.000000000 +0100
+++ new/ldapcpplib-0.0.5/src/LDAPAsynConnection.cpp 2007-12-20 12:33:48.000000000 +0100
@@ -24,15 +24,20 @@
using namespace std;
-LDAPAsynConnection::LDAPAsynConnection(const string& hostname, int port,
+LDAPAsynConnection::LDAPAsynConnection(const string& url, int port,
LDAPConstraints *cons ){
DEBUG(LDAP_DEBUG_CONSTRUCT,"LDAPAsynConnection::LDAPAsynConnection()"
<< endl);
DEBUG(LDAP_DEBUG_CONSTRUCT | LDAP_DEBUG_PARAMETER,
- " host:" << hostname << endl << " port:" << port << endl);
+ " URL:" << url << endl << " port:" << port << endl);
cur_session=0;
m_constr = 0;
- this->init(hostname, port);
+ // Is this an LDAP URI?
+ if ( url.find("://") == std::string::npos ) {
+ this->init(url, port);
+ } else {
+ this->initialize(url);
+ }
this->setConstraints(cons);
}
@@ -95,6 +100,41 @@
}
}
+LDAPMessageQueue* LDAPAsynConnection::saslBind(const std::string &mech,
+ const std::string &cred,
+ const LDAPConstraints *cons)
+{
+ DEBUG(LDAP_DEBUG_TRACE, "LDAPAsynConnection::saslBind()" << endl);
+ LDAPSaslBindRequest *req = new LDAPSaslBindRequest(mech, cred, this, cons);
+ try{
+ LDAPMessageQueue *ret = req->sendRequest();
+ return ret;
+ }catch(LDAPException e){
+ delete req;
+ throw;
+ }
+
+}
+
+LDAPMessageQueue* LDAPAsynConnection::saslInteractiveBind(
+ const std::string &mech,
+ int flags,
+ SaslInteractionHandler *sih,
+ const LDAPConstraints *cons)
+{
+ DEBUG(LDAP_DEBUG_TRACE, "LDAPAsynConnection::saslInteractiveBind"
+ << std::endl);
+ LDAPSaslInteractiveBind *req =
+ new LDAPSaslInteractiveBind(mech, flags, sih, this, cons);
+ try {
+ LDAPMessageQueue *ret = req->sendRequest();
+ return ret;
+ }catch(LDAPException e){
+ delete req;
+ throw;
+ }
+}
+
LDAPMessageQueue* LDAPAsynConnection::search(const string& base,int scope,
const string& filter,
const StringList& attrs,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/LDAPAsynConnection.h new/ldapcpplib-0.0.5/src/LDAPAsynConnection.h
--- old/ldapcpplib-0.0.5/src/LDAPAsynConnection.h 2007-11-21 10:42:01.000000000 +0100
+++ new/ldapcpplib-0.0.5/src/LDAPAsynConnection.h 2007-12-20 12:33:48.000000000 +0100
@@ -21,6 +21,7 @@
#include
#include
#include
+#include
//* Main class for an asynchronous LDAP connection
/**
@@ -59,9 +60,6 @@
* Search
*/
static const int SEARCH_SUB=2;
-// static const int SEARCH_SUB=LDAP_SCOPE_SUBTREE;
-// static const int SEARCH_ONE=LDAP_SCOPE_ONELEVEL;
-// static const int SEARCH_SUB=LDAP_SCOPE_SUBTREE;
/** Construtor that initializes a connection to a server
* @param hostname Name (or IP-Adress) of the destination host
@@ -69,7 +67,7 @@
* @param cons Default constraints to use with operations over
* this connection
*/
- LDAPAsynConnection(const std::string& hostname=std::string("localhost"),
+ LDAPAsynConnection(const std::string& url=std::string("localhost"),
int port=0, LDAPConstraints *cons=new LDAPConstraints() );
//* Destructor
@@ -116,7 +114,17 @@
* @param dn the distiguished name to bind as
* @param passwd cleartext password to use
*/
- LDAPMessageQueue* bind(const std::string& dn="", const std::string& passwd="",
+ LDAPMessageQueue* bind(const std::string& dn="",
+ const std::string& passwd="",
+ const LDAPConstraints *cons=0);
+
+ LDAPMessageQueue* saslBind(const std::string& mech,
+ const std::string& cred,
+ const LDAPConstraints *cons=0);
+
+ LDAPMessageQueue* saslInteractiveBind(const std::string& mech,
+ int flags=0,
+ SaslInteractionHandler *sih=0,
const LDAPConstraints *cons=0);
/** Performing a search on a directory tree.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/LDAPAttributeList.cpp new/ldapcpplib-0.0.5/src/LDAPAttributeList.cpp
--- old/ldapcpplib-0.0.5/src/LDAPAttributeList.cpp 2007-11-07 10:32:30.000000000 +0100
+++ new/ldapcpplib-0.0.5/src/LDAPAttributeList.cpp 2008-01-22 14:14:39.000000000 +0100
@@ -139,6 +139,24 @@
}
}
+void LDAPAttributeList::replaceAttribute(const LDAPAttribute& attr)
+{
+ DEBUG(LDAP_DEBUG_TRACE,"LDAPAttribute::replaceAttribute()" << endl);
+ DEBUG(LDAP_DEBUG_TRACE | LDAP_DEBUG_PARAMETER,
+ " attr:" << attr << endl);
+
+ LDAPAttributeList::iterator i;
+ for( i = m_attrs.begin(); i != m_attrs.end(); i++){
+ if(attr.getName().size() == i->getName().size()){
+ if(equal(attr.getName().begin(), attr.getName().end(), i->getName().begin(),
+ nocase_compare)){
+ m_attrs.erase(i);
+ break;
+ }
+ }
+ }
+ m_attrs.push_back(attr);
+}
LDAPMod** LDAPAttributeList::toLDAPModArray() const{
DEBUG(LDAP_DEBUG_TRACE,"LDAPAttribute::toLDAPModArray()" << endl);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/LDAPAttributeList.h new/ldapcpplib-0.0.5/src/LDAPAttributeList.h
--- old/ldapcpplib-0.0.5/src/LDAPAttributeList.h 2005-09-28 16:00:57.000000000 +0200
+++ new/ldapcpplib-0.0.5/src/LDAPAttributeList.h 2008-01-22 14:14:39.000000000 +0100
@@ -84,7 +84,6 @@
*/
const LDAPAttribute* getAttributeByName(const std::string& name) const;
-
/**
* Adds one element to the end of the list.
* @param attr The attribute to add to the list.
@@ -92,6 +91,12 @@
void addAttribute(const LDAPAttribute& attr);
/**
+ * Replace an Attribute in the List
+ * @param attr The attribute to add to the list.
+ */
+ void replaceAttribute(const LDAPAttribute& attr);
+
+ /**
* Translates the list of Attributes to a 0-terminated array of
* LDAPMod-structures as needed by the C-API
*/
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/LDAPBindRequest.cpp new/ldapcpplib-0.0.5/src/LDAPBindRequest.cpp
--- old/ldapcpplib-0.0.5/src/LDAPBindRequest.cpp 2007-11-21 10:42:01.000000000 +0100
+++ new/ldapcpplib-0.0.5/src/LDAPBindRequest.cpp 2007-12-20 12:33:48.000000000 +0100
@@ -9,8 +9,11 @@
#include "LDAPBindRequest.h"
#include "LDAPException.h"
+#include "SaslInteractionHandler.h"
+#include "SaslInteraction.h"
#include <cstdlib>
+#include
using namespace std;
@@ -73,10 +76,97 @@
}
}
-LDAPRequest* LDAPBindRequest::followReferral(LDAPMsg* /*urls*/){
- DEBUG(LDAP_DEBUG_TRACE,"LDAPBindRequest::followReferral()" << endl);
- DEBUG(LDAP_DEBUG_TRACE,
- "ReferralChasing for bind-operation not implemented yet" << endl);
- return 0;
+LDAPSaslBindRequest::LDAPSaslBindRequest(const std::string& mech,
+ const std::string& cred,
+ LDAPAsynConnection *connect,
+ const LDAPConstraints *cons,
+ bool isReferral) : LDAPRequest(connect, cons, isReferral),m_mech(mech), m_cred(cred) {}
+
+LDAPMessageQueue* LDAPSaslBindRequest::sendRequest()
+{
+ DEBUG(LDAP_DEBUG_TRACE,"LDAPSaslBindRequest::sendRequest()" << endl);
+ int msgID=0;
+
+ BerValue tmpcred;
+ tmpcred.bv_val = (char*) malloc( m_cred.size() * sizeof(char));
+ m_cred.copy(tmpcred.bv_val,string::npos);
+ tmpcred.bv_len = m_cred.size();
+
+ LDAPControl** tmpSrvCtrls=m_cons->getSrvCtrlsArray();
+ LDAPControl** tmpClCtrls=m_cons->getClCtrlsArray();
+ int err=ldap_sasl_bind(m_connection->getSessionHandle(), "", m_mech.c_str(),
+ &tmpcred, tmpSrvCtrls, tmpClCtrls, &msgID);
+ LDAPControlSet::freeLDAPControlArray(tmpSrvCtrls);
+ LDAPControlSet::freeLDAPControlArray(tmpClCtrls);
+ free(tmpcred.bv_val);
+
+ if(err != LDAP_SUCCESS){
+ throw LDAPException(err);
+ }else{
+ m_msgID=msgID;
+ return new LDAPMessageQueue(this);
+ }
+}
+
+LDAPSaslBindRequest::~LDAPSaslBindRequest()
+{
+ DEBUG(LDAP_DEBUG_DESTROY,"LDAPSaslBindRequest::~LDAPSaslBindRequest()" << endl);
+}
+
+LDAPSaslInteractiveBind::LDAPSaslInteractiveBind( const std::string& mech,
+ int flags, SaslInteractionHandler *sih, LDAPAsynConnection *connect,
+ const LDAPConstraints *cons, bool isReferral) :
+ LDAPRequest(connect, cons, isReferral),
+ m_mech(mech), m_flags(flags), m_sih(sih), m_res(0)
+{
+}
+
+static int my_sasl_interact(LDAP *l, unsigned flags, void *cbh, void *interact)
+{
+ DEBUG(LDAP_DEBUG_TRACE, "LDAPSaslInteractiveBind::my_sasl_interact()"
+ << std::endl );
+ std::list interactions;
+
+ sasl_interact_t *iter = (sasl_interact_t*) interact;
+ while ( iter->id != SASL_CB_LIST_END ) {
+ SaslInteraction *si = new SaslInteraction(iter);
+ interactions.push_back( si );
+ iter++;
+ }
+ ((SaslInteractionHandler*)cbh)->handleInteractions(interactions);
+ return LDAP_SUCCESS;
+}
+
+/* This kind of fakes an asynchronous operation, ldap_sasl_interactive_bind_s
+ * is synchronous */
+LDAPMessageQueue *LDAPSaslInteractiveBind::sendRequest()
+{
+ DEBUG(LDAP_DEBUG_TRACE, "LDAPSaslInteractiveBind::sendRequest()" <<
+ m_mech << std::endl);
+
+ LDAPControl** tmpSrvCtrls=m_cons->getSrvCtrlsArray();
+ LDAPControl** tmpClCtrls=m_cons->getClCtrlsArray();
+ int res = ldap_sasl_interactive_bind_s( m_connection->getSessionHandle(),
+ "", m_mech.c_str(), tmpSrvCtrls, tmpClCtrls, m_flags,
+ my_sasl_interact, m_sih );
+
+ DEBUG(LDAP_DEBUG_TRACE, "ldap_sasl_interactive_bind_s returned: "
+ << res << std::endl);
+ if(res != LDAP_SUCCESS){
+ throw LDAPException(res);
+ } else {
+ m_res = new LDAPResult(LDAPMsg::BIND_RESPONSE, res, "");
+ }
+ return new LDAPMessageQueue(this);
+}
+
+LDAPMsg* LDAPSaslInteractiveBind::getNextMessage() const
+{
+ return m_res;
+}
+
+LDAPSaslInteractiveBind::~LDAPSaslInteractiveBind()
+{
+ DEBUG(LDAP_DEBUG_DESTROY,"LDAPSaslInteractiveBind::~LDAPSaslInteractiveBind()" << endl);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/LDAPBindRequest.h new/ldapcpplib-0.0.5/src/LDAPBindRequest.h
--- old/ldapcpplib-0.0.5/src/LDAPBindRequest.h 2007-11-21 10:42:01.000000000 +0100
+++ new/ldapcpplib-0.0.5/src/LDAPBindRequest.h 2007-12-20 12:33:48.000000000 +0100
@@ -7,6 +7,8 @@
#define LDAP_BIND_REQUEST_H
#include
+#include
+#include
class LDAPBindRequest : LDAPRequest {
private:
@@ -15,14 +17,44 @@
std::string m_mech;
public:
- LDAPBindRequest(const LDAPBindRequest& req);
+ LDAPBindRequest( const LDAPBindRequest& req);
//just for simple authentication
LDAPBindRequest(const std::string&, const std::string& passwd,
LDAPAsynConnection *connect, const LDAPConstraints *cons,
bool isReferral=false);
virtual ~LDAPBindRequest();
virtual LDAPMessageQueue *sendRequest();
- virtual LDAPRequest* followReferral(LDAPMsg* urls);
+};
+
+class LDAPSaslBindRequest : LDAPRequest
+{
+ public:
+ LDAPSaslBindRequest( const std::string& mech, const std::string& cred,
+ LDAPAsynConnection *connect, const LDAPConstraints *cons,
+ bool isReferral=false);
+ virtual LDAPMessageQueue *sendRequest();
+ virtual ~LDAPSaslBindRequest();
+
+ private:
+ std::string m_mech;
+ std::string m_cred;
+};
+
+class LDAPSaslInteractiveBind : LDAPRequest
+{
+ public:
+ LDAPSaslInteractiveBind( const std::string& mech, int flags,
+ SaslInteractionHandler *sih, LDAPAsynConnection *connect,
+ const LDAPConstraints *cons, bool isReferral=false);
+ virtual LDAPMessageQueue *sendRequest();
+ virtual LDAPMsg* getNextMessage() const;
+ virtual ~LDAPSaslInteractiveBind();
+
+ private:
+ std::string m_mech;
+ int m_flags;
+ SaslInteractionHandler *m_sih;
+ LDAPResult *m_res;
};
#endif //LDAP_BIND_REQUEST_H
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/LDAPEntry.cpp new/ldapcpplib-0.0.5/src/LDAPEntry.cpp
--- old/ldapcpplib-0.0.5/src/LDAPEntry.cpp 2007-02-09 14:07:40.000000000 +0100
+++ new/ldapcpplib-0.0.5/src/LDAPEntry.cpp 2008-01-22 14:14:39.000000000 +0100
@@ -67,6 +67,21 @@
return m_attrs;
}
+const LDAPAttribute* LDAPEntry::getAttributeByName(const std::string& name) const
+{
+ return m_attrs->getAttributeByName(name);
+}
+
+void LDAPEntry::addAttribute(const LDAPAttribute& attr)
+{
+ m_attrs->addAttribute(attr);
+}
+
+void LDAPEntry::replaceAttribute(const LDAPAttribute& attr)
+{
+ m_attrs->replaceAttribute(attr);
+}
+
ostream& operator << (ostream& s, const LDAPEntry& le){
s << "DN: " << le.m_dn << ": " << *(le.m_attrs);
return s;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/LDAPEntry.h new/ldapcpplib-0.0.5/src/LDAPEntry.h
--- old/ldapcpplib-0.0.5/src/LDAPEntry.h 2007-02-09 14:07:40.000000000 +0100
+++ new/ldapcpplib-0.0.5/src/LDAPEntry.h 2008-01-22 14:14:39.000000000 +0100
@@ -17,11 +17,11 @@
*/
class LDAPEntry{
- public :
+ public :
/**
* Copy-constructor
*/
- LDAPEntry(const LDAPEntry& entry);
+ LDAPEntry(const LDAPEntry& entry);
/**
* Constructs a new entry (also used as standard constructor).
@@ -29,7 +29,7 @@
* @param dn The Distinguished Name for the new entry.
* @param attrs The attributes for the new entry.
*/
- LDAPEntry(const std::string& dn=std::string(),
+ LDAPEntry(const std::string& dn=std::string(),
const LDAPAttributeList *attrs=new LDAPAttributeList());
/**
@@ -38,44 +38,66 @@
* The constructor is used internally to create a LDAPEntry from
* the C-API's data structurs.
*/
- LDAPEntry(const LDAPAsynConnection *ld, LDAPMessage *msg);
+ LDAPEntry(const LDAPAsynConnection *ld, LDAPMessage *msg);
/**
* Destructor
*/
- ~LDAPEntry();
+ ~LDAPEntry();
/**
* Sets the DN-attribute.
* @param dn: The new DN for the entry.
*/
- void setDN(const std::string& dn);
+ void setDN(const std::string& dn);
/**
* Sets the attributes of the entry.
* @param attr: A pointer to a std::list of the new attributes.
*/
- void setAttributes(LDAPAttributeList *attrs);
+ void setAttributes(LDAPAttributeList *attrs);
+
+ /**
+ * Get an Attribute by its AttributeType (simple wrapper around
+ * LDAPAttributeList::getAttributeByName() )
+ * @param name The name of the Attribute to look for
+ * @return a pointer to the LDAPAttribute with the AttributeType
+ * "name" or 0, if there is no Attribute of that Type
+ */
+ const LDAPAttribute* getAttributeByName(const std::string& name) const;
+
+ /**
+ * Adds one Attribute to the List of Attributes (simple wrapper around
+ * LDAPAttributeList::addAttribute() ).
+ * @param attr The attribute to add to the list.
+ */
+ void addAttribute(const LDAPAttribute& attr);
+
+ /**
+ * Replace an Attribute in the List of Attributes (simple wrapper
+ * around LDAPAttributeList::replaceAttribute() ).
+ * @param attr The attribute to add to the list.
+ */
+ void replaceAttribute(const LDAPAttribute& attr);
/**
* @returns The current DN of the entry.
*/
- const std::string& getDN() const ;
+ const std::string& getDN() const ;
/**
* @returns A const pointer to the attributes of the entry.
*/
- const LDAPAttributeList* getAttributes() const;
+ const LDAPAttributeList* getAttributes() const;
/**
* This method can be used to dump the data of a LDAPResult-Object.
* It is only useful for debugging purposes at the moment
*/
- friend std::ostream& operator << (std::ostream& s, const LDAPEntry& le);
+ friend std::ostream& operator << (std::ostream& s, const LDAPEntry& le);
private :
-
- LDAPAttributeList *m_attrs;
- std::string m_dn;
+ LDAPAttributeList *m_attrs;
+ std::string m_dn;
};
#endif //LDAP_ENTRY_H
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/LDAPMessage.cpp new/ldapcpplib-0.0.5/src/LDAPMessage.cpp
--- old/ldapcpplib-0.0.5/src/LDAPMessage.cpp 2005-09-28 16:00:57.000000000 +0200
+++ new/ldapcpplib-0.0.5/src/LDAPMessage.cpp 2007-12-20 12:33:48.000000000 +0100
@@ -8,6 +8,7 @@
#include "LDAPResult.h"
#include "LDAPExtResult.h"
+#include "LDAPSaslBindResult.h"
#include "LDAPRequest.h"
#include "LDAPSearchResult.h"
#include "LDAPSearchReference.h"
@@ -22,6 +23,13 @@
m_hasControls=false;
}
+LDAPMsg::LDAPMsg(int type, int id=0){
+ DEBUG(LDAP_DEBUG_CONSTRUCT,"LDAPMsg::LDAPMsg()" << endl);
+ msgType = type;
+ msgID = id;
+ m_hasControls=false;
+}
+
LDAPMsg* LDAPMsg::create(const LDAPRequest *req, LDAPMessage *msg){
DEBUG(LDAP_DEBUG_TRACE,"LDAPMsg::create()" << endl);
switch(ldap_msgtype(msg)){
@@ -34,6 +42,8 @@
case EXTENDED_RESPONSE :
return new LDAPExtResult(req,msg);
break;
+ case BIND_RESPONSE :
+ return new LDAPSaslBindResult(req,msg);
default :
return new LDAPResult(req, msg);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/LDAPMessage.h new/ldapcpplib-0.0.5/src/LDAPMessage.h
--- old/ldapcpplib-0.0.5/src/LDAPMessage.h 2005-09-28 16:00:57.000000000 +0200
+++ new/ldapcpplib-0.0.5/src/LDAPMessage.h 2007-12-20 12:33:48.000000000 +0100
@@ -98,6 +98,7 @@
* Only for internal use.
*/
LDAPMsg(LDAPMessage *msg);
+ LDAPMsg(int msgType, int msgID);
/**
* This attribute stores Server-Control that were returned with the
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/LDAPMessageQueue.cpp new/ldapcpplib-0.0.5/src/LDAPMessageQueue.cpp
--- old/ldapcpplib-0.0.5/src/LDAPMessageQueue.cpp 2007-10-17 13:54:29.000000000 +0200
+++ new/ldapcpplib-0.0.5/src/LDAPMessageQueue.cpp 2007-12-20 11:49:03.000000000 +0100
@@ -6,10 +6,8 @@
#include "config.h"
#include "debug.h"
-#include
#include "LDAPMessageQueue.h"
#include "LDAPRequest.h"
-#include "LDAPAsynConnection.h"
#include "LDAPResult.h"
#include "LDAPSearchReference.h"
#include "LDAPSearchRequest.h"
@@ -40,110 +38,103 @@
LDAPMsg *LDAPMessageQueue::getNext(){
DEBUG(LDAP_DEBUG_TRACE,"LDAPMessageQueue::getNext()" << endl);
- LDAPMessage *msg;
+
+ if ( m_activeReq.empty() ) {
+ return 0;
+ }
+
LDAPRequest *req=m_activeReq.top();
- int msg_id = req->getMsgID();
- int res;
- const LDAPAsynConnection *con=req->getConnection();
- res=ldap_result(con->getSessionHandle(),msg_id,0,0,&msg);
- if (res <= 0){
- if(msg != 0){
- ldap_msgfree(msg);
- }
- throw LDAPException(con);
- }else{
- const LDAPConstraints *constr=req->getConstraints();
- LDAPMsg *ret=0;
- //this can throw an exception (Decoding Error)
- try{
- ret = LDAPMsg::create(req,msg);
- ldap_msgfree(msg);
- }catch(LDAPException e){
- //do some clean up
- delete req;
- m_activeReq.top();
- throw;
- }
- switch (ret->getMessageType()) {
- case LDAPMsg::SEARCH_REFERENCE :
- if (constr->getReferralChase() ){
- //throws Exception (limit Exceeded)
- LDAPRequest *refReq=chaseReferral(ret);
- if(refReq != 0){
- m_activeReq.push(refReq);
- m_issuedReq.push_back(refReq);
- delete ret;
- return getNext();
- }
- }
- return ret;
- break;
- case LDAPMsg::SEARCH_ENTRY :
- return ret;
- break;
- case LDAPMsg::SEARCH_DONE :
- if(req->isReferral()){
- req->unbind();
+ LDAPMsg *ret=0;
+
+ try{
+ ret = req->getNextMessage();
+ }catch(LDAPException e){
+ //do some clean up
+ delete req;
+ m_activeReq.top();
+ throw;
+ }
+
+ const LDAPConstraints *constr=req->getConstraints();
+ switch (ret->getMessageType()) {
+ case LDAPMsg::SEARCH_REFERENCE :
+ if (constr->getReferralChase() ){
+ //throws Exception (limit Exceeded)
+ LDAPRequest *refReq=chaseReferral(ret);
+ if(refReq != 0){
+ m_activeReq.push(refReq);
+ m_issuedReq.push_back(refReq);
+ delete ret;
+ return getNext();
}
- switch ( ((LDAPResult*)ret)->getResultCode()) {
- case LDAPResult::REFERRAL :
- if(constr->getReferralChase()){
- //throws Exception (limit Exceeded)
- LDAPRequest *refReq=chaseReferral(ret);
- if(refReq != 0){
- m_activeReq.pop();
- m_activeReq.push(refReq);
- m_issuedReq.push_back(refReq);
- delete ret;
- return getNext();
- }
- }
- return ret;
- break;
- case LDAPResult::SUCCESS :
- if(req->isReferral()){
- delete ret;
+ }
+ return ret;
+ break;
+ case LDAPMsg::SEARCH_ENTRY :
+ return ret;
+ break;
+ case LDAPMsg::SEARCH_DONE :
+ if(req->isReferral()){
+ req->unbind();
+ }
+ switch ( ((LDAPResult*)ret)->getResultCode()) {
+ case LDAPResult::REFERRAL :
+ if(constr->getReferralChase()){
+ //throws Exception (limit Exceeded)
+ LDAPRequest *refReq=chaseReferral(ret);
+ if(refReq != 0){
m_activeReq.pop();
+ m_activeReq.push(refReq);
+ m_issuedReq.push_back(refReq);
+ delete ret;
return getNext();
- }else{
- m_activeReq.pop();
- return ret;
}
- break;
- default:
+ }
+ return ret;
+ break;
+ case LDAPResult::SUCCESS :
+ if(req->isReferral()){
+ delete ret;
m_activeReq.pop();
- return ret;
- break;
- }
- break;
- //must be some kind of LDAPResultMessage
- default:
- if(req->isReferral()){
- req->unbind();
- }
- LDAPResult* res_p=(LDAPResult*)ret;
- switch (res_p->getResultCode()) {
- case LDAPResult::REFERRAL :
- if(constr->getReferralChase()){
- //throws Exception (limit Exceeded)
- LDAPRequest *refReq=chaseReferral(ret);
- if(refReq != 0){
- m_activeReq.pop();
- m_activeReq.push(refReq);
- m_issuedReq.push_back(refReq);
- delete ret;
- return getNext();
- }
- }
- return ret;
- break;
- default:
+ return getNext();
+ }else{
m_activeReq.pop();
return ret;
- }
- break;
- }
- }
+ }
+ break;
+ default:
+ m_activeReq.pop();
+ return ret;
+ break;
+ }
+ break;
+ //must be some kind of LDAPResultMessage
+ default:
+ if(req->isReferral()){
+ req->unbind();
+ }
+ LDAPResult* res_p=(LDAPResult*)ret;
+ switch (res_p->getResultCode()) {
+ case LDAPResult::REFERRAL :
+ if(constr->getReferralChase()){
+ //throws Exception (limit Exceeded)
+ LDAPRequest *refReq=chaseReferral(ret);
+ if(refReq != 0){
+ m_activeReq.pop();
+ m_activeReq.push(refReq);
+ m_issuedReq.push_back(refReq);
+ delete ret;
+ return getNext();
+ }
+ }
+ return ret;
+ break;
+ default:
+ m_activeReq.pop();
+ return ret;
+ }
+ break;
+ }
}
// TODO Maybe moved to LDAPRequest::followReferral seems more reasonable
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/LDAPRequest.cpp new/ldapcpplib-0.0.5/src/LDAPRequest.cpp
--- old/ldapcpplib-0.0.5/src/LDAPRequest.cpp 2007-10-17 13:54:29.000000000 +0200
+++ new/ldapcpplib-0.0.5/src/LDAPRequest.cpp 2007-12-20 12:33:48.000000000 +0100
@@ -47,6 +47,36 @@
delete m_cons;
}
+LDAPMsg* LDAPRequest::getNextMessage() const
+{
+ DEBUG(LDAP_DEBUG_DESTROY,"LDAPRequest::getNextMessage()" << endl);
+ int res;
+ LDAPMessage *msg;
+
+ res=ldap_result(this->m_connection->getSessionHandle(),
+ this->m_msgID,0,0,&msg);
+
+ if (res <= 0){
+ if(msg != 0){
+ ldap_msgfree(msg);
+ }
+ throw LDAPException(this->m_connection);
+ }else{
+ LDAPMsg *ret=0;
+ //this can throw an exception (Decoding Error)
+ ret = LDAPMsg::create(this,msg);
+ ldap_msgfree(msg);
+ return ret;
+ }
+}
+
+LDAPRequest* LDAPRequest::followReferral(LDAPMsg* /*urls*/){
+ DEBUG(LDAP_DEBUG_TRACE,"LDAPBindRequest::followReferral()" << endl);
+ DEBUG(LDAP_DEBUG_TRACE,
+ "ReferralChasing not implemented for this operation" << endl);
+ return 0;
+}
+
const LDAPConstraints* LDAPRequest::getConstraints() const{
DEBUG(LDAP_DEBUG_TRACE,"LDAPRequest::getConstraints()" << endl);
return m_cons;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/LDAPRequest.h new/ldapcpplib-0.0.5/src/LDAPRequest.h
--- old/ldapcpplib-0.0.5/src/LDAPRequest.h 2007-10-17 13:53:55.000000000 +0200
+++ new/ldapcpplib-0.0.5/src/LDAPRequest.h 2007-12-20 12:33:48.000000000 +0100
@@ -40,6 +40,7 @@
const LDAPConstraints* getConstraints() const;
const LDAPAsynConnection* getConnection() const;
+ virtual LDAPMsg *getNextMessage() const;
int getType()const;
int getMsgID() const;
int getHopCount() const;
@@ -63,7 +64,7 @@
* functions of the C-API to send the Request to a LDAP-Server
*/
virtual LDAPMessageQueue* sendRequest()=0;
- virtual LDAPRequest* followReferral(LDAPMsg* ref)=0;
+ virtual LDAPRequest* followReferral(LDAPMsg* ref);
/**
* Compare this request with another on. And returns true if they
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/LDAPResult.cpp new/ldapcpplib-0.0.5/src/LDAPResult.cpp
--- old/ldapcpplib-0.0.5/src/LDAPResult.cpp 2007-11-07 10:33:38.000000000 +0100
+++ new/ldapcpplib-0.0.5/src/LDAPResult.cpp 2007-12-20 12:33:48.000000000 +0100
@@ -53,6 +53,11 @@
}
}
+LDAPResult::LDAPResult(int type, int resultCode, const std::string &msg) :
+ LDAPMsg(type,0), m_resCode(resultCode), m_errMsg(msg)
+{}
+
+
LDAPResult::~LDAPResult(){
DEBUG(LDAP_DEBUG_DESTROY,"LDAPResult::~LDAPResult()" << endl);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/LDAPResult.h new/ldapcpplib-0.0.5/src/LDAPResult.h
--- old/ldapcpplib-0.0.5/src/LDAPResult.h 2005-09-28 16:00:57.000000000 +0200
+++ new/ldapcpplib-0.0.5/src/LDAPResult.h 2007-12-20 12:33:48.000000000 +0100
@@ -103,6 +103,7 @@
* Message.
*/
LDAPResult(const LDAPRequest *req, LDAPMessage *msg);
+ LDAPResult(int type, int resultCode, const std::string &msg);
/**
* The destructor.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/LDAPSaslBindResult.cpp new/ldapcpplib-0.0.5/src/LDAPSaslBindResult.cpp
--- old/ldapcpplib-0.0.5/src/LDAPSaslBindResult.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/ldapcpplib-0.0.5/src/LDAPSaslBindResult.cpp 2007-12-20 12:33:48.000000000 +0100
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2007, OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+
+#include "debug.h"
+#include
+#include "LDAPRequest.h"
+#include "LDAPException.h"
+
+#include "LDAPResult.h"
+#include "LDAPSaslBindResult.h"
+
+using namespace std;
+
+LDAPSaslBindResult::LDAPSaslBindResult(const LDAPRequest* req, LDAPMessage* msg) :
+ LDAPResult(req, msg){
+ DEBUG(LDAP_DEBUG_CONSTRUCT,"LDAPSaslBindResult::LDAPSaslBindResult()"
+ << std::endl);
+ BerValue* data = 0;
+ LDAP* lc = req->getConnection()->getSessionHandle();
+ int err = ldap_parse_sasl_bind_result(lc, msg, &data, 0);
+ if( err != LDAP_SUCCESS && err != LDAP_SASL_BIND_IN_PROGRESS ){
+ ber_bvfree(data);
+ throw LDAPException(err);
+ }else{
+ if(data){
+ DEBUG(LDAP_DEBUG_TRACE, " creds present" << std::endl);
+ m_creds=string(data->bv_val, data->bv_len);
+ ber_bvfree(data);
+ } else {
+ DEBUG(LDAP_DEBUG_TRACE, " no creds present" << std::endl);
+ }
+ }
+}
+
+LDAPSaslBindResult::~LDAPSaslBindResult(){
+ DEBUG(LDAP_DEBUG_DESTROY,"LDAPSaslBindResult::~LDAPSaslBindResult()" << endl);
+}
+
+const string& LDAPSaslBindResult::getServerCreds() const{
+ return m_creds;
+}
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/LDAPSaslBindResult.h new/ldapcpplib-0.0.5/src/LDAPSaslBindResult.h
--- old/ldapcpplib-0.0.5/src/LDAPSaslBindResult.h 1970-01-01 01:00:00.000000000 +0100
+++ new/ldapcpplib-0.0.5/src/LDAPSaslBindResult.h 2007-12-20 12:33:48.000000000 +0100
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2007, OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+
+#ifndef LDAP_SASL_BIND_RESULT_H
+#define LDAP_SASL_BIND_RESULT_H
+
+#include
+
+#include
+
+class LDAPRequest;
+
+/**
+ * Object of this class are created by the LDAPMsg::create method if
+ * results for an Extended Operation were returned by a LDAP server.
+ */
+class LDAPSaslBindResult : public LDAPResult {
+ public :
+ /**
+ * Constructor that creates an LDAPExtResult-object from the C-API
+ * structures
+ */
+ LDAPSaslBindResult(const LDAPRequest* req, LDAPMessage* msg);
+
+ /**
+ * The Destructor
+ */
+ virtual ~LDAPSaslBindResult();
+
+ /**
+ * @returns If the result contained data this method will return
+ * the data to the caller as a std::string.
+ */
+ const std::string& getServerCreds() const;
+
+ private:
+ std::string m_creds;
+};
+
+#endif // LDAP_SASL_BIND_RESULT_H
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/LDAPSchema.cpp new/ldapcpplib-0.0.5/src/LDAPSchema.cpp
--- old/ldapcpplib-0.0.5/src/LDAPSchema.cpp 2005-09-28 16:00:57.000000000 +0200
+++ new/ldapcpplib-0.0.5/src/LDAPSchema.cpp 2008-01-22 14:31:54.000000000 +0100
@@ -3,11 +3,14 @@
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
-#include "debug.h"
-#include "StringList.h"
#include "LDAPSchema.h"
#include
+#include
+
+#include "debug.h"
+#include "StringList.h"
+
using namespace std;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/LDAPSchema.h new/ldapcpplib-0.0.5/src/LDAPSchema.h
--- old/ldapcpplib-0.0.5/src/LDAPSchema.h 2005-09-28 16:00:57.000000000 +0200
+++ new/ldapcpplib-0.0.5/src/LDAPSchema.h 2008-01-22 14:31:54.000000000 +0100
@@ -6,7 +6,6 @@
#ifndef LDAP_SCHEMA_H
#define LDAP_SCHEMA_H
-#include
#include <string>
#include <map>
@@ -44,8 +43,8 @@
* Fill the object_classes map
* @param oc description of one objectclass (string returned by search
* command), in form:
- * "( SuSE.YaST.OC:5 NAME 'userTemplate' SUP objectTemplate STRUCTURAL
- * DESC 'User object template' MUST ( cn ) MAY ( secondaryGroup ))"
+ * "( 1.2.3.4.5 NAME '<name>' SUP <supname> STRUCTURAL
+ * DESC '<description>' MUST ( <attrtype> ) MAY ( <attrtype> ))"
*/
void setObjectClasses (const StringList &oc);
@@ -53,7 +52,7 @@
* Fill the attr_types map
* @param at description of one attribute type
* (string returned by search command), in form:
- * "( SuSE.YaST.Attr:19 NAME ( 'skelDir' ) DESC ''
+ * "( 1.2.3.4.6 NAME ( '<name>' ) DESC '<desc>'
* EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )"
*/
void setAttributeTypes (const StringList &at);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/Makefile.am new/ldapcpplib-0.0.5/src/Makefile.am
--- old/ldapcpplib-0.0.5/src/Makefile.am 2007-11-07 10:46:56.000000000 +0100
+++ new/ldapcpplib-0.0.5/src/Makefile.am 2007-12-20 12:33:48.000000000 +0100
@@ -6,73 +6,79 @@
lib_LTLIBRARIES = libldapcpp.la
libldapcpp_la_SOURCES = LDAPAddRequest.cpp \
- LDAPAsynConnection.cpp \
- LDAPAttribute.cpp \
- LDAPAttributeList.cpp \
- LDAPAttrType.cpp \
- LDAPBindRequest.cpp \
- LDAPCompareRequest.cpp \
- LDAPConnection.cpp \
- LDAPConstraints.cpp \
- LDAPControl.cpp \
- LDAPControlSet.cpp \
- LDAPDeleteRequest.cpp \
- LDAPEntry.cpp \
- LDAPEntryList.cpp \
- LDAPException.cpp \
- LDAPExtRequest.cpp \
- LDAPExtResult.cpp \
- LDAPMessage.cpp \
- LDAPMessageQueue.cpp \
- LDAPModDNRequest.cpp \
- LDAPModification.cpp \
- LDAPModifyRequest.cpp \
- LDAPModList.cpp \
- LDAPObjClass.cpp \
- LDAPRebind.cpp \
- LDAPRebindAuth.cpp \
- LDAPReferralException.cpp \
- LDAPReferenceList.cpp \
- LDAPRequest.cpp \
- LDAPResult.cpp \
- LDAPSchema.cpp \
- LDAPSearchReference.cpp \
- LDAPSearchRequest.cpp \
- LDAPSearchResult.cpp \
- LDAPSearchResults.cpp \
- LDAPUrl.cpp \
- LDAPUrlList.cpp \
- StringList.cpp
+ LDAPAsynConnection.cpp \
+ LDAPAttribute.cpp \
+ LDAPAttributeList.cpp \
+ LDAPAttrType.cpp \
+ LDAPBindRequest.cpp \
+ LDAPCompareRequest.cpp \
+ LDAPConnection.cpp \
+ LDAPConstraints.cpp \
+ LDAPControl.cpp \
+ LDAPControlSet.cpp \
+ LDAPDeleteRequest.cpp \
+ LDAPEntry.cpp \
+ LDAPEntryList.cpp \
+ LDAPException.cpp \
+ LDAPExtRequest.cpp \
+ LDAPExtResult.cpp \
+ LDAPMessage.cpp \
+ LDAPMessageQueue.cpp \
+ LDAPModDNRequest.cpp \
+ LDAPModification.cpp \
+ LDAPModifyRequest.cpp \
+ LDAPModList.cpp \
+ LDAPObjClass.cpp \
+ LDAPRebind.cpp \
+ LDAPRebindAuth.cpp \
+ LDAPReferralException.cpp \
+ LDAPReferenceList.cpp \
+ LDAPRequest.cpp \
+ LDAPResult.cpp \
+ LDAPSaslBindResult.cpp \
+ LDAPSchema.cpp \
+ LDAPSearchReference.cpp \
+ LDAPSearchRequest.cpp \
+ LDAPSearchResult.cpp \
+ LDAPSearchResults.cpp \
+ LDAPUrl.cpp \
+ LDAPUrlList.cpp \
+ SaslInteraction.cpp \
+ SaslInteractionHandler.cpp \
+ StringList.cpp
include_HEADERS = LDAPAsynConnection.h \
- LDAPAttribute.h \
- LDAPAttributeList.h \
- LDAPAttrType.h \
- LDAPConnection.h \
- LDAPConstraints.h \
- LDAPControl.h \
- LDAPControlSet.h \
- LDAPEntry.h \
- LDAPEntryList.h \
- LDAPException.h \
- LDAPExtResult.h \
- LDAPMessage.h \
- LDAPMessageQueue.h \
- LDAPModification.h \
- LDAPModList.h \
- LDAPObjClass.h \
- LDAPRebind.h \
- LDAPRebindAuth.h \
- LDAPReferralException.h \
- LDAPReferenceList.h \
- LDAPResult.h \
- LDAPSchema.h \
- LDAPSearchReference.h \
- LDAPSearchResult.h \
- LDAPSearchResults.h \
- LDAPUrl.h \
- LDAPUrlList.h \
- StringList.h
+ LDAPAttribute.h \
+ LDAPAttributeList.h \
+ LDAPAttrType.h \
+ LDAPConnection.h \
+ LDAPConstraints.h \
+ LDAPControl.h \
+ LDAPControlSet.h \
+ LDAPEntry.h \
+ LDAPEntryList.h \
+ LDAPException.h \
+ LDAPExtResult.h \
+ LDAPMessage.h \
+ LDAPMessageQueue.h \
+ LDAPModification.h \
+ LDAPModList.h \
+ LDAPObjClass.h \
+ LDAPRebind.h \
+ LDAPRebindAuth.h \
+ LDAPReferralException.h \
+ LDAPReferenceList.h \
+ LDAPResult.h \
+ LDAPSaslBindResult.h \
+ LDAPSchema.h \
+ LDAPSearchReference.h \
+ LDAPSearchResult.h \
+ LDAPSearchResults.h \
+ LDAPUrl.h \
+ LDAPUrlList.h \
+ SaslInteraction.h \
+ SaslInteractionHandler.h \
+ StringList.h
noinst_HEADERS = LDAPAddRequest.h \
LDAPBindRequest.h \
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/SaslInteraction.cpp new/ldapcpplib-0.0.5/src/SaslInteraction.cpp
--- old/ldapcpplib-0.0.5/src/SaslInteraction.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/ldapcpplib-0.0.5/src/SaslInteraction.cpp 2007-12-19 16:54:42.000000000 +0100
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2007, OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+
+#include
+#include <iostream>
+#include "debug.h"
+
+SaslInteraction::SaslInteraction( sasl_interact_t *interact ) :
+ m_interact(interact) {}
+
+SaslInteraction::~SaslInteraction()
+{
+ DEBUG(LDAP_DEBUG_TRACE, "SaslInteraction::~SaslInteraction()" << std::endl);
+}
+
+unsigned long SaslInteraction::getId() const
+{
+ return m_interact->id;
+}
+
+const std::string SaslInteraction::getPrompt() const
+{
+ return std::string(m_interact->prompt);
+}
+
+const std::string SaslInteraction::getChallenge() const
+{
+ return std::string(m_interact->challenge);
+}
+
+const std::string SaslInteraction::getDefaultResult() const
+{
+ return std::string(m_interact->defresult);
+}
+
+void SaslInteraction::setResult(const std::string &res)
+{
+ m_result = res;
+ m_interact->result = m_result.data();
+ m_interact->len = m_result.size();
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/SaslInteraction.h new/ldapcpplib-0.0.5/src/SaslInteraction.h
--- old/ldapcpplib-0.0.5/src/SaslInteraction.h 1970-01-01 01:00:00.000000000 +0100
+++ new/ldapcpplib-0.0.5/src/SaslInteraction.h 2007-12-19 16:54:42.000000000 +0100
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2007, OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+
+#ifndef SASL_INTERACTION_H
+#define SASL_INTERACTION_H
+
+#include <string>
+#include
+
+class SaslInteraction {
+ public:
+ SaslInteraction( sasl_interact_t *interact );
+ ~SaslInteraction();
+ unsigned long getId() const;
+ const std::string getPrompt() const;
+ const std::string getChallenge() const;
+ const std::string getDefaultResult() const;
+
+ void setResult(const std::string &res);
+
+ private:
+ sasl_interact_t *m_interact;
+ std::string m_result;
+
+};
+#endif /* SASL_INTERACTION_H */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/SaslInteractionHandler.cpp new/ldapcpplib-0.0.5/src/SaslInteractionHandler.cpp
--- old/ldapcpplib-0.0.5/src/SaslInteractionHandler.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/ldapcpplib-0.0.5/src/SaslInteractionHandler.cpp 2008-01-22 15:37:02.000000000 +0100
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2007, OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+
+#include <iostream>
+#include <iomanip>
+#include <limits>
+#include "config.h"
+
+#ifdef HAVE_TERMIOS_H
+#include
+#endif
+
+#include
+#include "SaslInteractionHandler.h"
+#include "SaslInteraction.h"
+#include "debug.h"
+
+void DefaultSaslInteractionHandler::handleInteractions(
+ const std::list &cb )
+{
+ DEBUG(LDAP_DEBUG_TRACE, "DefaultSaslInteractionHandler::handleCallbacks()"
+ << std::endl );
+ std::list::const_iterator i;
+
+ for (i = cb.begin(); i != cb.end(); i++ ) {
+ bool noecho;
+
+ cleanupList.push_back(*i);
+
+ std::cout << (*i)->getPrompt();
+ if (! (*i)->getDefaultResult().empty() ) {
+ std::cout << "(" << (*i)->getDefaultResult() << ")" ;
+ }
+ std:: cout << ": ";
+
+ switch ( (*i)->getId() ) {
+ case SASL_CB_PASS:
+ case SASL_CB_ECHOPROMPT:
+ noecho = true;
+ noecho = true;
+ break;
+ default:
+ noecho = false;
+ break;
+ }
+#ifdef HAVE_TERMIOS_H
+ /* turn off terminal echo if needed */
+ struct termios old_attr;
+ if ( noecho ) {
+ struct termios attr;
+ if (tcgetattr(STDIN_FILENO, &attr) < 0) {
+ perror("tcgetattr");
+ }
+
+ /* save terminal attributes */
+ memcpy(&old_attr, &attr, sizeof(attr));
+
+ /* disable echo */
+ attr.c_lflag &= ~(ECHO);
+
+ /* write attributes to terminal */
+ if (tcsetattr(STDIN_FILENO, TCSAFLUSH, &attr) < 0) {
+ perror("tcsetattr");
+ }
+ }
+#endif /* HAVE_TERMIOS_H */
+ std::string input;
+ std::cin >> std::noskipws >> input;
+ std::cin >> std::skipws;
+ (*i)->setResult(input);
+ if( std::cin.fail() ) {
+ std::cin.clear();
+ }
+ /* ignore the rest of the input line */
+ std::cin.ignore(std::numeric_limitsstd::streamsize::max(), '\n');
+
+#ifdef HAVE_TERMIOS_H
+ /* restore terminal settings */
+ if ( noecho ) {
+ tcsetattr(STDIN_FILENO, TCSANOW, &old_attr);
+ std::cout << std::endl;
+ }
+#endif /* HAVE_TERMIOS_H */
+ }
+}
+
+DefaultSaslInteractionHandler::~DefaultSaslInteractionHandler()
+{
+ DEBUG(LDAP_DEBUG_TRACE, "DefaultSaslInteractionHandler::~DefaultSaslInteractionHandler()"
+ << std::endl );
+
+ std::list::const_iterator i;
+ for (i = cleanupList.begin(); i != cleanupList.end(); i++ ) {
+ delete(*i);
+ }
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ldapcpplib-0.0.5/src/SaslInteractionHandler.h new/ldapcpplib-0.0.5/src/SaslInteractionHandler.h
--- old/ldapcpplib-0.0.5/src/SaslInteractionHandler.h 1970-01-01 01:00:00.000000000 +0100
+++ new/ldapcpplib-0.0.5/src/SaslInteractionHandler.h 2007-12-19 16:54:42.000000000 +0100
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2007, OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
+
+#ifndef SASL_INTERACTION_HANDLER_H
+#define SASL_INTERACTION_HANDLER_H
+#include <list>
+
+class SaslInteraction;
+
+class SaslInteractionHandler {
+ public:
+ virtual void handleInteractions( const std::list &cb )=0;
+ virtual ~SaslInteractionHandler() {}
+};
+
+class DefaultSaslInteractionHandler {
+ public:
+ virtual void handleInteractions( const std::list &cb );
+ virtual ~DefaultSaslInteractionHandler();
+
+ private:
+ std::list cleanupList;
+};
+#endif /* SASL_INTERACTION_HANDLER_H */
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org